Can anyone recommend me what I might have done wro...
# multiplatform
h
Can anyone recommend me what I might have done wrong publishing aar to Jfrog not adding dependencies used in shared project to pom file
Copy code
kotlin {

    android {
        publishLibraryVariants("release","debug")

        publishing {

            publications {
                create<MavenPublication>("aar") {
                    version = "1.0.6"
                    groupId = "Mobile-Shared"
                    artifactId = "shared"
                    artifact("$buildDir/outputs/aar/${project.name}-release.aar")
                }
            }
        }

    }
    iosX64()
    iosArm64()

    artifactory {
        clientConfig.isIncludeEnvVars = true
        setContextUrl("<https://amaas-eos-mw1.cec.lab.emc.com/artifactory/UnityCloud_Generic/android>")

        publish(delegateClosureOf<PublisherConfig> {
            repository(delegateClosureOf<DoubleDelegateWrapper> {
                setProperty("repoKey", "CloudIQ-Mobile-Shared")
                setProperty("username", "${articatofryUserName}")
                setProperty("password", "${articatofryPassword}")
                setProperty("maven", true)
            })
            defaults(delegateClosureOf<groovy.lang.GroovyObject> {
                invokeMethod("publications", "aar")
                setPublishPom(true)
                setProperty("publishArtifacts", true)
                setProperty("publishPom", true)
            })
        })
    }
b
Artifactory plugin doesn not work properly with gradle metadata. Use maven-publish plugin instead
o
you should add
from(components.getByName("kotlin"))
but changing artifact id gives you another error on the consumer side. https://kotlinlang.slack.com/archives/C3PQML5NU/p1641496805020900