From bbd0e715e4404f616a4a06e6fe03b9ed305aa7f6 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Wed, 26 Aug 2026 15:04:28 -0400 Subject: [PATCH 1/4] ci: Update GitHub Actions --- .github/workflows/ci.yml | 19 ++++++++++--------- .java-version | 1 + 2 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 .java-version diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b2f7217..fbf101ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,17 +9,18 @@ jobs: strategy: fail-fast: false runs-on: ubuntu-latest + env: + JVM_OPTS: "-Xms1024m -Xmx1024m -XX:ReservedCodeCacheSize=128m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8" steps: - - uses: actions/checkout@v2 - - uses: coursier/cache-action@v6 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v7 + - uses: actions/setup-java@v5 with: - distribution: temurin + distribution: zulu java-version: 8 + cache: sbt + - uses: sbt/setup-sbt@v1 - name: Test - env: - JVM_OPTS: "-Xms1024m -Xmx1024m -XX:ReservedCodeCacheSize=128m -XX:MaxPermSize=256m" run: | - sbt "^test" - sbt "^publishLocal" - sbt "it:test" + sbt -v "^test" + sbt -v "^publishLocal" + sbt -v "it:test" diff --git a/.java-version b/.java-version new file mode 100644 index 00000000..62593409 --- /dev/null +++ b/.java-version @@ -0,0 +1 @@ +1.8 From ad90bf61e114634d38140942862fa6c2c3d4dd73 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Wed, 26 Aug 2026 15:04:42 -0400 Subject: [PATCH 2/4] Migrate direct download from Maven Central to using update --- build.sbt | 24 ++++++++++++++++++++++++ project/SbtSupport.scala | 22 +++------------------- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/build.sbt b/build.sbt index c53cb6b0..05fbac7c 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,6 @@ import Dependencies._ import RemoteDepHelper._ +import SbtSupport._ def MyVersion: String = "0.9.20" @@ -24,6 +25,19 @@ scmInfo in ThisBuild := Some( "scm:git:git@github.com:lightbend-labs/dbuild.git") ) +sbtLaunchJarLocation in ThisBuild := (baseDirectory in ThisBuild).value / "target" / "sbt" / "sbt-launch.jar" + +sbtLaunchJar in ThisBuild := { + val cp = (externalDependencyClasspath in (sbtLauncher, Compile)).value + val location = (sbtLaunchJarLocation in ThisBuild).value + cp.map(_.data).find(_.getName.startsWith("sbt-launch")) match { + case Some(x) => + IO.copyFile(x, location) + Seq(location) + case None => sys.error("failed to resolve sbt-launch") + } +} + def SubProj(name: String) = ( Project(name, file(if (name=="root") "." else name)) configs( IntegrationTest ) @@ -268,3 +282,13 @@ lazy val docs = ( }).value ) ) + +lazy val sbtLauncher = ( + SubProj("sbt-launcher") + settings( + autoScalaLibrary := false, + libraryDependencies += ("org.scala-sbt" % "sbt-launch" % "1.0.0").intransitive, + publish := (), + publishLocal := () + ) +) diff --git a/project/SbtSupport.scala b/project/SbtSupport.scala index 878a8949..dd893ab2 100644 --- a/project/SbtSupport.scala +++ b/project/SbtSupport.scala @@ -1,28 +1,12 @@ import sbt._ import Keys._ -import scala.concurrent.ExecutionContext.Implicits.global object SbtSupport { val sbtLaunchJarUrl = SettingKey[String]("sbt-launch-jar-url") - val sbtLaunchJarLocation = SettingKey[File]("sbt-launch-jar-location") - val sbtLaunchJar = TaskKey[Seq[java.io.File]]("sbt-launch-jar", "Resolves SBT launch jar") + val sbtLaunchJarLocation = SettingKey[File]("sbt-launch-jar-location") + val sbtLaunchJar = TaskKey[Seq[java.io.File]]("sbt-launch-jar", "Resolves sbt launch jar") - def downloadFile(log: Logger, dbuildVersion:String, uri: String, file: File): Seq[File] = { - log.info("Downloading "+uri+" to "+ file.getAbsolutePath() +"...") - val ht = new com.typesafe.dbuild.http.HttpTransfer(dbuildVersion) - try { - ht.download(uri, file) - } finally { - ht.close() - } - Seq(file) - } - - val buildSettings: Seq[Setting[_]] = Seq( - sbtLaunchJarUrl := "https://repo1.maven.org/maven2/org/scala-sbt/sbt-launch/1.0.0/sbt-launch.jar", - sbtLaunchJarLocation := baseDirectory.value / "target" / "sbt" / "sbt-launch.jar", - sbtLaunchJar := downloadFile(streams.value.log, version.value, sbtLaunchJarUrl.value, sbtLaunchJarLocation.value) - ) + val buildSettings: Seq[Setting[_]] = Nil val settings: Seq[Setting[_]] = buildSettings ++ Seq( // The jar is added as a resource, so that the running dbuild can find it and use it to spawn new instances of sbt resourceGenerators in Compile += sbtLaunchJar.taskValue From cb3918e0b7e7faa94aec2b3d24b16f00c18f8670 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Wed, 26 Aug 2026 15:09:41 -0400 Subject: [PATCH 3/4] Scala 2.12.21 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 05fbac7c..0a5566a6 100644 --- a/build.sbt +++ b/build.sbt @@ -74,7 +74,7 @@ def skip212 = Seq( def selectScalaVersion = scalaVersion := { val sb = (sbtVersion in pluginCrossBuild).value - if (sb.startsWith("0.13")) "2.10.7" else "2.12.6" + if (sb.startsWith("0.13")) "2.10.7" else "2.12.21" } lazy val root = ( From 917034df4f372f11ab8131419d06ef2fe13f8598 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Wed, 26 Aug 2026 15:15:22 -0400 Subject: [PATCH 4/4] Build on push for verification --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fbf101ab..92b4335e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,6 @@ name: test on: push: - branches: - - main pull_request: jobs: test: