gradle-native
gradle-native copied to clipboard
Demonstrate how to consume static linkage variant of a dual-linkage library
🎉 🎉 🎉 Thanks @ljacomet for helping nailing the right semantic for solving this use case.

The code should look like this:
library {
dependencies {
api(project(':list')) {
attributes { attribute(Attribute.of("org.gradle.native.linkage", Linkage), Linkage.STATIC) }
}
}
}
But because of issue https://github.com/gradle/gradle-native/issues/1053, it needs to look like this:
dependencies {
api(project(':list')) {
attributes { attribute(Attribute.of("org.gradle.native.linkage", Linkage), Linkage.STATIC) }
}
}
Unfortunately, when going through the Project#getDependencies()
container, it will make it a bit more complicated when dealing with variants as you will have to know the variant name for the dependency to configure.