summaryrefslogtreecommitdiff
path: root/build.sc
diff options
context:
space:
mode:
authorrockjam <5min4eq.unity@gmail.com>2017-12-10 23:33:46 +0300
committerNikolay Tatarinov <5min4eq.unity@gmail.com>2017-12-20 01:17:16 +0300
commit9d19d740c5b387704e08fb89412b8318549a4fc5 (patch)
tree203c7ede2212c916195a82c2cf6578e9c755de7b /build.sc
parent6a7f6cf910362cadf6b39f8c0795c46745e08742 (diff)
downloadmill-9d19d740c5b387704e08fb89412b8318549a4fc5.tar.gz
mill-9d19d740c5b387704e08fb89412b8318549a4fc5.tar.bz2
mill-9d19d740c5b387704e08fb89412b8318549a4fc5.zip
Add Sonatypype publishing;
now you can publish your module with `mill run MyModule.publish --credentials $SONATYPE_CREDENTIALS --gpgPassphrase $GPG_PASSPHRASE`
Diffstat (limited to 'build.sc')
-rwxr-xr-xbuild.sc28
1 files changed, 20 insertions, 8 deletions
diff --git a/build.sc b/build.sc
index a7444926..922db522 100755
--- a/build.sc
+++ b/build.sc
@@ -1,9 +1,23 @@
import ammonite.ops._
import coursier.maven.MavenRepository
import mill._
-import mill.scalaplugin._
+import mill.scalaplugin._, publish._
import mill.modules.Jvm.createAssembly
+trait MillPublishModule extends PublishModule {
+ def publishVersion = "0.0.1"
+
+ def publishWithFullScalaVersion = true
+
+ def pomSettings = PomSettings(
+ organization = "com.lihaoyi",
+ description = publishName(),
+ developers = Seq(Developer("lihaoyi", "Li Haoyi", "https://github.com/lihaoyi/mill")),
+ licenses = Seq(License("MIT License", "https://spdx.org/licenses/MIT.html#licenseText")),
+ scm = SCM("https://github.com/lihaoyi/mill", "scm:git:https://github.com/lihaoyi/mill.git"),
+ url = "https://github.com/lihaoyi/mill"
+ )
+}
object CompilerPlugin extends SbtScalaModule{
def scalaVersion = "2.12.4"
@@ -40,9 +54,11 @@ trait MillModule extends SbtScalaModule{ outer =>
}
}
-object Core extends MillModule {
+object Core extends MillModule with MillPublishModule {
def projectDeps = Seq(CompilerPlugin)
+ def publishName = "mill-core"
+
def compileIvyDeps = Seq(
Dep.Java("org.scala-lang", "scala-reflect", scalaVersion())
)
@@ -72,11 +88,6 @@ object Core extends MillModule {
PathRef(dest)
}
}
-
- override def organization = "com.lihaoyi"
- override def name = "mill"
- override def version = "0.0.1"
- override def useFullScalaVersionForPublish = true
}
val bridgeVersions = Seq("2.10.6", "2.11.8", "2.11.11", "2.12.3", "2.12.4")
@@ -106,7 +117,8 @@ val bridges = for(crossVersion <- mill.define.Cross(bridgeVersions:_*)) yield ne
)
}
-object ScalaPlugin extends MillModule {
+object ScalaPlugin extends MillModule with MillPublishModule {
+ def publishName = "mill-scala"
def projectDeps = Seq(Core)
def basePath = pwd / 'scalaplugin