11// -*- mode: scala -*-
22
3- // Dont use sonatype's maven-central as it timeouts in travis.
4- // interp.repositories() =
5- // List(coursierapi.Repository("https://jcenter.bintray.com"))
6- // @
7-
83import mill ._ , scalalib ._ , publish ._
94
10- object fastparse_ext extends ScalaModule with PublishModule {
11- def publishVersion = os.read(os.pwd / " VERSION" ).trim
12-
13- // use versions installed from .tool-versions
14- def scalaVersion = scala.util.Properties .versionNumberString
15- def millVersion = System .getProperty(" MILL_VERSION" )
5+ val crossVersions = Seq (" 2.13.2" , " 2.12.11" )
166
17- def artifactName = " fastparse_ext"
18-
19- def m2 = T {
20- val pa = publishArtifacts()
21- val wd = T .ctx().dest
22- val ad = pa.meta.group.split(" \\ ." ).foldLeft(wd)((a, b) => a / b) / pa.meta.id / pa.meta.version
23- os.makeDir.all(ad)
24- pa.payload.map { case (f,n) => os.copy(f.path, ad/ n) }
25- }
7+ object fastparse_ext extends Cross [FastparseExt ](crossVersions : _* )
8+ class FastparseExt (val crossScalaVersion : String ) extends CrossScalaModule with PublishModule {
9+ def publishVersion = os.read(os.pwd / " VERSION" ).trim
10+ def artifactName = " fastparse_ext"
2611
2712 def pomSettings = PomSettings (
2813 description = " Utility extensions for fastparse" ,
@@ -38,7 +23,7 @@ object fastparse_ext extends ScalaModule with PublishModule {
3823 override def ivyDeps = Agg (ivy " com.lihaoyi::fastparse:2.3.0 " )
3924
4025 object test extends Tests {
41- def ivyDeps = Agg (ivy " com.lihaoyi::utest::0.7.2 " )
26+ def ivyDeps = Agg (ivy " com.lihaoyi::utest::0.7.2 " )
4227 def testFrameworks = Seq (" utest.runner.Framework" )
4328 }
4429}
0 commit comments