Skip to content

Commit

Permalink
Update .mill-version (#143)
Browse files Browse the repository at this point in the history
lihaoyi authored Oct 24, 2024
1 parent 18a6e5a commit 4414c1b
Showing 46 changed files with 492 additions and 436 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -27,7 +27,26 @@ jobs:
- name: Run tests
run: |
set -eux
./mill -i --disable-ticker __.testLocal
./mill -ikj1 --disable-ticker __.testLocal
test-examples:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '11' ]
name: Tests for Java ${{ matrix.Java }}
steps:
- uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Run tests
run: |
set -eux
./mill __.publishLocal
./mill -ikj1 --disable-ticker testExamples
publish-sonatype:
if: github.repository == 'com-lihaoyi/cask' && contains(github.ref, 'refs/tags/')
3 changes: 1 addition & 2 deletions .mill-version
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
0.11.11

0.12.0
198 changes: 198 additions & 0 deletions build.mill
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
package build

import mill._, scalalib._, scalajslib._, publish._
import mill.scalalib.api.ZincWorkerUtil

import $packages._
import $file.ci.upload
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.0`
import $ivy.`com.github.lolgab::mill-mima::0.0.23`
import de.tobiasroeser.mill.vcs.version.VcsVersion

val scala213 = "2.13.10"
val scala212 = "2.12.17"
val scala3 = "3.2.2"
val scalaJS = "1.13.0"
val communityBuildDottyVersion = sys.props.get("dottyVersion").toList

val scalaVersions = List(scala212, scala213, scala3) ++ communityBuildDottyVersion

trait CaskModule extends CrossScalaModule with PublishModule{
def isScala3 = ZincWorkerUtil.isScala3(crossScalaVersion)

def publishVersion = VcsVersion.vcsState().format()

def pomSettings = PomSettings(
description = artifactName(),
organization = "com.lihaoyi",
url = "https://github.com/com-lihaoyi/cask",
licenses = Seq(License.MIT),
versionControl = VersionControl.github("com-lihaoyi", "cask"),
developers = Seq(
Developer("lihaoyi", "Li Haoyi","https://github.com/lihaoyi")
)
)
}

trait CaskMainModule extends CaskModule {
def ivyDeps = T{
Agg(
ivy"io.undertow:undertow-core:2.3.10.Final",
ivy"com.lihaoyi::upickle:3.0.0"
) ++
Agg.when(!isScala3)(ivy"org.scala-lang:scala-reflect:$crossScalaVersion")
}

def compileIvyDeps = Agg.when(!isScala3)(ivy"com.lihaoyi:::acyclic:0.3.6")
def scalacOptions = Agg.when(!isScala3)("-P:acyclic:force").toSeq
def scalacPluginIvyDeps = Agg.when(!isScala3)(ivy"com.lihaoyi:::acyclic:0.3.6")

object test extends ScalaTests with TestModule.Utest{
def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.8.1",
ivy"com.lihaoyi::requests::0.8.0"
)
}
def moduleDeps = Seq(cask.util.jvm(crossScalaVersion))
}

object cask extends Cross[CaskMainModule](scalaVersions) {
object util extends Module {
trait UtilModule extends CaskModule with PlatformScalaModule{
def ivyDeps = Agg(
ivy"com.lihaoyi::sourcecode:0.3.0",
ivy"com.lihaoyi::pprint:0.8.1",
ivy"com.lihaoyi::geny:1.0.0"
)
}

object jvm extends Cross[UtilJvmModule](scalaVersions)
trait UtilJvmModule extends UtilModule {
def ivyDeps = super.ivyDeps() ++ Agg(
ivy"com.lihaoyi::castor::0.3.0",
ivy"org.java-websocket:Java-WebSocket:1.5.3"
)
}

object js extends Cross[UtilJsModule](scala213)
trait UtilJsModule extends UtilModule with ScalaJSModule {
def scalaJSVersion = scalaJS
def ivyDeps = super.ivyDeps() ++ Agg(
ivy"com.lihaoyi::castor::0.3.0",
ivy"org.scala-js::scalajs-dom::2.4.0"
)
}
}
}

trait LocalModule extends CrossScalaModule{
override def millSourcePath = super.millSourcePath / "app"
def moduleDeps = Seq(cask(crossScalaVersion))
}



def zippedExamples = T {
val vcsState = VcsVersion.vcsState()

val releaseTag = vcsState.lastTag.getOrElse("")
val label = vcsState.format()

val examples = Seq(
build.example.compress.millSourcePath,
build.example.compress2.millSourcePath,
build.example.compress3.millSourcePath,
build.example.cookies.millSourcePath,
build.example.decorated.millSourcePath,
build.example.decorated2.millSourcePath,
build.example.endpoints.millSourcePath,
build.example.formJsonPost.millSourcePath,
build.example.httpMethods.millSourcePath,
build.example.minimalApplication.millSourcePath,
build.example.minimalApplication2.millSourcePath,
build.example.redirectAbort.millSourcePath,
build.example.scalatags.millSourcePath,
build.example.staticFiles.millSourcePath,
build.example.staticFiles2.millSourcePath,
build.example.todo.millSourcePath,
build.example.todoApi.millSourcePath,
build.example.todoDb.millSourcePath,
build.example.twirl.millSourcePath,
build.example.variableRoutes.millSourcePath,
build.example.queryParams.millSourcePath,
build.example.websockets.millSourcePath,
build.example.websockets2.millSourcePath,
build.example.websockets3.millSourcePath,
build.example.websockets4.millSourcePath,
)

for (example <- examples) yield {
val f = T.ctx().dest
val last = example.last + "-" + label
os.copy(example, f / last)
os.copy(T.workspace / ".mill-version", f / last / ".mill-version")
os.write.over(f / last / "mill", os.read(T.workspace / "mill"))
os.proc("chmod", "+x", f / last / "mill").call(f / last)
os.move(f / last / "package.mill", f / last / "build.mill")
os.write.over(
f / last / "build.mill",
os.read(f / last / "build.mill")
.replaceAll("package build.*", "package build")
.replaceAll("def moduleDeps =.*", "")
.replaceAll("app =>", "")
.replaceFirst(
"object app extends.*\ntrait AppModule extends CrossScalaModule(.*)\\{",
s"object app extends ScalaModule $$1\\{\n def scalaVersion = \"${scala213}\"")
.replaceFirst(
"def ivyDeps = Agg\\[Dep\\]\\(",
"def ivyDeps = Agg(\n ivy\"com.lihaoyi::cask:" + releaseTag + "\","
)
)

os.zip(f / s"$last.zip", Seq(f / last))
PathRef(f / s"$last.zip")
}
}

def testExamples() = T.command{

for(example <- zippedExamples()){
println("Testing " + example.path.last)
val base = T.dest / example.path.baseName
os.unzip(example.path, base)
os.perms.set(base / "mill", "rwxrwxrwx")
os.write.over(
base / "build.mill",
os.read(base / "build.mill").replaceAll(
"ivy\"com.lihaoyi::cask:.*\"",
s"""ivy"com.lihaoyi::cask:${VcsVersion.vcsState().format()}""""
)
)
os.proc("./mill", "app.test").call(cwd = base, stdout = os.Inherit)
}
}

def uploadToGithub() = T.command{
val vcsState = VcsVersion.vcsState()

val authKey = T.env.apply("AMMONITE_BOT_AUTH_TOKEN")
val releaseTag = vcsState.lastTag.getOrElse("")
val label = vcsState.format()
if (releaseTag == label) {
requests.post(
"https://api.github.com/repos/com-lihaoyi/cask/releases",
data = ujson.write(
ujson.Obj(
"tag_name" -> releaseTag,
"name" -> releaseTag
)
),
headers = Seq("Authorization" -> s"token $authKey")
)
}

for(example <- zippedExamples()){

upload.apply(example.path, releaseTag, example.path.last, authKey)
}
}
267 changes: 0 additions & 267 deletions build.sc

This file was deleted.

1 change: 1 addition & 0 deletions ci/package.mill
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package build.ci
2 changes: 1 addition & 1 deletion ci/upload.sc → ci/upload.mill
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env amm
package build.ci

import $ivy.`com.lihaoyi::os-lib:0.8.1`

18 changes: 18 additions & 0 deletions example/compress/package.mill
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package build.example.compress
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{

def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.8.1",
ivy"com.lihaoyi::requests::0.8.0",
)
}
}
18 changes: 18 additions & 0 deletions example/compress2/package.mill
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package build.example.compress2
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{

def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.8.1",
ivy"com.lihaoyi::requests::0.8.0",
)
}
}
14 changes: 0 additions & 14 deletions example/compress3/build.sc

This file was deleted.

18 changes: 18 additions & 0 deletions example/compress3/package.mill
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package build.example.compress3
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{

def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.8.1",
ivy"com.lihaoyi::requests::0.8.0",
)
}
}
14 changes: 0 additions & 14 deletions example/cookies/build.sc

This file was deleted.

4 changes: 4 additions & 0 deletions example/compress/build.sc → example/cookies/package.mill
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package build.example.cookies
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{
14 changes: 0 additions & 14 deletions example/decorated/build.sc

This file was deleted.

18 changes: 18 additions & 0 deletions example/decorated/package.mill
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package build.example.decorated
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{

def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.8.1",
ivy"com.lihaoyi::requests::0.8.0",
)
}
}
14 changes: 0 additions & 14 deletions example/decorated2/build.sc

This file was deleted.

18 changes: 18 additions & 0 deletions example/decorated2/package.mill
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package build.example.decorated2
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{

def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.8.1",
ivy"com.lihaoyi::requests::0.8.0",
)
}
}
14 changes: 0 additions & 14 deletions example/endpoints/build.sc

This file was deleted.

18 changes: 18 additions & 0 deletions example/endpoints/package.mill
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package build.example.endpoints
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{

def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.8.1",
ivy"com.lihaoyi::requests::0.8.0",
)
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package build.example.formJsonPost
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package build.example.httpMethods
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{
14 changes: 0 additions & 14 deletions example/minimalApplication/build.sc

This file was deleted.

18 changes: 18 additions & 0 deletions example/minimalApplication/package.mill
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package build.example.minimalApplication
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{

def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.8.1",
ivy"com.lihaoyi::requests::0.8.0",
)
}
}
14 changes: 0 additions & 14 deletions example/minimalApplication2/build.sc

This file was deleted.

18 changes: 18 additions & 0 deletions example/minimalApplication2/package.mill
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package build.example.minimalApplication2
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{

def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.8.1",
ivy"com.lihaoyi::requests::0.8.0",
)
}
}
1 change: 1 addition & 0 deletions example/package.mill
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package build.example
14 changes: 0 additions & 14 deletions example/queryParams/build.sc

This file was deleted.

18 changes: 18 additions & 0 deletions example/queryParams/package.mill
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package build.example.queryParams
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{

def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.8.1",
ivy"com.lihaoyi::requests::0.8.0",
)
}
}
14 changes: 0 additions & 14 deletions example/redirectAbort/build.sc

This file was deleted.

18 changes: 18 additions & 0 deletions example/redirectAbort/package.mill
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package build.example.redirectAbort
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{

def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.8.1",
ivy"com.lihaoyi::requests::0.8.0",
)
}
}
4 changes: 4 additions & 0 deletions example/scalatags/build.sc → example/scalatags/package.mill
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package build.example.scalatags
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
ivy"com.lihaoyi::scalatags:0.12.0"
)
2 changes: 1 addition & 1 deletion example/staticFiles/app/src/StaticFiles.scala
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ object StaticFiles extends cask.MainRoutes{
}

@cask.staticFiles("/static/file")
def staticFileRoutes() = "app/resources/cask"
def staticFileRoutes() = "resources/cask"

@cask.staticResources("/static/resource")
def staticResourceRoutes() = "cask"
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
package build.example.staticFiles
import mill._, scalalib._

trait AppModule extends CrossScalaModule{
object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{ app =>

def forkWorkingDir = build.millSourcePath
def moduleDeps = Seq(build.cask(crossScalaVersion))

def forkWorkingDir = app.millSourcePath
def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{
@@ -12,7 +16,9 @@ trait AppModule extends CrossScalaModule{
ivy"com.lihaoyi::requests::0.8.0",
)

def forkWorkingDir = build.millSourcePath
def forkWorkingDir = app.millSourcePath

def testSandboxWorkingDir = false

// redirect this to the forked `test` to make sure static file serving works
def testLocal(args: String*) = T.command{
2 changes: 1 addition & 1 deletion example/staticFiles2/app/src/StaticFiles2.scala
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ object StaticFiles2 extends cask.MainRoutes{
}

@cask.staticFiles("/static/file", headers = Seq("Cache-Control" -> "max-age=31536000"))
def staticFileRoutes() = "app/resources/cask"
def staticFileRoutes() = "resources/cask"

@cask.decorators.compress
@cask.staticResources("/static/resource")
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
package build.example.staticFiles2
import mill._, scalalib._

trait AppModule extends CrossScalaModule{
object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{ app =>

def forkWorkingDir = build.millSourcePath
def moduleDeps = Seq(build.cask(crossScalaVersion))

def forkWorkingDir = app.millSourcePath
def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{
@@ -12,7 +16,9 @@ trait AppModule extends CrossScalaModule{
ivy"com.lihaoyi::requests::0.8.0",
)

def forkWorkingDir = build.millSourcePath
def forkWorkingDir = app.millSourcePath

def testSandboxWorkingDir = false

// redirect this to the forked `test` to make sure static file serving works
def testLocal(args: String*) = T.command{
4 changes: 4 additions & 0 deletions example/todo/build.sc → example/todo/package.mill
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package build.example.todo
import mill._, scalalib._

object app extends Cross[AppModule](build.scala213)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
ivy"org.xerial:sqlite-jdbc:3.42.0.0",
ivy"com.lihaoyi::scalasql:0.1.0",
14 changes: 0 additions & 14 deletions example/todoApi/build.sc

This file was deleted.

4 changes: 4 additions & 0 deletions example/compress2/build.sc → example/todoApi/package.mill
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package build.example.todoApi
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{
4 changes: 4 additions & 0 deletions example/todoDb/build.sc → example/todoDb/package.mill
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package build.example.todoDb
import mill._, scalalib._

object app extends Cross[AppModule](build.scala213)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
ivy"org.xerial:sqlite-jdbc:3.42.0.0",
ivy"com.lihaoyi::scalasql:0.1.0",
5 changes: 4 additions & 1 deletion example/twirl/build.sc → example/twirl/package.mill
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package build.example.twirl
import mill._, scalalib._
import $ivy.`com.lihaoyi::mill-contrib-twirllib:`

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule with mill.twirllib.TwirlModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def twirlScalaVersion = "2.13.10"
def twirlVersion = "1.5.1"

14 changes: 0 additions & 14 deletions example/variableRoutes/build.sc

This file was deleted.

18 changes: 18 additions & 0 deletions example/variableRoutes/package.mill
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package build.example.variableRoutes
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{

def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.8.1",
ivy"com.lihaoyi::requests::0.8.0",
)
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package build.example.websockets
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package build.example.websockets2
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package build.example.websockets3
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package build.example.websockets4
import mill._, scalalib._

object app extends Cross[AppModule](build.scalaVersions)
trait AppModule extends CrossScalaModule{

def moduleDeps = Seq(build.cask(crossScalaVersion))

def ivyDeps = Agg[Dep](
)
object test extends ScalaTests with TestModule.Utest{
6 changes: 4 additions & 2 deletions mill
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
set -e

if [ -z "${DEFAULT_MILL_VERSION}" ] ; then
DEFAULT_MILL_VERSION=0.11.6
DEFAULT_MILL_VERSION=0.11.12
fi

if [ -z "$MILL_VERSION" ] ; then
@@ -53,7 +53,9 @@ if [ -z "$MILL_MAIN_CLI" ] ; then
fi

MILL_FIRST_ARG=""
if [ "$1" = "--bsp" ] || [ "$1" = "-i" ] || [ "$1" = "--interactive" ] || [ "$1" = "--no-server" ] || [ "$1" = "--repl" ] || [ "$1" = "--help" ] ; then

# first arg is a long flag for "--interactive" or starts with "-i"
if [ "$1" = "--bsp" ] || [ "${1#"-i"}" != "$1" ] || [ "$1" = "--interactive" ] || [ "$1" = "--no-server" ] || [ "$1" = "--repl" ] || [ "$1" = "--help" ] ; then
# Need to preserve the first position of those listed options
MILL_FIRST_ARG=$1
shift

0 comments on commit 4414c1b

Please sign in to comment.