Skip to content

Update to Mill 1.0.0-RC1 #191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 10 additions & 21 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8', '17']
java: ['11', '17']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
Expand All @@ -34,7 +34,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
java-version: 11
- name: Check Binary Compatibility
run: ./mill -i __.mimaReportBinaryIssues

Expand All @@ -43,34 +43,23 @@ jobs:
needs: test
runs-on: ubuntu-latest
env:
SONATYPE_PGP_PRIVATE_KEY: ${{ secrets.SONATYPE_PGP_PRIVATE_KEY }}
SONATYPE_PGP_PRIVATE_KEY_PASSWORD: ${{ secrets.SONATYPE_PGP_PRIVATE_KEY_PASSWORD }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MILL_SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MILL_SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MILL_PGP_SECRET_BASE64: ${{ secrets.SONATYPE_PGP_PRIVATE_KEY }}
MILL_PGP_PASSPHRASE: ${{ secrets.SONATYPE_PGP_PRIVATE_KEY_PASSWORD }}
LANG: "en_US.UTF-8"
LC_MESSAGES: "en_US.UTF-8"
LC_ALL: "en_US.UTF-8"

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
- name: Publish to Maven Central
run: |
if [[ $(git tag --points-at HEAD) != '' ]]; then
echo $SONATYPE_PGP_PRIVATE_KEY | base64 --decode > gpg_key
gpg --import --no-tty --batch --yes gpg_key
rm gpg_key
./mill -i mill.scalalib.PublishModule/publishAll \
--sonatypeCreds $SONATYPE_USER:$SONATYPE_PASSWORD \
--gpgArgs --passphrase=$SONATYPE_PGP_PRIVATE_KEY_PASSWORD,--no-tty,--pinentry-mode,loopback,--batch,--yes,-a,-b \
--publishArtifacts __.publishArtifacts \
--readTimeout 600000 \
--awaitTimeout 600000 \
--release true \
--signed true
fi
run: ./mill -i mill.scalalib.SonatypeCentralPublishModule/

- name: Create GitHub Release
id: create_gh_release
uses: actions/create-release@v1.1.4
Expand Down
7 changes: 0 additions & 7 deletions .jvmopts

This file was deleted.

1 change: 0 additions & 1 deletion .mill-version

This file was deleted.

18 changes: 9 additions & 9 deletions build.mill
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//| mill-version: 1.0.0-RC1-24-d74b52
//| mvnDeps:
//| - com.github.lolgab::mill-mima_mill1.0.0-RC1:0.2.0-M1
package build
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.0`
import $ivy.`com.github.lolgab::mill-mima::0.1.0`

import mill._, scalalib._, scalajslib._, scalanativelib._, publish._
import de.tobiasroeser.mill.vcs.version.VcsVersion
import mill.main.VcsVersion
import com.github.lolgab.mill.mima._
import mill.scalalib.api.ZincWorkerUtil.isScala3

val dottyCommunityBuildVersion = sys.props.get("dottyVersion").toList

Expand All @@ -16,7 +16,7 @@ trait MimaCheck extends Mima {
def mimaPreviousVersions = Seq("0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.3.0", "0.3.1")

def mimaReportBinaryIssues() =
if (this.isInstanceOf[ScalaNativeModule] || this.isInstanceOf[ScalaJSModule]) T.command()
if (this.isInstanceOf[ScalaNativeModule] || this.isInstanceOf[ScalaJSModule]) Task.Command{}
else super.mimaReportBinaryIssues()
}

Expand All @@ -30,7 +30,7 @@ trait SourcecodeModule extends PublishModule with MimaCheck {
// Temporary until the next version of Mima gets released with
// https://github.com/lightbend/mima/issues/693 included in the release.
def mimaPreviousArtifacts =
if(isScala3(crossScalaVersion)) Agg.empty[Dep] else super.mimaPreviousArtifacts()
if(crossScalaVersion.startsWith("3.")) Agg.empty[Dep] else super.mimaPreviousArtifacts()

def pomSettings = PomSettings(
description = artifactName(),
Expand All @@ -44,10 +44,10 @@ trait SourcecodeModule extends PublishModule with MimaCheck {
)
}
trait SourcecodeMainModule extends CrossScalaModule with PlatformScalaModule {
def compileIvyDeps =
def compileMvnDeps =
if (crossScalaVersion.startsWith("2")) Agg(
ivy"org.scala-lang:scala-reflect:${crossScalaVersion}",
ivy"org.scala-lang:scala-compiler:${crossScalaVersion}"
mvn"org.scala-lang:scala-reflect:${crossScalaVersion}",
mvn"org.scala-lang:scala-compiler:${crossScalaVersion}"
)
else Agg.empty[Dep]
}
Expand Down
Loading