1
1
import 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 `
3
3
import 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 `
5
5
import com .github .lolgab .mill .mima ._
6
6
7
7
val dottyVersions = sys.props.get(" dottyVersion" ).toList
8
8
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 "
11
11
12
12
val scalaJSVersions = for {
13
- scalaV <- scalaVersions
13
+ scalaV <- scala30 :: scala2VersionsAndDotty
14
14
scalaJSV <- Seq (" 0.6.33" , " 1.5.1" )
15
15
if scalaV.startsWith(" 2." ) || scalaJSV.startsWith(" 1." )
16
16
} yield (scalaV, scalaJSV)
17
17
18
18
val scalaNativeVersions = for {
19
- scalaV <- scala2Versions
20
- scalaNativeV <- Seq (" 0.4.0 " )
19
+ scalaV <- " 3.1.0 " :: scala2VersionsAndDotty
20
+ scalaNativeV <- Seq (" 0.4.3 " )
21
21
} yield (scalaV, scalaNativeV)
22
22
23
23
trait SourcecodeModule extends PublishModule with Mima {
@@ -32,10 +32,7 @@ trait SourcecodeModule extends PublishModule with Mima {
32
32
organization = " com.lihaoyi" ,
33
33
url = " https://github.com/lihaoyi/sourcecode" ,
34
34
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" ),
39
36
developers = Seq (
40
37
Developer (" lihaoyi" , " Li Haoyi" , " https://github.com/lihaoyi" )
41
38
)
@@ -85,8 +82,7 @@ trait SourcecodeTestModule extends ScalaModule {
85
82
}
86
83
87
84
object 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 : _* )
90
86
class JvmSourcecodeModule (val crossScalaVersion : String )
91
87
extends SourcecodeMainModule with ScalaModule with SourcecodeModule {
92
88
@@ -119,6 +115,15 @@ object sourcecode extends Module {
119
115
120
116
def scalaNativeVersion = crossScalaNativeVersion
121
117
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
+
122
127
object test extends SourcecodeTestModule with ScalaNativeModule {
123
128
def scalaVersion = crossScalaVersion
124
129
def scalaNativeVersion = crossScalaNativeVersion
0 commit comments