11import mill ._ , scalalib ._ , scalajslib ._ , scalanativelib ._ , publish ._
2- import $ivy .`de.tototec::de.tobiasroeser.mill.vcs.version_mill0.9: 0.1.1 `
2+ import $ivy .`de.tototec::de.tobiasroeser.mill.vcs.version:: 0.1.4 `
33import de .tobiasroeser .mill .vcs .version .VcsVersion
4- import $ivy .`com.github.lolgab::mill-mima_mill0.9: 0.0.4 `
4+ import $ivy .`com.github.lolgab::mill-mima:: 0.0.9 `
55import com .github .lolgab .mill .mima ._
66
77val dottyVersions = sys.props.get(" dottyVersion" ).toList
88
9- val scalaVersions = " 2.11.12" :: " 2.12.13" :: " 2.13.4" :: " 3.0.0 " :: dottyVersions
10- val scala2Versions = scalaVersions.filter(_.startsWith( " 2. " ))
9+ val scala2VersionsAndDotty = " 2.11.12" :: " 2.12.13" :: " 2.13.4" :: dottyVersions
10+ val scala30 = " 3.0.0 "
1111
1212val scalaJSVersions = for {
13- scalaV <- scalaVersions
13+ scalaV <- scala30 :: scala2VersionsAndDotty
1414 scalaJSV <- Seq (" 0.6.33" , " 1.5.1" )
1515 if scalaV.startsWith(" 2." ) || scalaJSV.startsWith(" 1." )
1616} yield (scalaV, scalaJSV)
1717
1818val scalaNativeVersions = for {
19- scalaV <- scala2Versions
20- scalaNativeV <- Seq (" 0.4.0 " )
19+ scalaV <- " 3.1.0 " :: scala2VersionsAndDotty
20+ scalaNativeV <- Seq (" 0.4.3 " )
2121} yield (scalaV, scalaNativeV)
2222
2323trait SourcecodeModule extends PublishModule with Mima {
@@ -32,10 +32,7 @@ trait SourcecodeModule extends PublishModule with Mima {
3232 organization = " com.lihaoyi" ,
3333 url = " https://github.com/lihaoyi/sourcecode" ,
3434 licenses = Seq (License .MIT ),
35- scm = SCM (
36- " git://github.com/lihaoyi/sourcecode.git" ,
37- " scm:git://github.com/lihaoyi/sourcecode.git"
38- ),
35+ versionControl = VersionControl .github(owner = " com-lihaoyi" , repo = " sourcecode" ),
3936 developers = Seq (
4037 Developer (" lihaoyi" , " Li Haoyi" , " https://github.com/lihaoyi" )
4138 )
@@ -85,8 +82,7 @@ trait SourcecodeTestModule extends ScalaModule {
8582}
8683
8784object sourcecode extends Module {
88- val dottyVersion = sys.props.get(" dottyVersion" )
89- object jvm extends Cross [JvmSourcecodeModule ](scalaVersions : _* )
85+ object jvm extends Cross [JvmSourcecodeModule ](scala30 :: scala2VersionsAndDotty : _* )
9086 class JvmSourcecodeModule (val crossScalaVersion : String )
9187 extends SourcecodeMainModule with ScalaModule with SourcecodeModule {
9288
@@ -119,6 +115,15 @@ object sourcecode extends Module {
119115
120116 def scalaNativeVersion = crossScalaNativeVersion
121117
118+ override def docJar =
119+ if (crossScalaVersion.startsWith(" 2." )) super .docJar
120+ else T {
121+ val outDir = T .ctx().dest
122+ val javadocDir = outDir / " javadoc"
123+ os.makeDir.all(javadocDir)
124+ mill.api.Result .Success (mill.modules.Jvm .createJar(Agg (javadocDir))(outDir))
125+ }
126+
122127 object test extends SourcecodeTestModule with ScalaNativeModule {
123128 def scalaVersion = crossScalaVersion
124129 def scalaNativeVersion = crossScalaNativeVersion
0 commit comments