martmists
07/08/2024, 1:01 PMExecution failed for task ':mewsic-plugin-api:compileDebugKotlinAndroid'.
> Error while evaluating property 'friendPathsSet$kotlin_gradle_plugin_common' of task ':mewsic-plugin-api:compileDebugKotlinAndroid'.
> Could not resolve all files for configuration ':mewsic-plugin-api:debugCompileClasspath'.
> Could not resolve com.google.guava:guava:33.2.1-android.
Required by:
project :mewsic-plugin-api
> Cannot find a version of 'com.google.guava:guava' that satisfies the version constraints:
Dependency path 'dev.uninit:mewsic-plugin-api:1.0.0' --> 'com.google.guava:guava:33.2.1-android'
Dependency path 'dev.uninit:mewsic-plugin-api:1.0.0' --> 'com.google.guava:guava:33.2.1-jre'
Constraint path 'dev.uninit:mewsic-plugin-api:1.0.0' --> 'com.google.guava:guava:{strictly 33.2.1-android}' because of the following reason: version resolved in configuration ':mewsic-plugin-api:debugRuntimeClasspath' by consistent resolution
With gradle code (in kotlin { sourceSets {
)
androidMain {
dependencies {
implementation("com.google.guava:guava:${Versions.guava}-android")
}
}
appMain { // Shared between androidMain and desktopMain
dependencies {
compileOnly("com.google.guava:guava:${Versions.guava}-jre") // CompileOnly because the artifact differs between Android and Desktop
}
}
desktopMain {
dependencies {
implementation("com.google.guava:guava:${Versions.guava}-jre")
}
}
Michael Krussel
07/08/2024, 1:18 PMappMain
since the commonizer will find all the common APIs in the child source sets.martmists
07/08/2024, 1:23 PMappMain
results in guava's MapMaker being unresolved in that sourceset.tapchicoma
07/08/2024, 2:14 PMtapchicoma
07/08/2024, 2:15 PMmartmists
07/08/2024, 2:17 PMmartmists
07/08/2024, 2:20 PMplugins {
kotlin("multiplatform") version "2.0.0"
}
kotlin {
androidTarget()
jvm("desktop")
sourceSets {
val appMain by creating {
dependencies {
compileOnly("com.google.guava:guava:33.2.1-jre")
}
}
androidMain {
dependsOn(appMain)
dependencies {
implementation("com.google.guava:guava:33.2.1-android")
}
}
val desktopMain by getting {
dependsOn(appMain)
dependencies {
implementation("com.google.guava:guava:33.2.1-jre")
}
}
}
}
tapchicoma
07/08/2024, 2:39 PMAdam S
07/09/2024, 3:01 PMAdam S
07/09/2024, 3:03 PM