diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e84012c..5fbc50d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,7 +63,7 @@ jobs: run: sbt '++ ${{ matrix.scala }}' test - name: Compress target directories - run: tar cf targets.tar target core/target project/target + run: tar cf targets.tar target core/target cli/target project/target - name: Upload target directories uses: actions/upload-artifact@v3 diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 0000000..769e4e7 --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,12 @@ +## Core JAR + +* [ ] create and tag the release via the GitHub web UI +* [ ] check the GitHub Actions log to see that publishing succeeded +* [ ] wait for the artifact to appear on Maven Central + +## CLI jar + +* [ ] locally, on JDK 8, run `sbt cli/assembly` +* [ ] rename the resulting JAR to just `jardiff.jar` +* [ ] attach the JAR to the release in the GitHub web UI +* [ ] PR the change to the [homebrew formula](https://github.com/retronym/homebrew-formulas/blob/master/jardiff.rb), using `shasum -a 256 jardiff.jar` to compute the SHA diff --git a/build.sbt b/build.sbt index 04df73b..963a2f6 100644 --- a/build.sbt +++ b/build.sbt @@ -34,7 +34,8 @@ inThisBuild(Seq[Setting[_]]( "SONATYPE_USERNAME" -> "${{ secrets.SONATYPE_USERNAME }}" ) ) - ) + ), + headerLicense := Some(HeaderLicense.Custom("Copyright (C) Lightbend Inc. ")), )) ThisBuild / publishMavenStyle := true @@ -44,20 +45,21 @@ ThisBuild / pomIncludeRepository := (_ => false) lazy val root = ( project.in(file(".")) - aggregate(core) + aggregate(core, cli) settings( name := buildName, publish / skip := true, + publishArtifact := false, + publish := {}, + publishLocal := {} ) ) val AsmVersion = "9.6" -lazy val core = ( - project. +lazy val core = project. settings( libraryDependencies ++= Seq( - "commons-cli" % "commons-cli" % "1.6.0", "org.ow2.asm" % "asm" % AsmVersion, "org.ow2.asm" % "asm-util" % AsmVersion, "org.scala-lang" % "scalap" % System.getProperty("scalap.version", scalaVersion.value), @@ -67,12 +69,23 @@ lazy val core = ( "ch.qos.logback" % "logback-classic" % "1.3.11", "org.scalatest" %% "scalatest" % "3.2.17" % Test, ), - name := buildName + "-core", - headerLicense := Some(HeaderLicense.Custom("Copyright (C) Lightbend Inc. ")), + name := buildName + "-core" + ) + +lazy val cli = project. + settings( + libraryDependencies ++= Seq( + "commons-cli" % "commons-cli" % "1.6.0", + ), + name := buildName + "-cli", assembly / assemblyMergeStrategy := { case "rootdoc.txt" => MergeStrategy.discard case x if x.endsWith("module-info.class") => MergeStrategy.discard case x => (assembly / assemblyMergeStrategy).value(x) }, - ) -) + // cli is not meant to be published + publish / skip := true, + publishArtifact := false, + publish := {}, + publishLocal := {} + ).dependsOn(core) diff --git a/core/src/main/scala/scala/tools/jardiff/Main.scala b/cli/src/main/scala/scala/tools/jardiff/Main.scala similarity index 100% rename from core/src/main/scala/scala/tools/jardiff/Main.scala rename to cli/src/main/scala/scala/tools/jardiff/Main.scala