Skip to content

Commit

Permalink
Build with Mill 0.11.1 (#54)
Browse files Browse the repository at this point in the history
Pull request: #54
  • Loading branch information
lefou authored Jun 30, 2023
1 parent 39bfd3a commit ba79942
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
target
pom.xml
/mvn-deploy-settings.xml
/test-output/

# Mill
/out/
Expand Down
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
26 changes: 14 additions & 12 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,19 @@ import de.tobiasroeser.mill.osgi._
import mill.api.Loose


val baseDir = build.millSourcePath
def baseDir = build.millSourcePath

object Deps {
val slf4j = ivy"org.slf4j:slf4j-api:1.7.36"
object Test {
val testNgMill = ivy"com.lihaoyi:mill-contrib-testng:${mill.BuildInfo.millVersion}"
val testNg = ivy"org.testng:testng:7.5"
val lambdatest = ivy"de.tototec:de.tobiasroeser.lambdatest:0.8.0"
}
}

trait GettextJavaModule extends JavaModule {

def poSource: Source = T.source(millSourcePath / "src" / "main" / "po")
def poSource: T[PathRef] = T.source(millSourcePath / "src" / "main" / "po")

/**
* Generates a message catalog (messages.pot) from sources.
Expand Down Expand Up @@ -104,12 +103,9 @@ trait GettextJavaModule extends JavaModule {

}


object cmdoption extends MavenModule with GettextJavaModule with OsgiBundleModule with PublishModule {
override def millSourcePath = super.millSourcePath / os.up / "de.tototec.cmdoption"
val namespace = "de.tototec.cmdoption"
override def artifactName = namespace
trait PubSettings extends PublishModule {
override def publishVersion = de.tobiasroeser.mill.vcs.version.VcsVersion.vcsState().format()

def pomSettings = T {
PomSettings(
description = "CmdOption is a simple annotation-driven command line parser toolkit for Java 5 applications that is configured through annotations",
Expand All @@ -120,6 +116,13 @@ object cmdoption extends MavenModule with GettextJavaModule with OsgiBundleModul
developers = Seq(Developer("TobiasRoeser", "Tobias Roeser", "https.//github.com/lefou"))
)
}

}

object cmdoption extends MavenModule with GettextJavaModule with OsgiBundleModule with PubSettings {
override def millSourcePath = super.millSourcePath / os.up / "de.tototec.cmdoption"
val namespace = "de.tototec.cmdoption"
override def artifactName = namespace
override def javacOptions = Seq("-source", "1.6", "-target", "1.6", "-encoding", "UTF-8")
override def compileIvyDeps = Agg(Deps.slf4j.optional(true))
override def sources = T.sources(millSourcePath / "src" / "main" / "java")
Expand All @@ -139,12 +142,11 @@ object cmdoption extends MavenModule with GettextJavaModule with OsgiBundleModul
)}


object test extends Tests with TestModule.TestNg {
object test extends MavenModuleTests with TestModule.TestNg {
override def forkArgs = super.forkArgs() ++ Seq("-Dmill.testng.printProgress=0")
override def ivyDeps = Agg(
override def ivyDeps = super.ivyDeps() ++ Agg(
Deps.Test.lambdatest,
Deps.Test.testNg,
Deps.Test.testNgMill
Deps.Test.testNg
)
override def runIvyDeps: Target[Loose.Agg[Dep]] = super.runIvyDeps() ++ Agg(Deps.slf4j)
override def javacOptions = Seq("-source", "1.8", "-target", "1.8", "-encoding", "UTF-8")
Expand Down

0 comments on commit ba79942

Please sign in to comment.