Skip to content

Commit bff9adf

Browse files
committed
Update Build Tooling
* Udate to Mill 0.12.16 * Update Mill plugins * Update test matrix * Drop support for Mill 0.9 and older * Update Sonatype publishing workflow
1 parent 4a8ca55 commit bff9adf

File tree

9 files changed

+176
-153
lines changed

9 files changed

+176
-153
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,16 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
os: [ubuntu-latest, windows-latest]
22-
java-version: [8, 11]
22+
java-version: 11
2323
targets:
2424
- "__.publishLocal testRepo"
2525
- "core.__.test"
26-
- "itest[0.11.6].test"
26+
- "itest[0.12.16].test"
27+
- "itest[0.12.0].test"
28+
- "itest[0.11.12].test"
2729
- "itest[0.11.0].test"
2830
- "itest[0.10.12].test"
2931
- "itest[0.10.0].test"
30-
- "itest[0.9.12].test"
31-
- "itest[0.9.3].test"
32-
- "itest[0.8.0].test"
33-
- "itest[0.7.4].test"
34-
- "itest[0.7.0].test"
35-
- "itest[0.6.3].test"
36-
- "itest[0.6.0].test"
3732

3833
runs-on: ${{ matrix.os }}
3934
continue-on-error: ${{ matrix.os == 'windows-latest' }}
@@ -66,8 +61,8 @@ jobs:
6661
continue-on-error: true
6762

6863
publish:
64+
if: github.repository == 'lefou/mill-osgi' && github.ref == 'refs/heads/main' && github.event_name == 'push'
6965
needs: build
70-
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
7166
runs-on: ubuntu-latest
7267
# only run one publish job for the same sha at the same time
7368
# e.g. when a main-branch push is also tagged
@@ -80,7 +75,7 @@ jobs:
8075

8176
- uses: actions/setup-java@v4
8277
with:
83-
java-version: 8
78+
java-version: 11
8479
distribution: temurin
8580

8681
- name: Setup GPG secrets
@@ -90,4 +85,11 @@ jobs:
9085
gpg --list-secret-keys --keyid-format LONG
9186
9287
- name: Publish to Maven Central
93-
run: ./millw -i mill.scalalib.PublishModule/publishAll --sonatypeCreds "${{ secrets.SONATYPE_CREDS }}" --gpgArgs "--passphrase=${{ secrets.GPG_SECRET_KEY_PASS}},--batch,--yes,-a,-b,--pinentry-mode,loopback" --publishArtifacts __.publishArtifacts --readTimeout 600000 --awaitTimeout 600000 --release true --signed true
88+
run: ./millw -i --import "ivy:com.lihaoyi::mill-contrib-sonatypecentral:" mill.contrib.sonatypecentral.SonatypeCentralPublishModule/publishAll --publishArtifacts __.publishArtifacts
89+
env:
90+
MILL_PGP_PASSPHRASE: ${{ secrets.GPG_SECRET_KEY_PASS }}
91+
# MILL_PGP_SECRET_BASE64: ${{ secrets.GPG_SECRET_KEY }}
92+
MILL_SONATYPE_PASSWORD: ${{ secrets.MILL_SONATYPE_PASSWORD }}
93+
MILL_SONATYPE_USERNAME: ${{ secrets.MILL_SONATYPE_USERNAME }}
94+
95+

.mill-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.11.11
1+
0.12.16

build.sc

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// mill plugins
2-
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.0`
2+
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.1`
33
// Run integration tests with mill
4-
import $ivy.`de.tototec::de.tobiasroeser.mill.integrationtest::0.7.1`
4+
import $ivy.`de.tototec::de.tobiasroeser.mill.integrationtest::0.7.3`
55
// Generate converage reports
66
import $ivy.`com.lihaoyi::mill-contrib-scoverage:`
77

@@ -28,9 +28,9 @@ trait Deps {
2828
// The mill API version used in the project/sources/dependencies, also default for integration tests
2929
def millVersion: String
3030
def millPlatform: String
31-
def scalaVersion: String = "2.13.14"
31+
def scalaVersion: String = "2.13.16"
3232
def millTestVersions: Seq[String]
33-
val scoverageVersion = "2.2.0"
33+
val scoverageVersion = "2.4.1"
3434

3535
val bndlib = ivy"biz.aQute.bnd:biz.aQute.bndlib:6.4.1"
3636
val logbackClassic = ivy"ch.qos.logback:logback-classic:1.1.3"
@@ -47,36 +47,17 @@ object Deps_0_11 extends Deps {
4747
override val millVersion = "0.11.0" // scala-steward:off
4848
override def millPlatform = "0.11"
4949
// keep in sync with .github/workflows/build.yml
50-
override val millTestVersions = Seq("0.11.6", millVersion)
50+
override val millTestVersions = Seq("0.12.16", "0.12.0", "0.11.12", millVersion)
5151
}
5252
object Deps_0_10 extends Deps {
5353
override val millVersion = "0.10.0" // scala-steward:off
5454
override def millPlatform = "0.10"
5555
// keep in sync with .github/workflows/build.yml
5656
override val millTestVersions = Seq("0.10.12", millVersion)
5757
}
58-
object Deps_0_9 extends Deps {
59-
override val millVersion = "0.9.3" // scala-steward:off
60-
override def millPlatform = "0.9"
61-
// keep in sync with .github/workflows/build.yml
62-
override val millTestVersions = Seq("0.9.12", millVersion)
63-
}
64-
object Deps_0_7 extends Deps {
65-
override val millVersion = "0.7.0" // scala-steward:off
66-
override def millPlatform = "0.7"
67-
// keep in sync with .github/workflows/build.yml
68-
override val millTestVersions = Seq("0.8.0", "0.7.4", millVersion)
69-
}
70-
object Deps_0_6 extends Deps {
71-
override val millVersion = "0.6.0" // scala-steward:off
72-
override def millPlatform = "0.6"
73-
override val scalaVersion = "2.12.19"
74-
// keep in sync with .github/workflows/build.yml
75-
override val millTestVersions = Seq("0.6.3", millVersion)
76-
}
7758

7859
/** Cross build versions */
79-
val millPlatforms = Seq(Deps_0_11, Deps_0_10, Deps_0_9, Deps_0_7, Deps_0_6).map(x => x.millPlatform -> x)
60+
val millPlatforms = Seq(Deps_0_11, Deps_0_10).map(x => x.millPlatform -> x)
8061

8162
trait MyScoverageModule extends ScoverageModule {
8263
override lazy val scoverage: ScoverageData = new MyScoverageData {}
@@ -210,24 +191,3 @@ trait ItestCross extends MillIntegrationTestModule with Cross.Module[String] {
210191
PathRef(T.dest)
211192
}
212193
}
213-
214-
/** Convenience targets. */
215-
object P extends Module {
216-
217-
/**
218-
* Update the millw script.
219-
*/
220-
def millw() = T.command {
221-
// https://raw.githubusercontent.com/lefou/millw/master/millw
222-
for {
223-
file <- Seq("millw", "millw.bat")
224-
} yield {
225-
val target = Util.download(s"https://raw.githubusercontent.com/lefou/millw/master/${file}")
226-
val millw = baseDir / file
227-
os.copy.over(target.path, millw)
228-
os.perms.set(millw, os.perms(millw) + PosixFilePermission.OWNER_EXECUTE)
229-
target
230-
}
231-
}
232-
233-
}

itest/src/Embedded-Jars/build.sc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ object embedded extends JavaModule
2222

2323
trait Template extends ScalaModule with OsgiBundleModule {
2424
override def millSourcePath: Path = super.millSourcePath / os.up / "hello"
25-
override def scalaVersion: T[String] = "2.13.7"
25+
override def scalaVersion: T[String] = "2.13.17"
2626
override def embeddedJars = Seq(embedded.jar())
2727
}
2828

itest/src/Exploded-Jars/build.sc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ object embedded extends JavaModule
2323

2424
trait Template extends ScalaModule with OsgiBundleModule {
2525
override def millSourcePath: Path = super.millSourcePath / os.up / "hello"
26-
override def scalaVersion: T[String] = "2.13.7"
26+
override def scalaVersion: T[String] = "2.13.17"
2727
override def explodedJars = Seq(embedded.jar())
2828
}
2929

itest/src/HelloWorld/build.sc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def verify() = T.command {
4141

4242
trait Template extends ScalaModule with OsgiBundleModule {
4343
override def millSourcePath: Path = super.millSourcePath / os.up / "hello"
44-
override def scalaVersion: T[String] = "2.12.7"
44+
override def scalaVersion: T[String] = "2.12.20"
4545
override def artifactName = "hello"
4646
}
4747

itest/src/Include-Sources/build.sc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def verify() = T.command {
2020

2121
trait Template extends ScalaModule with OsgiBundleModule {
2222
override def millSourcePath: Path = super.millSourcePath / os.up / "hello"
23-
override def scalaVersion: T[String] = "2.13.7"
23+
override def scalaVersion: T[String] = "2.13.17"
2424
override def includeSources = true
2525
}
2626

itest/src/Interproject-dependson-includePackage-versions/build.sc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def verify() = T.command {
3838

3939
trait TemplateBnd extends ScalaModule with OsgiBundleModule {
4040
override def osgiBuildMode: OsgiBundleModule.BuildMode = OsgiBundleModule.BuildMode.ReplaceJarTarget
41-
override def scalaVersion: T[String] = "2.12.7"
41+
override def scalaVersion: T[String] = "2.12.20"
4242
override def bundleVersion = projVersion
4343
}
4444

0 commit comments

Comments
 (0)