Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish maven artifact #13

Closed
andreas-mausch opened this issue Nov 9, 2018 · 11 comments
Closed

Publish maven artifact #13

andreas-mausch opened this issue Nov 9, 2018 · 11 comments

Comments

@andreas-mausch
Copy link
Contributor

andreas-mausch commented Nov 9, 2018

So new projects can just use kotlin-libui as a normal dependency

See #7

@msink
Copy link
Owner

msink commented Nov 11, 2018

Sure, but I think this should wait for Kotlin 1.3.10 or maybe even 1.3.20.

Now it is a bit rough on edges.

@msink
Copy link
Owner

msink commented Nov 13, 2018

Well, in Kotlin 1.3.10 some bugs we're fixed, https://youtrack.jetbrains.com/issue/KT-27803

So now publishing to bintray should work, with some tricks - Gradle must be 4.7 (it is),
'gradle-bintray-plugin' should be '1.8.2-SNAPSHOT' from maven { url 'https://dl.bintray.com/jetbrains/kotlin-native-dependencies' }

But I have very little free time this week for experiments, so if interested - go on :)

@msink
Copy link
Owner

msink commented Nov 23, 2018

Published, should work like this:

repositories {
    ...
    maven { url "https://dl.bintray.com/msink/kotlin-native" }
}

kotlin {
    ...
    sourceSets {
        windowsMain {
            kotlin.srcDir('src/nativeMain/kotlin')
            dependencies {
                implementation 'com.github.msink:libui-windows:alpha4.1-2'
            }
        }
        linuxMain {
            kotlin.srcDir('src/nativeMain/kotlin')
            dependencies {
                implementation 'com.github.msink:libui-linux:alpha4.1-2'
            }
        }
        macosxMain {
            kotlin.srcDir('src/nativeMain/kotlin')
            dependencies {
                implementation 'com.github.msink:libui-macosx:alpha4.1-2'
            }
        }
    }
}

Still didn't figure out how to publish it as true multiplatform library, for using as

    implementation 'com.github.msink:libui:alpha4.1-2'

@msink
Copy link
Owner

msink commented Nov 24, 2018

Asked JetBrains developers: JetBrains/kotlin-native#2372

@msink
Copy link
Owner

msink commented Nov 26, 2018

Well, issue with multiplatform library resolved, so this almost works.

See template project https://github.com/msink/hello-libui

On Linux and on MacOSX it should work already, on Windows - only if you have built something by Kotlin/Native on this computer, on Appveyor it fails.
Issue: JetBrains/kotlin-native#2421

@msink
Copy link
Owner

msink commented Nov 27, 2018

And before it will be published to jcenter or mavenCentral - what version numbering scheme should be used?

I'm not sure.

@andreas-mausch
Copy link
Contributor Author

Good news with the publishing!

Just to share some thoughts for the numbering scheme: Imo you should not align it to the libui version, because you might want to do changes, while the libui version remains the same, and vice versa.

It should probably be alpha, as long as libui is.

So maybe something like 0.1.0 (at least this is what the semver FAQ suggests to start with).

My laptop works again (I broke it during the vacation), so I'm eager to check your changes.

@andreas-mausch
Copy link
Contributor Author

For the windows issue: Maybe the dependsOn is the problem:
tasks.compileKotlinNative.dependsOn compileWindowsResources

We can find out which task downloads msys2-mingw-w64-x86_64-gcc-7.3.0-clang-llvm-lld-6.0.1 and call compileWindowsResources after. So replace compileKotlinNative by something else.

@msink
Copy link
Owner

msink commented Nov 27, 2018

I tried - seems that there isn't such gradle task.
But maybe JetBrains developers know better.

@msink
Copy link
Owner

msink commented Nov 28, 2018

Done.

@msink msink closed this as completed Nov 28, 2018
@msink
Copy link
Owner

msink commented Nov 29, 2018

And to jcenter() too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants