update bintray publish scripts

This commit is contained in:
InsanusMokrassar 2019-11-20 01:36:10 +06:00
parent 4b7d7ce3b4
commit b2b17b1ad2
4 changed files with 60 additions and 52 deletions

View File

@ -1,4 +1,4 @@
project.version = "0.1.0" project.version = "0.1.1"
project.group = "com.insanusmokrassar" project.group = "com.insanusmokrassar"
buildscript { buildscript {
@ -24,7 +24,7 @@ repositories {
} }
kotlin { kotlin {
jvm("jvm8") jvm()
sourceSets { sourceSets {
commonMain { commonMain {
@ -35,9 +35,11 @@ kotlin {
api "com.soywiz.korlibs.klock:klock:$klockVersion" api "com.soywiz.korlibs.klock:klock:$klockVersion"
} }
} }
jvm8Main { jvmMain {
dependencies { dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
api "com.soywiz.korlibs.klock:klock:$klockVersion"
} }
} }
} }

View File

@ -1,12 +1,15 @@
kotlin.code.style=official kotlin.code.style=official
kotlin_version=1.3.50 kotlin_version=1.3.60
kotlin_coroutines_version=1.3.2 kotlin_coroutines_version=1.3.2
gradle_bintray_plugin_version=1.8.4 gradle_bintray_plugin_version=1.8.4
klockVersion=1.7.3 klockVersion=1.7.3
project_bintray_repo=InsanusMokrassar
project_public_name=Krontab project_public_name=Krontab
project_public_description=It is analog of crontab util for Kotlin Coroutines project_public_description=It is analog of crontab util for Kotlin Coroutines
project_url=https://git.insanusmokrassar.com/InsanusMokrassar/krontab project_url=https://git.insanusmokrassar.com/InsanusMokrassar/krontab
project_vcs=https://git.insanusmokrassar.com/InsanusMokrassar/krontab.git project_vcs=https://git.insanusmokrassar.com/InsanusMokrassar/krontab.git
kotlin.incremental.multiplatform=true

View File

@ -1,30 +1,32 @@
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply plugin: 'signing' apply plugin: 'signing'
task javadocJar(type: Jar) { task javadocsJar(type: Jar) {
archiveClassifier.set 'javadoc' classifier = 'javadoc'
} }
kotlin { afterEvaluate {
jvm("jvm8") { project.publishing.publications.all {
mavenPublication { // rename artifacts
groupId "${project.group}" groupId "${project.group}"
artifactId "${project.name}-jvm" if (it.name.contains('kotlinMultiplatform')) {
version "${project.version}" artifactId = "${project.name}"
} else {
artifact(javadocJar) artifactId = "${project.name}-$name"
} }
} }
} }
publishing { publishing {
publications { publications.all {
jvm8 { artifact javadocsJar
pom.withXml { pom.withXml {
asNode().children().last() + { asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST resolveStrategy = Closure.DELEGATE_FIRST
name "${project_public_name}"
description "${project_public_description}" description "${project_public_description}"
name "${project_public_name}"
url "${project_url}" url "${project_url}"
scm { scm {
@ -38,6 +40,11 @@ publishing {
name "Ovsyannikov Alexey" name "Ovsyannikov Alexey"
email "ovsyannikov.alexey95@gmail.com" email "ovsyannikov.alexey95@gmail.com"
} }
developer {
id "mi-ast"
name "Michail Astafiev"
email "astaf65@gmail.com"
}
} }
licenses { licenses {
@ -51,9 +58,8 @@ publishing {
} }
} }
} }
}
signing { signing {
useGpgCmd() useGpgCmd()
sign publishing.publications.jvm8 sign(publishing.publications)
} }

View File

@ -1,30 +1,27 @@
apply plugin: 'com.jfrog.bintray' apply plugin: 'com.jfrog.bintray'
ext {
projectBintrayDir = "${project.group}/".replace(".", "/") + "${project.name}/${project.version}"
}
apply from: "maven.publish.gradle" apply from: "maven.publish.gradle"
bintray { bintray {
user = project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER') user = project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER')
key = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : System.getenv('BINTRAY_KEY') key = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : System.getenv('BINTRAY_KEY')
publications = ["jvm8"]
filesSpec {
into projectBintrayDir
from signJvm8Publication
rename "pom.*\\.xml(.*)", "${project.name}-${project.version}.pom\$1"
rename "(.*)jvm8-(.*)", "\$1\$2"
}
pkg { pkg {
repo = 'InsanusMokrassar' repo = "$project_bintray_repo"
name = "${project.name}" name = "${project.name}"
vcsUrl = "${project_url}" vcsUrl = "${project_url}"
licenses = ['Apache-2.0'] licenses = ['Apache-2.0']
version { version {
name = "${project.version}" name = "${project.version}"
released = new Date() released = new Date()
vcsTag = name vcsTag = "${project.version}"
} }
} }
} }
bintrayUpload.doFirst {
publications = publishing.publications.collect {
it.name
}
}
bintrayUpload.dependsOn publishToMavenLocal