Jonas Bark
07/08/2019, 2:45 PMval commonMain by getting {
dependencies {
//....
api("dependency-group:dependency:version")
}
}
When I'm trying to run the linkDebugTestIosX64
gradle task I'm getting this error:
e: Compilation failed: Cyclic dependency in library graph for: /Users/boni/Documents/Programmieren/Kotlin/StihlBusiness/StihlBusiness/build/classes/kotlin/iosX64/main/Library
* Source files: StoreTest2.kt
* Compiler version info: Konan: 1.3.1 / Kotlin: 1.3.40
* Output kind: PROGRAM
Is there a way to debug this to get better information?Sam
07/08/2019, 2:53 PMalexander.gorshenev
07/08/2019, 2:59 PMmanifest
file in your Library.klib
. .klib
-files are just zips. Look for depends=
in manifest
.
It seems like you've got a library dependent on a library with the same name. So if your library is called foo
and it has depends=foo
in manifest
then you get that message. The cycle can be longer, though, spanning several libraries.russhwolf
07/08/2019, 3:04 PMJonas Bark
07/08/2019, 3:30 PM-module-name
extraopts (it was visible in the depends line in the manifest). It was the same prefix that I added to the dependency - once I used another prefix it worked just fine!Patrick Jackson
07/24/2019, 2:46 PMJonas Bark
07/24/2019, 2:47 PMPatrick Jackson
07/24/2019, 2:47 PMPatrick Jackson
07/24/2019, 2:48 PMJonas Bark
07/24/2019, 2:49 PMcompilations["main"].extraOpts.addAll(listOf("-module-name", "SC"))
SC was already used by a dependency, so I changed it to something elsePatrick Jackson
07/24/2019, 2:51 PMJonas Bark
07/24/2019, 2:51 PMPatrick Jackson
07/24/2019, 3:03 PM`
kotlin {
targets {
fromPreset(iOSTarget, 'ios') {
compilations["main"].extraOpts.addAll(["-module-name", "MyName"])
}
}
`
Jonas Bark
07/24/2019, 3:04 PMPatrick Jackson
07/24/2019, 3:06 PMJonas Bark
07/24/2019, 3:08 PMJonas Bark
07/24/2019, 3:08 PMPatrick Jackson
07/24/2019, 3:29 PM