diff options
author | Nathan Fischer <nfischer921@gmail.com> | 2019-04-04 14:29:47 -0700 |
---|---|---|
committer | Tobias Roeser <le.petit.fou@web.de> | 2019-04-05 08:53:42 +0200 |
commit | ce520f9a262e0f76dab432d1ff655b8e747d711a (patch) | |
tree | b3420ade639f87c9e9b704b51cc05dfe9ea58db5 /scalalib | |
parent | 30aef7442ebdfba721edfd63495f167c466bc21d (diff) | |
download | mill-ce520f9a262e0f76dab432d1ff655b8e747d711a.tar.gz mill-ce520f9a262e0f76dab432d1ff655b8e747d711a.tar.bz2 mill-ce520f9a262e0f76dab432d1ff655b8e747d711a.zip |
Documentation around artifact name for publishing
Added a line to the documentation on how to change the artifact id.
Updated the scaladoc on JavaModule to explain the difference between artifactName and artifactId.
Diffstat (limited to 'scalalib')
-rw-r--r-- | scalalib/src/JavaModule.scala | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scalalib/src/JavaModule.scala b/scalalib/src/JavaModule.scala index 82776b8a..75a0339d 100644 --- a/scalalib/src/JavaModule.scala +++ b/scalalib/src/JavaModule.scala @@ -524,10 +524,18 @@ trait JavaModule extends mill.Module with TaskModule { outer => } } - // publish artifact with name "mill_2.12.4" instead of "mill_2.12" - + /** + * Override this to change the published artifact id. + * For example, by default a scala module foo.baz might be published as foo-baz_2.12 and a java module would be foo-baz. + * Setting this to baz would result in a scala artifact baz_2.12 or a java artifact baz. + */ def artifactName: T[String] = millModuleSegments.parts.mkString("-") + /** + * The exact id of the artifact to be published. You probably don't want to override this. + * If you want to customize the name of the artifact, override artifactName instead. + * If you want to customize the scala version in the artifact id, see ScalaModule.artifactScalaVersion + */ def artifactId: T[String] = artifactName() def intellijModulePath: os.Path = millSourcePath |