louiscad
02/27/2019, 6:23 AMExecution failed for task ':modules:name-of-my-module:generateMetadataFileForJvmPublication'.
> org.jetbrains.kotlin.gradle.plugin.mpp.HierarchyAttributeContainer cannot be cast to org.gradle.api.internal.attributes.AttributeContainerInternal
(I also reported it here: https://youtrack.jetbrains.com/issue/KT-30158?project=kt)Dico
02/27/2019, 6:46 AMAlexey Belkov [JB]
02/27/2019, 8:20 AMribesg
02/27/2019, 9:11 AMlouiscad
02/27/2019, 9:13 AMDico
02/27/2019, 5:06 PMCannot change attributes of configuration ':capture-age:nativeApiElements' after it has been resolved
Which is caused by these lines when configuring a Jar
task to create a fat Jar:
for (file in configurations["jvmMainImplementation"]) {
}
Obviously, this wouldn't do anything. I'm just demonstrating that looping over the files causes the problem. Normally it would say something like "configuration jvmMainImplementation is not resolved" or something such, which is annoying, but I don't know what my native target has to do with this.afterEvaluate
block inserted by the MPP plugin runs.afterEvaluate
block, so I guess that solves it for now.dependsOn
metadataJarlouiscad
02/27/2019, 5:37 PMall { …}
for .gradle.kts
files, all(Action { this.something })
in `buildSrc`'s .kt
files, and matching
in both to handle things that can be added later in gradle's domain collections.Dico
02/27/2019, 5:38 PMlouiscad
02/27/2019, 5:40 PMDico
02/27/2019, 5:41 PMlouiscad
02/27/2019, 5:41 PMmatching
creates a filtered subset of that gradle domain collection.Dico
02/27/2019, 5:41 PMlouiscad
02/27/2019, 5:42 PMDico
02/27/2019, 5:42 PMConfiguration
?louiscad
02/27/2019, 7:47 PMsourceSets
.Dico
02/27/2019, 7:48 PM