I am struggling a lot with gradle-metadata feature...
# multiplatform
a
I am struggling a lot with gradle-metadata feature. I have a module (this one: http://npm.mipt.ru:8081/artifactory/webapp/#/artifacts/browse/tree/General/gradle-dev-local/hep/dataforge/dataforge-meta) which is compiled and deployed with
enableFeaturePreview("GRADLE_METADATA")
. And then I have a library which is also build with gradle meta. According to documentation, all I need is to declare it in the
commonMain
block of mpp, and I will automatically get dependencies for all branches. It does not work. I have to write platform-specific dependencies for all platforms and additional metadata for common. What am I doing wrong?
m
The
.module
files are missing in the repo. How do you publish?
a
I published via artifactory plugin. So this is the reason. I thought that artifactory just does not show them. Everything is fine on local maven repository
Yeah, for some reason, it just does not deploy module file
l
I stopped using artifactory and use a second bintray repo not synced to jcenter for dev versions (that I used to call snapshots)
a
Well, the bintray publication is also a problem. I failed to deploy with parameters I have. For artifactory it at least deploys something
l
For bintray, it works for me for this library: https://github.com/LouisCAD/Splitties
m
Where is it hidden? That looks complicated.
l
@Marc Knaup Are you asking Alexander or me? If me, what is "it"?
m
Your Bintray code setup
a
It seems to be using manual bintray deployment. Not the thing I want to think about.
m
Yeah the Bintray plugin works quite well 🤔
a
Not for mpp. I get
Could not get unknown property 'conf' for task ':dataforge-context:bintrayUpload' of type com.jfrog.bintray.gradle.tasks.BintrayUploadTask
and standard workaround, I found does not help
m
what's the Gradle configuration?
m
hmm, no idea if the difference fixes the cause but mine works differently: https://github.com/fluidsonic/fluid-library/blob/master/sources/FluidLibraryVariantConfiguration.kt#L115
why do you set the publications inside the Bintray task 🤔
I don't use Kotlin/Native though which may be relevant here
a
It is a recommended remedy for this type of error
I do not use it either. Just copied solution from somewhere
It worked for kmath yet I by mistake published all artifacts withe same name
@Marc Knaup Your modification of workaround seems to be working
👍 1
But is still does not publish module files 😞 I will check publication block then
a
yeah, i've included it, but files with
module
extension are still missing. Probably publications are not configured properly
l
@Marc Knaup The bintray uploading code is in buildSrc, in the BintrayUpload.kt file. Everything publishing and dependencies related is in buildSrc for reuse across modules.
👍 1