Jeff Tycz
05/23/2021, 1:06 AMreleaseImplementation 'io.github.tyczj:myLib-android:0.X.X@aar'
debugImplementation 'io.github.tyczj:myLib-android-debug:0.X.X@aar'
What do I have to do to be able to add the dependency like one would for basically every other KMM or Android library?
like this is what I am looking for
implementation 'io.github.tyczj:myLib-android:0.X.X
russhwolf
05/23/2021, 3:03 AMmaven-publish
plugin. Docs here if it helps https://kotlinlang.org/docs/mpp-publish-lib.html#publish-an-android-libraryJeff Tycz
05/23/2021, 12:08 PMrusshwolf
05/23/2021, 1:16 PMmatchingFallbacks = listOf("release", "debug")
to your consuming app, does it help?Jeff Tycz
05/23/2021, 1:36 PMrusshwolf
05/23/2021, 1:36 PMJeff Tycz
05/23/2021, 1:42 PMrusshwolf
05/23/2021, 1:43 PMJeff Tycz
05/23/2021, 1:49 PMpublishLibraryVariants("release", "debug", "staging")
russhwolf
05/23/2021, 1:49 PMJeff Tycz
05/23/2021, 2:26 PMFailed to resolve: Lumberjack-android-1.0.2-samplessourcesWhen I do a build I get this gradle error
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not resolve io.github.tyczj.lumberjack:Lumberjack-android:1.0.2.
Required by:
project :app
> No matching variant of io.github.tyczj.lumberjack:Lumberjack-android:1.0.2 was found. The consumer was configured to find a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
- Variant 'commonMainMetadataElements-published' capability io.github.tyczj.lumberjack:Lumberjack-android:1.0.2:
- Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed a runtime of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'
- Other compatible attribute:
- Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
- Variant 'metadataApiElements-published' capability io.github.tyczj.lumberjack:Lumberjack-android:1.0.2:
- Incompatible because this component declares a usage of 'kotlin-metadata' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed a runtime of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'
- Other compatible attribute:
- Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
- Variant 'releaseApiElements-published' capability io.github.tyczj.lumberjack:Lumberjack-android:1.0.2 declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
- Incompatible because this component declares an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'
- Variant 'releaseRuntimeElements-published' capability io.github.tyczj.lumberjack:Lumberjack-android:1.0.2 declares a runtime of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
- Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'