https://kotlinlang.org logo
Title
r

rpalcolea

09/20/2018, 8:04 PM
Hi, does anyone knows the reason / workaround for this issue? -> https://youtrack.jetbrains.net/issue/KT-26834
Required by:
      project :example-v8
   > Unable to find a matching variant of project :karibu-dsl-v8:
       - Variant 'apiElements':
           - Found org.gradle.usage 'java-api' but wasn't required.
           - Required org.jetbrains.kotlin.platform.type 'common' and found incompatible value 'jvm'.
       - Variant 'runtimeElements':
           - Found org.gradle.usage 'java-runtime-jars' but wasn't required.
           - Required org.jetbrains.kotlin.platform.type 'common' and found incompatible value 'jvm'.
when using kotlin 1.2.70 and gradle
g

gildor

09/21/2018, 2:07 AM
@stepango Has the same issue. Not sure did he solve this or not
h

h0tk3y

09/21/2018, 9:25 AM
The reason for this issue is that the configurations that are not supposed to get resolved in a single-platform Kotlin project are nevertheless resolved, most likely by a third party plugin. The
org.jetbrains.kotlin.platform.type
attribute is meant for Kotlin multiplatform projects, as are the configurations where it is set to
common
, the
<...>DependenciesMetadata
ones. You can try to mark those as
canBeResolved = false
. This is a bug that we are going to fix soon. It happens in 1.3-RC, too, but the final 1.3 update and the 1.2.72 patch will include the fix.
f

Fleshgrinder

09/24/2018, 6:47 PM
FYI I get this when applying the dependency locking according to the corresponding Gradle docs where they have the code example that shows how one should resolve all dependencies. No third party plugin involved: https://docs.gradle.org/4.10/userguide/dependency_locking.html#example_resolving_all_configurations