Skip to content
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

Update mill-main to 0.11.1 #78

Merged
merged 2 commits into from
Jul 5, 2023
Merged
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
2 changes: 1 addition & 1 deletion .mill-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.12
0.11.1
23 changes: 13 additions & 10 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,37 @@ import mill.scalalib._
import mill.scalalib.scalafmt._
import mill.scalalib.publish._
import mill.scalalib.api.ZincWorkerUtil
import mill.scalalib.api.Util.scalaNativeBinaryVersion
import mill.scalalib.api.ZincWorkerUtil._

import com.goyeau.mill.scalafix.ScalafixModule
import de.tobiasroeser.mill.vcs.version.VcsVersion
import io.kipp.mill.ci.release.CiReleaseModule
import io.kipp.mill.ci.release.SonatypeHost

val millVersions = Seq("0.10.12", "0.11.1")
val millBinaryVersions = millVersions.map(scalaNativeBinaryVersion)
val scala213 = "2.13.10"
val pluginName = "mill-ci-release"

def millBinaryVersion(millVersion: String) = scalaNativeBinaryVersion(
millVersion
)

object plugin extends Cross[Plugin](millVersions: _*)
class Plugin(millVersion: String)
extends ScalaModule
def millVersion(binaryVersion: String) =
millVersions.find(v => millBinaryVersion(v) == binaryVersion).get

object plugin extends Cross[Plugin](millBinaryVersions)
trait Plugin
extends Cross.Module[String]
with ScalaModule
with CiReleaseModule
with ScalafixModule
with ScalafmtModule {

override def millSourcePath = super.millSourcePath / os.up

override def scalaVersion = scala213

override def artifactName =
s"${pluginName}_mill${millBinaryVersion(millVersion)}"
s"${pluginName}_mill${crossValue}"

override def pomSettings = PomSettings(
description =
Expand All @@ -50,16 +53,16 @@ class Plugin(millVersion: String)
override def sonatypeHost = Some(SonatypeHost.s01)

override def compileIvyDeps = super.compileIvyDeps() ++ Agg(
ivy"com.lihaoyi::mill-scalalib:${millVersion}"
ivy"com.lihaoyi::mill-scalalib:${millVersion(crossValue)}"
)
override def ivyDeps = super.ivyDeps() ++ Agg(
ivy"de.tototec::de.tobiasroeser.mill.vcs.version_mill${millBinaryVersion(millVersion)}::0.4.0"
ivy"de.tototec::de.tobiasroeser.mill.vcs.version_mill${crossValue}::0.4.0"
)
override def scalacOptions = Seq("-Ywarn-unused", "-deprecation")

override def sources = T.sources {
super.sources() ++ Seq(
millSourcePath / s"src-mill${millVersion.split('.').take(2).mkString(".")}"
millSourcePath / s"src-mill${millVersion(crossValue).split('.').take(2).mkString(".")}"
).map(PathRef(_))
}

Expand Down