Skip to content

Commit ea4cb63

Browse files
committed
Update publishing setup. Align with ij-plugins bundle for FIJI setup
1 parent 5f7cdfc commit ea4cb63

5 files changed

Lines changed: 52 additions & 48 deletions

File tree

.scalafmt.conf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version = 3.10.7
2+
3+
runner.dialect = scala3
4+
5+
preset = IntelliJ
6+
align.preset = more
7+
maxColumn = 120
8+
docstrings.style = Asterisk
9+
docstrings.blankFirstLine = yes
10+
docstrings.wrap = no
11+
importSelectors = singleLine
12+
newlines.source = keep

.travis.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

build.sbt

Lines changed: 38 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,48 @@
1-
// @formatter:off
2-
import java.net.URL
3-
41
name := "ijp_imageio"
52
organization := "net.sf.ij-plugins"
3+
organizationName := "IJ-Plugins"
64
version := "2.3.0.1-SNAPSHOT"
75

8-
homepage := Some(new URL("https://github.com/ij-plugins/ijp-imageio"))
6+
homepage := Some(url("https://github.com/ij-plugins/ijp-imageio"))
97
organizationHomepage := Some(url("https://github.com/ij-plugins"))
10-
startYear := Some(2002)
11-
licenses := Seq(("LGPL-2.1", new URL("https://opensource.org/licenses/LGPL-2.1")))
12-
description := "ijp-ImageIO enable reading and writing images using Java ImageIO codecs. " +
8+
startYear := Some(2002)
9+
licenses := Seq("LGPL-2.1" -> url("https://opensource.org/licenses/LGPL-2.1"))
10+
description := "ijp-ImageIO enable reading and writing images using Java ImageIO codecs. " +
1311
"The core ImageIO formats: JPEG, PNG, BMP, WBMP, and GIF. IJP-ImageIO is also using JAI codes adding support for " +
1412
"TIFF, JPEG200, PNM, and PCX. TIFF supports reading and writing using various compression schemes: LZW, JPEG, ZIP, " +
1513
"and Deflate. For more detailed information see IJP-ImageIO home page: https://github.com/ij-plugins/ijp-imageio/wiki."
1614

1715
libraryDependencies ++= Seq(
18-
"net.imagej" % "ij" % "1.54d",
19-
"junit" % "junit" % "4.13.2" % "test",
20-
"com.novocode" % "junit-interface" % "0.11" % "test->default"
16+
"net.imagej" % "ij" % "1.54p",
17+
"junit" % "junit" % "4.13.2" % "test",
18+
"com.novocode" % "junit-interface" % "0.11" % "test->default"
2119
)
2220

21+
// Set the Java version target for compatibility for the current FIJI distribution
22+
// We do not want to be over the FIJI Java version.
23+
lazy val javaTargetVersion = "21"
24+
2325
// fork a new JVM for 'run' and 'test:run'
2426
fork := true
2527

2628
// add a JVM option to use when forking a JVM for 'run'
2729
javaOptions ++= Seq("-Xmx2G", "-server")
2830
Compile / compile / javacOptions ++= Seq(
2931
"-Xlint",
30-
"--release", "11"
32+
"--release",
33+
javaTargetVersion
3134
)
3235
Compile / doc / javacOptions ++= Seq(
33-
"-windowtitle", "IJP-ImageIO API v." + version.value,
34-
"-header", "IJP-ImageIO API v." + version.value,
35-
"-sourcepath", (baseDirectory.value / "src/main/java").getAbsolutePath,
36-
"-subpackages", "ij_plugins.imageio",
37-
"-exclude", "ij_plugins.imageio.impl:ij_plugins.imageio.plugins",
36+
"-windowtitle",
37+
"IJP-ImageIO API v." + version.value,
38+
"-header",
39+
"IJP-ImageIO API v." + version.value,
40+
"-sourcepath",
41+
(baseDirectory.value / "src/main/java").getAbsolutePath,
42+
"-subpackages",
43+
"ij_plugins.imageio",
44+
"-exclude",
45+
"ij_plugins.imageio.impl:ij_plugins.imageio.plugins",
3846
"-verbose"
3947
)
4048

@@ -45,7 +53,7 @@ enablePlugins(SbtImageJ)
4553
ijRuntimeSubDir := "sandbox"
4654
ijPluginsSubDir := "ij-plugins"
4755
ijCleanBeforePrepareRun := true
48-
cleanFiles += ijPluginsDir.value
56+
cleanFiles += ijPluginsDir.value
4957

5058
run / baseDirectory := baseDirectory.value / "sandbox"
5159

@@ -54,17 +62,21 @@ run / baseDirectory := baseDirectory.value / "sandbox"
5462
//
5563
// Enables publishing to maven repo
5664
publishMavenStyle := true
65+
Test / publishArtifact := false
5766
// This is a Java project, disable using the Scala version in output paths and artifacts
58-
crossPaths := false
67+
crossPaths := false
5968
// This forbids including Scala related libraries into the dependency
60-
autoScalaLibrary := false
61-
publishTo := sonatypePublishToBundle.value
62-
import xerial.sbt.Sonatype._
63-
sonatypeProjectHosting := Some(GitHubHosting("ij-plugins", "ijp-imageio", "jpsacha@gmail.com"))
69+
autoScalaLibrary := false
70+
ThisBuild / publishTo := {
71+
val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/"
72+
if (isSnapshot.value) Some("central-snapshots" at centralSnapshots)
73+
else localStaging.value
74+
}
75+
6476
developers := List(
65-
Developer(id="jpsacha", name="Jarek Sacha", email="jpsacha@gmail.com", url=url("https://github.com/jpsacha"))
77+
Developer(id = "jpsacha", name = "Jarek Sacha", email = "jpsacha@gmail.com", url = url("https://github.com/jpsacha"))
6678
)
6779

68-
Test / packageBin / publishArtifact := false
69-
Test / packageDoc / publishArtifact := false
70-
Test / packageSrc / publishArtifact := false
80+
//Test / packageBin / publishArtifact := false
81+
//Test / packageDoc / publishArtifact := false
82+
//Test / packageSrc / publishArtifact := false

project/plugin-imagej.sbt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
//resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
2-
31
// [[https://github.com/jpsacha/sbt-imagej]]
4-
addSbtPlugin("net.sf.ij-plugins" % "sbt-imagej" % "2.1.0")
2+
addSbtPlugin("net.sf.ij-plugins" % "sbt-imagej" % "2.2.1")

project/sbt-sonatype.sbt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
// @formatter:off
2-
//
3-
// [https://github.com/xerial/sbt-sonatype]
4-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.14")
51
// [https://github.com/sbt/sbt-pgp]
6-
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.0")
2+
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1")

0 commit comments

Comments
 (0)