addamsson
11/04/2018, 6:16 PMkotlin-multiplatform
plugin?thevery
11/04/2018, 6:48 PMaddamsson
11/04/2018, 6:59 PMhallvard
11/04/2018, 10:22 PMmaven-publish
plugin, thus:
plugins {
id 'kotlin-multiplatform' version '1.3.0'
// id 'maven-publish' // cf. underneath
}
group("com.sannsyn")
version("2.0.0-SNAPSHOT")
// this line cannot appear *before* the group and version lines above ...
apply plugin: 'maven-publish'
... and further down in the gradle file:
publishing {
publications {
maven(MavenPublication) {
groupId project.group
artifactId project.name
}
}
...
}
josephivie
11/04/2018, 10:23 PMpublishToMavenLocal
. I don't know in particular how to configure it for Maven Central, but you might be able to do Bintray using the Bintray plugin.hallvard
11/04/2018, 10:26 PMpublishing
clause that I use looks like this:
publishing {
publications {
maven(MavenPublication) {
groupId project.group
artifactId project.name
}
}
repositories {
maven {
credentials {
username "usernameHere"
password "somethingSecret"
}
def releasesRepoUrl = "<https://mvn.host.com/repository/releases/>"
def snapshotsRepoUrl = "<https://mvn.host.com/repository/snapshots/>"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}
addamsson
11/05/2018, 10:37 AMmaven-publish
pluginhallvard
11/05/2018, 10:56 AMaddamsson
11/05/2018, 12:01 PMhallvard
11/05/2018, 12:20 PMaddamsson
11/05/2018, 4:01 PMhallvard
11/05/2018, 4:02 PMaddamsson
11/05/2018, 6:09 PM