Hi, does anyone knows the reason / workaround for ...
# gradle
r
Hi, does anyone knows the reason / workaround for this issue? -> https://youtrack.jetbrains.net/issue/KT-26834
Copy code
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
@stepango Has the same issue. Not sure did he solve this or not
h
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
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