peekandpoke
10/13/2020, 8:53 AMmbonnin
10/13/2020, 8:56 AM~/.gradle/gradle.properties
to see if they're matchingpeekandpoke
10/13/2020, 8:56 AM./gradlew --version
------------------------------------------------------------
Gradle 6.6.1
------------------------------------------------------------
Build time: 2020-08-25 16:29:12 UTC
Revision: f2d1fb54a951d8b11d25748e4711bec8d128d7e3
Kotlin: 1.3.72
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.8 compiled on May 10 2020
JVM: 1.8.0_265 (Oracle Corporation 25.265-b01)
OS: Linux 5.4.0-7642-generic amd64
mbonnin
10/13/2020, 8:59 AMgradle.properties
peekandpoke
10/13/2020, 9:00 AMmbonnin
10/13/2020, 9:01 AMpeekandpoke
10/13/2020, 9:01 AMmbonnin
10/13/2020, 9:02 AMpeekandpoke
10/13/2020, 9:03 AMafterEvaluate {
project.publishing.publications.filterIsInstance<MavenPublication>().forEach {
it.groupId = group as String
if (it.name.contains("kotlinMultiplaform")) {
it.artifactId = project.name
} else {
it.artifactId = "${project.name}-${it.name}"
}
}
}
The wrong piece here is to rename the kotlinMultiplatform
. What we have now is to treat the metadata
like this:
afterEvaluate {
project.publishing.publications.filterIsInstance<MavenPublication>().forEach {
it.groupId = group as String
if (it.name.contains("metadata")) {
it.artifactId = project.name
} else {
it.artifactId = "${project.name}-${it.name}"
}
}
}
And now finally everything is fine.mbonnin
10/13/2020, 1:34 PM