Big Chungus
10/16/2020, 12:53 PM@jetbrains
Could we have kotlin version added to gradle metadata attributes, please? This would be useful in determining library compatibilities.
Also would play a key role when consuming it and deciding which schema/attributes to expect, since those seem to be quite volatile between versionsRobert Jaros
10/16/2020, 3:06 PMlouiscad
10/16/2020, 3:48 PMBig Chungus
10/19/2020, 6:21 PMIlya Goncharov [JB]
10/20/2020, 8:23 AMdsavvinov
10/20/2020, 8:58 AMBig Chungus
10/20/2020, 9:39 AMkotlin.metadata.version
attribute which would reflect the kotlin version that produced the artifact. So in the future if you do choose to change the schema, people who are consuming it could just add anotheer processor implementation to their system and decide which processor to use by this attribute. My personal use case is this:
I'm writing a maven repo scanner that's looking for kotlin multiplatform libraries. To determine that, I'm depending on the following variant attributes in gradle metadata:
* org.jetbrains.kotlin.js.compiler
* org.jetbrains.kotlin.native.target
* org.jetbrains.kotlin.platform.type
Now since the available attributes or attribute names might change (as anything, really), it'd be good to have a single 100% stable attribute for kotlin version to indicate which shcema a given module file follows so that if you guys add/remove/change some of the attributes in the future, I could maintain backwards compatibility of my scanner by keeping old schema processor and just implementing another one to be used when kotlin version attribute is detected asHappy to discuss this further if you guys think it'd be useful info to make a decission.or even as semver blobx.y.z
1.4.*
Big Chungus
10/20/2020, 9:39 AMBig Chungus
10/20/2020, 9:41 AM$.component.attributes.kotlin.version
dsavvinov
10/26/2020, 8:31 AMmy particular case is not a matter of binary compatibility, but rather gradle metadata schema compatibilityAh, I see, sorry! That’s an interesting request, and indeed something we haven’t thought about thoroughly yet (mostly because not much people currently work directly with attributes schema). We’ll discuss that in the team
h0tk3y
10/26/2020, 10:04 AM.module
metadata format has such a place (or is extensible enough).
If it doesn't, it's still worth trying to introduce the attribute in a way that it doesn't affect variant-aware dependency resolution. Maybe we could add it as a unique attribute com.example.kotlin.version
(where com.example
is the component ID) – this way it should never be matched across different components, but still, there are possible clashes if the components don't have unique names.
Could you please describe what other data your repo scanner reads from a repository? Maybe there's some other place we could put the Kotlin publishing layout version.h0tk3y
10/26/2020, 10:08 AM.module
metadata format has this subtree, marked as optional:
"createdBy": {
"gradle": {
"version": "4.3",
"buildId": "abc123"
}
}
It would be nice to add createdBy.kotlin
there, but I'm not sure that's the intended use. I'll have to ask the Gradle team about that.
Another option is to add a non-default capability into the module that will never be requested by our tooling (and requesting it manually won't make any sense), and to put the publishing layout version to the capability variant's attributes.
`It is marked as optional, so it would be nice to addBig Chungus
10/26/2020, 10:39 AM"createdBy": {
"kotlin": {
"version": "1.4.20"
}
}
Does that clarify things for you?Big Chungus
10/26/2020, 10:42 AMh0tk3y
10/26/2020, 10:47 AMh0tk3y
10/26/2020, 10:53 AM