diff options
Diffstat (limited to 'scalalib')
4 files changed, 13 insertions, 5 deletions
diff --git a/scalalib/src/mill/scalalib/GenIdeaImpl.scala b/scalalib/src/mill/scalalib/GenIdeaImpl.scala index f71a7856..b4f77f16 100644 --- a/scalalib/src/mill/scalalib/GenIdeaImpl.scala +++ b/scalalib/src/mill/scalalib/GenIdeaImpl.scala @@ -26,6 +26,7 @@ object GenIdea extends ExternalModule { implicit def millScoptEvaluatorReads[T] = new mill.main.EvaluatorScopt[T]() lazy val millDiscover = Discover[this.type] } + object GenIdeaImpl { def apply(ctx: Log with Home, @@ -225,8 +226,9 @@ object GenIdeaImpl { Tuple2( ".idea"/"modules.xml", allModulesXmlTemplate( - for((path, mod) <- modules) - yield moduleName(path) + modules + .filter(!_._2.skipIdea) + .map { case (path, mod) => moduleName(path) } ) ), Tuple2( diff --git a/scalalib/src/mill/scalalib/JavaModule.scala b/scalalib/src/mill/scalalib/JavaModule.scala index b15e0bdb..15fa7264 100644 --- a/scalalib/src/mill/scalalib/JavaModule.scala +++ b/scalalib/src/mill/scalalib/JavaModule.scala @@ -527,6 +527,11 @@ trait JavaModule extends mill.Module with TaskModule { outer => def intellijModulePath: Path = millSourcePath def forkWorkingDir = T{ ammonite.ops.pwd } + + /** + * Skip Idea project file generation. + */ + def skipIdea: Boolean = false } trait TestModule extends JavaModule with TaskModule { diff --git a/scalalib/src/mill/scalalib/PublishModule.scala b/scalalib/src/mill/scalalib/PublishModule.scala index 0b7e52c8..5c567452 100644 --- a/scalalib/src/mill/scalalib/PublishModule.scala +++ b/scalalib/src/mill/scalalib/PublishModule.scala @@ -97,11 +97,11 @@ object PublishModule extends ExternalModule { def publishAll(sonatypeCreds: String, gpgPassphrase: String = null, - signed: Boolean = true, publishArtifacts: mill.main.Tasks[PublishModule.PublishData], release: Boolean = false, sonatypeUri: String = "https://oss.sonatype.org/service/local", - sonatypeSnapshotUri: String = "https://oss.sonatype.org/content/repositories/snapshots") = T.command { + sonatypeSnapshotUri: String = "https://oss.sonatype.org/content/repositories/snapshots", + signed: Boolean = true) = T.command { val x: Seq[(Seq[(Path, String)], Artifact)] = Task.sequence(publishArtifacts.value)().map{ case PublishModule.PublishData(a, s) => (s.map{case (p, f) => (p.path, f)}, a) diff --git a/scalalib/src/mill/scalalib/publish/SonatypeHttpApi.scala b/scalalib/src/mill/scalalib/publish/SonatypeHttpApi.scala index 927d4515..12defa93 100644 --- a/scalalib/src/mill/scalalib/publish/SonatypeHttpApi.scala +++ b/scalalib/src/mill/scalalib/publish/SonatypeHttpApi.scala @@ -36,7 +36,8 @@ class SonatypeHttpApi(uri: String, credentials: String) { ujson .read(response.body)("data") .arr - .find(profile => profile("name").str == groupId) + .find(profile => + groupId.split('.').startsWith(profile("name").str.split('.'))) .map(_("resourceURI").str.toString) resourceUri.getOrElse( |