Thread
#multiplatform
    Rohan Maity

    Rohan Maity

    3 years ago
    How Can I publish the multi lib to bintray ?
    Currently I can think of configuring publishing tasks differently for JVM , JS. But what about Native headers files ?
    Dominaezzz

    Dominaezzz

    3 years ago
    Header files? Do you mean klibs?
    adev_one

    adev_one

    3 years ago
    You can apply
    maven-publish
    plugin
    plugins {
        id("org.jetbrains.kotlin.multiplatform")
        id("maven-publish")
    }
    Then set up publishing info
    project.name = "artifact-name" // default is module name
    group = "com.example"
    version = "0.1.0"
    
    publishing {
        repositories {
            maven {
                url = REPO_URL + '/' + REPO_KEY
                credentials {
                    username REPO_USERNAME
                    password REPO_ENCRYPTED_PASSWORD
                }
            }
        }
    }
    And in terminal:
    ./gradlew :artifact-name:publish
    Native artifact will be published as
    com.example:artifact-name.native:0.1.0
    Rohan Maity

    Rohan Maity

    3 years ago
    currently module are like
    commonMain
    ,
    jvamMain
    ,
    linuxMain
    . How would I do for this. Do I have replace
    artifact-name
    with each of these
    Dominaezzz

    Dominaezzz

    3 years ago
    You replace
    artifact-name
    with the name of your project. All the targets (main) will be published.
    Rohan Maity

    Rohan Maity

    3 years ago
    Let me try !!
    Tobi

    Tobi

    3 years ago
    Rohan Maity

    Rohan Maity

    3 years ago
    what is encrypted password ?
    a

    addamsson

    3 years ago
    have you tried jitpack?
    Rohan Maity

    Rohan Maity

    3 years ago
    nope
    a

    addamsson

    3 years ago
    i'd give it a try
    bintray is notoriously sketchy
    jitpack is much easier to set up
    Rohan Maity

    Rohan Maity

    3 years ago
    I will give it shot
    a

    addamsson

    3 years ago
    if you don't put your stuff into maven central then it it doesn't matter where you put it
    Rohan Maity

    Rohan Maity

    3 years ago
    I dont follow
    There is gradle task
    install
    do i have to write it on my own ?
    Tobi

    Tobi

    3 years ago
    If you use the gradle file I linked above you just need to run
    mavenPublish bintrayUpload
    this will first generate the publications and then upload them to bintray. Just make sure to apply both plugins
    maven-publish
    and
    bintray
    . You can also first perform a
    dryRun
    (https://github.com/bintray/gradle-bintray-plugin/blob/master/README.md#Plugin_DSL) to see whether all artifacts are included and all names are correct.
    Rohan Maity

    Rohan Maity

    3 years ago
    * What went wrong:
    Some problems were found with the configuration of task ':bintrayUpload'.
    > No value has been specified for property 'apiKey'.
    > No value has been specified for property 'packageName'.
    > No value has been specified for property 'repoName'.
    > No value has been specified for property 'user'.
    I am facing this issue even though I gave tthe user and key'
    Tobi

    Tobi

    3 years ago
    Can you share your gradle script?
    Rohan Maity

    Rohan Maity

    3 years ago
    I have refractored my project. just like the mentioned repo. I will share it asap.
    russhwolf

    russhwolf

    3 years ago
    One thing to note if you’re using a configuration similar to what I have in Multiplatform Settings, is that it uses a special Jetbrains-published version of the bintray plugin, which I learned from studying the publishing configs for some of the Jetbrains libraries. You can see that here https://github.com/russhwolf/multiplatform-settings/blob/master/build.gradle
    Note both the repository
    maven { url '<https://dl.bintray.com/jetbrains/kotlin-native-dependencies>' }
    as well as the dependency
    classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4-jetbrains-3"
    I also read from a file called
    keys.properties
    which isn’t checked in but has the format
    bintrayUser=...
    bintrayKey=...
    Rohan Maity

    Rohan Maity

    3 years ago
    @russhwolf could I DM you regarding different problem but related to Multi-platform ?
    russhwolf

    russhwolf

    3 years ago
    Sure, if you like.
    Rohan Maity

    Rohan Maity

    3 years ago
    my
    bintrayUpload
    task ran successfully But I recieved this skipping message. I think none of files uplafed
    > Task :KParser:bintrayUpload
    Skipping upload for missing file '/home/thelimitbreaker/KParser/KParser/build/libs/KParser-js-0.0.1-sources.jar'.
    Skipping upload for missing file '/home/thelimitbreaker/KParser/KParser/build/libs/KParser-js-0.0.1.jar'.
    Skipping upload for missing file '/home/thelimitbreaker/KParser/KParser/build/publications/js/module.json'.
    Skipping upload for missing file '/home/thelimitbreaker/KParser/KParser/build/publications/js/pom-default.xml'.
    Skipping upload for missing file '/home/thelimitbreaker/KParser/KParser/build/libs/KParser-jvm-0.0.1-sources.jar'.
    Skipping upload for missing file '/home/thelimitbreaker/KParser/KParser/build/libs/KParser-jvm-0.0.1.jar'.
    Skipping upload for missing file '/home/thelimitbreaker/KParser/KParser/build/publications/jvm/module.json'.
    Skipping upload for missing file '/home/thelimitbreaker/KParser/KParser/build/publications/jvm/pom-default.xml'.
    Skipping upload for missing file '/home/thelimitbreaker/KParser/KParser/build/publications/kotlinMultiplatform/module.json'.
    Skipping upload for missing file '/home/thelimitbreaker/KParser/KParser/build/publications/kotlinMultiplatform/pom-default.xml'.
    Skipping upload for missing file '/home/thelimitbreaker/KParser/KParser/build/libs/KParser-linux-0.0.1-sources.jar'.
    Skipping upload for missing file '/home/thelimitbreaker/KParser/KParser/build/classes/kotlin/linux/main/KParser.klib'.
    Skipping upload for missing file '/home/thelimitbreaker/KParser/KParser/build/publications/linux/module.json'.
    Skipping upload for missing file '/home/thelimitbreaker/KParser/KParser/build/publications/linux/pom-default.xml'.
    Skipping upload for missing file '/home/thelimitbreaker/KParser/KParser/build/libs/KParser-metadata-0.0.1-sources.jar'.
    Skipping upload for missing file '/home/thelimitbreaker/KParser/KParser/build/libs/KParser-metadata-0.0.1.jar'.
    Skipping upload for missing file '/home/thelimitbreaker/KParser/KParser/build/publications/metadata/module.json'.
    Skipping upload for missing file '/home/thelimitbreaker/KParser/KParser/build/publications/metadata/pom-default.xml'.
    s

    serebit

    3 years ago
    @addamsson What do you mean by bintray being “sketchy”?
    a

    addamsson

    3 years ago
    I was just referring to the growing reports of sketchy software which is being deployed to bintray
    as opposed to Maven Central
    s

    serebit

    3 years ago
    Ah, okay. It seems as though they have fixed this, at least:
    Update 2: Bintray has now published a full incident report detailing the events, their remediation efforts, and apologizing for the incident again.
    a

    addamsson

    3 years ago
    👍