Marc Knaup
05/09/2019, 2:11 PMexclude
or the attributes
block from my dependencies?
https://github.com/fluidsonic/fluid-json/blob/master/annotation-processor/build.gradle.kts#L18
`./gradlew fluid json exampleskaptKotlin`:Marc Knaup
05/09/2019, 2:12 PMMaven publication 'default' contains dependencies that cannot be represented in a published pom file.
- com.github.fluidsonic:fluid-stdlib-jvm:0.9.4 declared with Gradle attributes
h0tk3y
05/27/2019, 4:31 PMkapt
configuration misses the attributes to choose the appropriate variant of the MPP library (it definitely needs the jvm-runtime
one). As a workaround, you can set the attribute on the configuration, not the dependency:
configurations.getByName("kapt") {
attributes.attribute(Usage.USAGE_ATTRIBUTE, objects().named(Usage::class.java, "java-runtime"))
}
h0tk3y
05/27/2019, 4:32 PMMarc Knaup
05/27/2019, 4:32 PMh0tk3y
05/27/2019, 4:37 PMKirill Zhukov
08/09/2019, 12:27 AM> Cannot choose between the following variants of com.squareup.wire:wire-runtime:3.0.0-rc01:
- jvm-api
- jvm-runtime
- metadata-api
In this case I need jvm-runtime
but I think setting that in configuration messes up Dagger configuration in the same module somehow…Kirill Zhukov
08/09/2019, 12:27 AM> Unable to find a matching variant of com.google.dagger:dagger-compiler:2.24:
- Variant 'compile' capability com.google.dagger:dagger-compiler:2.24:
- Incompatible attribute:
- Required org.gradle.usage 'jvm-runtime' and found incompatible value 'java-api'.
Kirill Zhukov
08/09/2019, 12:34 AM"java-runtime"
same as "jvm-runtime"
?Kirill Zhukov
08/09/2019, 12:34 AM"java-runtime"
in Usage 🙂Kirill Zhukov
08/09/2019, 12:34 AMplastiv
08/14/2019, 8:53 AMsubprojects { subProject ->
subProject.configurations.all { configuration ->
// Workaround for kapt bug with MPP dependencies
// <https://youtrack.jetbrains.com/issue/KT-31641>
// <https://youtrack.jetbrains.com/issue/KT-33206>
if (name.contains('kapt')) {
attributes.attribute(Usage.USAGE_ATTRIBUTE, subProject.objects.named(Usage.class, Usage.JAVA_RUNTIME))
}
}
}