https://kotlinlang.org logo
j

jw

09/28/2018, 9:03 PM
how can I change the artifactId of artifacts in the new multiplatform module? it seems to use the project name and there's no way to override it except to manually set the artifactId on each publication which is error-prone because you have to manage the automatically-added suffixes yourself
o

orangy

09/28/2018, 9:12 PM
@h0tk3y
h

h0tk3y

09/28/2018, 9:39 PM
Doing it through the publications API is currently the only option. With 1.3-RC2 it is a little bit easier as you can configure a target's publication directly from the targets DSL with
target.mavenPublication { /* closure */ }
and calculate the suffix based on the target's name. An alternative is to set a different project name, this can be done in `settings.gradle`:
project(':foo').name = 'bar'
j

jw

09/28/2018, 11:55 PM
Oooh right I forgot it was mutable in the settings context. Thanks!