-
-
Notifications
You must be signed in to change notification settings - Fork 51
unresolved reference from gradle multiplatform build #16
Comments
Which is the |
`~/klock(master*) » ./gradlew --versionGradle 5.0Build time: 2018-11-26 11:48:43 UTC Kotlin DSL: 1.0.4 ~/klock(master*) » ./gradlew --console=plain -i clean build asdf@fido
FAILURE: Build failed with an exception.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. BUILD FAILED in 2s |
It looks klock uses the exterimental metadata publish mode: https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#experimental-metadata-publishing-mode I put enableFeaturePreview('GRADLE_METADATA') in settings.gradle. Now I'm getting: ~/klock(master*) » ./gradlew --console=plain -i build Initialized native services in: /Users/asdf/.gradle/native
FAILURE: Build failed with an exception.
|
When you tried I was trying gradle 5.0, but switched back to 4.7 again. The problem is that I export it using gradle 5.0 that uses metadata 0.4, you won't be able to use it along kotlinx.coroutines for now since it is published with metadata 0.3 and gradle 4.7. So your best bet is to stick to gradle 4.7 for now until an official solution is provided. |
Is there update about that? |
Kotlin 1.3.20 will support Gradle 4.8+ according to https://youtrack.jetbrains.com/issue/KT-29045. Building with Kotlin 1.3.20 eap 100 w/ klock 1.0.0 on the path produces the following:
|
Sorry for the delay. I will create a new version with Kotlin 1.3.20 and will update gradle version too. |
Just for the record: I have pushed a pre-release version using gradle 5.1.1 (metadata 0.4) and kotlin 1.3.20-eap-100: https://bintray.com/soywiz/soywiz/klock/1.1.0-eap-100 It seems to work just fine. So I will release it again for final Kotlin 1.3.20 when out. |
Should be fixed with #23 Also I have published 1.1.0: https://bintray.com/soywiz/soywiz/klock/1.1.0 Feel free to close if this is fixed already |
Are there any chances not to depend on this experimental feature? While klock is now usable again, having to enable |
@mschirmacher I have just released a version without metadata: |
@soywiz Awesome thank you! Unfortunately i think the common |
As far as I know the common suffix is called
Do not confuse -metadata that is how is called Kotlin common IR and in gradle (though it is a bit misleading), with gradle metadata that was used to determine the artifacts per platform with a .module file per platform describing the target artifacts |
When I add the "metadata" library to my common module I get this:
I'm simply defining this in my common module:
When I don't define that, everything builds fine, but I obviously don't have access to Klock in the common module then ( |
@soywiz thank you! |
@danthonywalker sorry for the delay. Not sure what happens to you. The only thing is to take into account is that So: commonMainApi "com.soywiz:klock-metadata:$klockVersion"
jvmMainApi "com.soywiz:klock-jvm:$klockVersion"
ksMainApi "com.soywiz:klock-js:$klockVersion" |
@soywiz Here's my EDIT: It appears commenting out |
Starting with |
Ah yes, 1.2.0 works. Sorry for the trouble! |
I'm not able to reference klock in a multiplatform gradle build. Not sure what I'm doing wrong. Here's a minimal example:
build.gradle:
src/commonMain/kotlin/main.kt
Gradle error:
The text was updated successfully, but these errors were encountered: