ziv kesten
05/13/2024, 6:15 AMjava.lang.NoClassDefFoundError: Failed resolution of: Lorg/koin/core/component/KoinComponent;
my library module gradle uses koin with version control
implementation(libs.koin.android)
i publish the module to an aar and i included koin in my proguard rules
-keep class org.koin.core.** { *; }
-keep interface org.koin.core.** { *; }
Is it problematic to use dependencies in my library? i dont want the consuming app to know about my internal use of koin, they may be using any or no DI in their appziv kesten
05/13/2024, 2:24 PMpublishing {
publications {
println("Available components:")
project(":core").components.forEach {
println(it.name)
}
create<MavenPublication>("release") {
artifact("$buildDir/outputs/aar/${project.name}-release.aar")
groupId = "com.onestep.android"
artifactId = "core"
version = project.extra["baseVersionName"] as String
}
}
repositories {
maven {
url = uri("${project.buildDir}/repo")
}
}
}
ziv kesten
05/15/2024, 5:51 AMpom
block to my publishing script on gradle.build.kts
pom {
withXml {
val dependenciesNode = asNode().appendNode("dependencies")
configurations["api"].allDependencies.forEach {
val dependencyNode = dependenciesNode.appendNode("dependency")
dependencyNode.appendNode("groupId", it.group)
dependencyNode.appendNode("artifactId", it.name)
dependencyNode.appendNode("version", it.version)
dependencyNode.appendNode("scope", "compile") // "compile" for API, "runtime" for implementation
}
}
}