-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add test with test modules * Update README and add example with tests * Update versions
- Loading branch information
Showing
6 changed files
with
150 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import $file.plugins | ||
|
||
import mill._ | ||
import mill.api.Result | ||
import mill.eval._ | ||
import mill.main.MainModule | ||
import mill.scalalib._ | ||
import mill.scalajslib._ | ||
import mill.scalanativelib._ | ||
import com.github.lolgab.mill.crossplatform._ | ||
|
||
trait Common extends ScalaModule { | ||
def scalaVersion = "3.3.1" | ||
} | ||
trait CommonJVM extends Common | ||
trait CommonJS extends Common with ScalaJSModule { | ||
def scalaJSVersion = "1.14.0" | ||
} | ||
trait CommonNative extends Common with ScalaNativeModule { | ||
def scalaNativeVersion = "0.4.16" | ||
} | ||
trait CommonTests extends TestModule.Munit { | ||
def ivyDeps = super.ivyDeps() ++ Agg( | ||
ivy"org.scalameta::munit::1.0.0-M10" | ||
) | ||
} | ||
object core extends CrossPlatform { | ||
trait Shared extends CrossPlatformScalaModule { | ||
trait SharedTests extends CommonTests | ||
} | ||
object jvm extends Shared with CommonJVM { | ||
object test extends ScalaTests with SharedTests | ||
} | ||
object js extends Shared with CommonJS { | ||
object test extends ScalaJSTests with SharedTests | ||
} | ||
object native extends Shared with CommonNative { | ||
object test extends ScalaNativeTests with SharedTests | ||
} | ||
} | ||
|
||
def verify(ev: Evaluator) = T.command { | ||
ev.evalOrThrow()(core.jvm.test.test()) | ||
ev.evalOrThrow()(core.js.test.test()) | ||
ev.evalOrThrow()(core.native.test.test()) | ||
|
||
() | ||
} |
Oops, something went wrong.