Shan

    Shan

    1 year ago
    Hello all. Is there a way to change the project name kmpp uses as the artifact ID for maven publishing? I have a format like this
    root
    |___core
         |__src
             |__commonMain
             |__jvmMain //etc
         |__build.gradle.kts
    |___otherModule
         |__src
            |__commonMain
            |__jvmMain //ec
         |__ build.gradle.kts
    |__settings.gradle.kts //root project name set here
    |__gradle.properties
    It's defaulting to
    core-jvm
    /
    core-metadata
    etc. right now for the artifact ID, but i'd like all of the generated artifact IDs to be
    foo-jvm
    /
    foo-metadata
    etc. I have been setting them all individually but feel like there might be a better way to just set that parameter once somewhere in the build script.
    a

    adk

    1 year ago
    Does
    name="foo"
    at the top level of your build.gradle.kts not do the trick?
    b

    Benjamin Charais

    1 year ago
    I'm not entirely sure about how it will be inherited across the modules, I'd have to test, but in settings.gradle you should be able to set root project name
    rootProject.name = "foo"
    Though, I am not convinced that will work due to the modules you have set up, so looking at the publish you should be able to modify the group and artifact name following this link: https://docs.gradle.org/current/userguide/publishing_maven.html#sec:identity_values_in_the_generated_pom