Thread
#multiplatform
    altavir

    altavir

    3 years ago
    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

    Marc Knaup

    3 years ago
    The
    .module
    files are missing in the repo. How do you publish?
    altavir

    altavir

    3 years ago
    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
    louiscad

    louiscad

    3 years ago
    I stopped using artifactory and use a second bintray repo not synced to jcenter for dev versions (that I used to call snapshots)
    altavir

    altavir

    3 years ago
    Well, the bintray publication is also a problem. I failed to deploy with parameters I have. For artifactory it at least deploys something
    louiscad

    louiscad

    3 years ago
    For bintray, it works for me for this library: https://github.com/LouisCAD/Splitties
    m

    Marc Knaup

    3 years ago
    Where is it hidden? That looks complicated.
    louiscad

    louiscad

    3 years ago
    @Marc Knaup Are you asking Alexander or me? If me, what is "it"?
    m

    Marc Knaup

    3 years ago
    Your Bintray code setup
    altavir

    altavir

    3 years ago
    It seems to be using manual bintray deployment. Not the thing I want to think about.
    m

    Marc Knaup

    3 years ago
    Yeah the Bintray plugin works quite well 🤔
    altavir

    altavir

    3 years ago
    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

    Marc Knaup

    3 years ago
    what's the Gradle configuration?
    m

    Marc Knaup

    3 years ago
    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
    altavir

    altavir

    3 years ago
    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
    But is still does not publish module files 😞 I will check publication block then
    altavir

    altavir

    3 years ago
    yeah, i've included it, but files with
    module
    extension are still missing. Probably publications are not configured properly
    louiscad

    louiscad

    3 years ago
    @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.