diff --git a/itest/src/simple/build.sc b/itest/src/simple/build.sc index 3172361..d8431b2 100644 --- a/itest/src/simple/build.sc +++ b/itest/src/simple/build.sc @@ -64,6 +64,14 @@ trait CrossScalaJSNative extends CrossPlatform { def verify(ev: Evaluator) = T.command { `no-native`("3.3.0").jvm.compile() + locally { + val result = ev.evalOrThrow()(normal.jvm.artifactName) + assert( + result == "normal", + s"Wrong artifactName: $result" + ) + } + locally { val result = ev.evalOrThrow()(core("3.3.0").jvm.artifactName) assert( diff --git a/mill-crossplatform/src/com/github/lolgab/mill/crossplatform/CrossPlatform.scala b/mill-crossplatform/src/com/github/lolgab/mill/crossplatform/CrossPlatform.scala index fa3277b..d0a0031 100644 --- a/mill-crossplatform/src/com/github/lolgab/mill/crossplatform/CrossPlatform.scala +++ b/mill-crossplatform/src/com/github/lolgab/mill/crossplatform/CrossPlatform.scala @@ -17,7 +17,7 @@ trait CrossPlatform extends Cross.Module[String] with DynamicModule { ) private[crossplatform] protected def myArtifactNameParts: Seq[String] = - millModuleSegments.parts.init + millModuleSegments.parts CrossPlatform.checkMillVersion() def moduleDeps: Seq[CrossPlatform] = Seq.empty @@ -159,6 +159,7 @@ trait CrossPlatform extends Cross.Module[String] with DynamicModule { trait CrossPlatformCrossScalaModule extends CrossScalaModule with CrossPlatformScalaModule { + override def artifactNameParts = container.myArtifactNameParts.init override def crossValue: String = throw new Exception( """CrossPlatformCrossScalaModule defines `def crossValue: String` only because it's required by CrossScalaModule (defined in Cross.Module[String]). |You shouldn't need to use it directly. If you see this message please report a bug at https://github.com/lolgab/mill-crossplatform/issues/new""".stripMargin