Regarding the problem above. The following snippet...
# multiplatform
i
Regarding the problem above. The following snippet helps to avoid the library names clash. It uses group+name of a Gradle module as a library name, making this name more or less unique. cc @zalewski.se @alex009 UPD: We also recommend library authors who use 1.3.70/1.3.71 to rebuild and republish their libraries with this snippet. It will protect users of your library from potential name clashes. Kotlin DSL:
👏 1
1
👍 5
Goovy DSL. Note that you must have the Kotlin Gradle plugin in the classpath of the root buildscript.
👍 1
👏 1
m
nice snippet guys, thank you 👍
z
Awesome! Thanks for sharing 👍
r
@ilya.matveev will this be the norm moving forward or will a fix be provided in a later version?
i
We are going to fix this at the compiler/Gradle side in 1.4 (see https://youtrack.jetbrains.com/issue/KT-36721)
z
Just a small addition to this: It’s possible for gradle to build the modules correctly but still some of the modules can’t be imported into iOS project. For example if you create a
network
framework, you will get an error while trying to import it, as there is already a
Network
framework. Amazing package module name collisions 😕
r
@ilya.matveev shouldn't this be fix for
1.3.7x
instead of waiting for 1.4? Even with a workaround, this feels like a breaking change.
i
@raniejade The fully correct fix for this problem changes the library naming scheme and making this in 1.3.7x may be more breaking than the problem itself because in this case libraries compiled by 1.3.7x may become incompatible with libraries compiled by 1.3.70.
😞 1