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"
buildscript {
@ -24,7 +24,7 @@ repositories {
}
kotlin {
jvm("jvm8")
jvm()
sourceSets {
commonMain {
@ -35,9 +35,11 @@ kotlin {
api "com.soywiz.korlibs.klock:klock:$klockVersion"
}
}
jvm8Main {
jvmMain {
dependencies {
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_version=1.3.50
kotlin_version=1.3.60
kotlin_coroutines_version=1.3.2
gradle_bintray_plugin_version=1.8.4
klockVersion=1.7.3
project_bintray_repo=InsanusMokrassar
project_public_name=Krontab
project_public_description=It is analog of crontab util for Kotlin Coroutines
project_url=https://git.insanusmokrassar.com/InsanusMokrassar/krontab
project_vcs=https://git.insanusmokrassar.com/InsanusMokrassar/krontab.git
kotlin.incremental.multiplatform=true

View File

@ -1,51 +1,57 @@
apply plugin: 'maven-publish'
apply plugin: 'signing'
task javadocJar(type: Jar) {
archiveClassifier.set 'javadoc'
task javadocsJar(type: Jar) {
classifier = 'javadoc'
}
kotlin {
jvm("jvm8") {
mavenPublication {
groupId "${project.group}"
artifactId "${project.name}-jvm"
version "${project.version}"
artifact(javadocJar)
afterEvaluate {
project.publishing.publications.all {
// rename artifacts
groupId "${project.group}"
if (it.name.contains('kotlinMultiplatform')) {
artifactId = "${project.name}"
} else {
artifactId = "${project.name}-$name"
}
}
}
publishing {
publications {
jvm8 {
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name "${project_public_name}"
description "${project_public_description}"
url "${project_url}"
publications.all {
artifact javadocsJar
scm {
developerConnection "scm:git:[fetch=]${project_vcs}[push=]${project_vcs}"
url "${project_vcs}"
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
description "${project_public_description}"
name "${project_public_name}"
url "${project_url}"
scm {
developerConnection "scm:git:[fetch=]${project_vcs}[push=]${project_vcs}"
url "${project_vcs}"
}
developers {
developer {
id "InsanusMokrassar"
name "Ovsyannikov Alexey"
email "ovsyannikov.alexey95@gmail.com"
}
developers {
developer {
id "InsanusMokrassar"
name "Ovsyannikov Alexey"
email "ovsyannikov.alexey95@gmail.com"
}
developer {
id "mi-ast"
name "Michail Astafiev"
email "astaf65@gmail.com"
}
}
licenses {
license {
name "The Apache Software License, Version 2.0"
url "${project_url}/src/master/LICENSE"
distribution "repo"
}
licenses {
license {
name "The Apache Software License, Version 2.0"
url "${project_url}/src/master/LICENSE"
distribution "repo"
}
}
}
@ -55,5 +61,5 @@ publishing {
signing {
useGpgCmd()
sign publishing.publications.jvm8
sign(publishing.publications)
}

View File

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