Mendess
06/27/2022, 1:25 PM-android
suffix and this ruins the build system. For example I have my-module-core
and my-module-foo
that depends on core, these get published under com.example:my-module-foo-android:1.0.0
. Which would be fine but when I try to pull this artifact in an android app I get this error: Could not find 'com.example:my-module-core:1.0.0'
, this I guess means that my-module-foo-android
is expecting something without the suffixMatt Nelson
06/27/2022, 3:21 PMkotlin-android
plugin to your android app?Matt Nelson
06/27/2022, 3:28 PMmy-module-foo
containing pointer to the -android
variant)?Mendess
06/27/2022, 3:51 PMMatt Nelson
06/27/2022, 4:04 PMMendess
06/27/2022, 4:05 PMMatt Nelson
06/27/2022, 4:05 PMencoding-base32
dir, then the 1.1.3
dir shows all the jars, javadocs, etc.
The one we wanna look at is encoding-base32-1.1.3-kotlin-tooling-metadata.json
Matt Nelson
06/27/2022, 4:06 PMMatt Nelson
06/27/2022, 4:07 PMcom.example:my-foo-module:1.0.0
, it will pull down that module, check the available platformType
, and then provide you with the appropriate -android
variant.Mendess
06/27/2022, 4:07 PM~/.m2/repository/com/example/
I only have *-android
folders, so I guess that means I don't have the metadataMatt Nelson
06/27/2022, 4:08 PM./gradlew tasks | grep "publish"
and see if you have something that relates to publishing the kotlin metadata.Mendess
06/27/2022, 4:10 PMMendess
06/27/2022, 4:10 PMMatt Nelson
06/27/2022, 4:10 PMpublishKotlinMultiplatformPublicationTo*
Matt Nelson
06/27/2022, 4:11 PMMatt Nelson
06/27/2022, 4:12 PM./gradlew publishToMavenLocal
Mendess
06/27/2022, 4:15 PMpublishToMavelLocal
, was calling something else. This fixed it but I've hit another issueMendess
06/27/2022, 4:16 PMExecution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class com.example.client.BuildConfig found in the following modules: multiplatform-sdk-core-debug-runtime-debug (com.example:multiplatform-sdk-core-android:25.0.0), multiplatform-sdk-full-debug-runtime-debug (com.example:multiplatform-sdk-full-android:25.0.0) and multiplatform-sdk-listening-debug-runtime-debug (com.example:multiplatform-sdk-listening-android:25.0.0)
Mendess
06/27/2022, 4:16 PMMatt Nelson
06/27/2022, 4:58 PMAndroidManifest
the com.example
to something else, like com.mendess
. Will need to create the new dirs and move some classes so the package
updates accordingly.Mendess
06/27/2022, 5:03 PMMatt Nelson
06/27/2022, 5:20 PMdependencies {
implementation(project(":my-module-foo"))
implementation("com.example:my-foo-module:1.0.0")
}
If so, just comment out the project
one after publishing to Maven Local.Mendess
06/27/2022, 5:26 PM