update bintray publish scripts

This commit is contained in:
InsanusMokrassar 2019-11-20 01:36:26 +06:00
parent a7de0817f8
commit 6a6f404381
6 changed files with 79 additions and 82 deletions

View File

@ -1,7 +1,7 @@
kotlin.code.style=official kotlin.code.style=official
kotlin_version=1.3.50 kotlin_version=1.3.60
kotlin_coroutines_version=1.3.1 kotlin_coroutines_version=1.3.2
kotlin_serialisation_runtime_version=0.13.0 kotlin_serialisation_runtime_version=0.14.0
klockVersion=1.7.3 klockVersion=1.7.3
uuidVersion=0.0.5 uuidVersion=0.0.5

View File

@ -1,6 +1,3 @@
project.version = "$project_public_version"
project.group = "$project_public_group"
buildscript { buildscript {
repositories { repositories {
mavenLocal() mavenLocal()
@ -15,8 +12,14 @@ buildscript {
} }
} }
apply plugin: 'kotlinx-serialization' plugins {
apply plugin: 'kotlin-multiplatform' id "org.jetbrains.kotlin.multiplatform" version "$kotlin_version"
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version"
}
project.version = "$project_public_version"
project.group = "$project_public_group"
apply from: "publish.gradle" apply from: "publish.gradle"
repositories { repositories {
@ -27,12 +30,12 @@ repositories {
} }
kotlin { kotlin {
jvm("jvm8") jvm()
sourceSets { sourceSets {
commonMain { commonMain {
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation kotlin('stdlib')
api "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$kotlin_coroutines_version" api "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$kotlin_coroutines_version"
api "org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$kotlin_serialisation_runtime_version" api "org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$kotlin_serialisation_runtime_version"
@ -40,10 +43,14 @@ kotlin {
api "com.benasher44:uuid:$uuidVersion" api "com.benasher44:uuid:$uuidVersion"
} }
} }
jvm8Main { jvmMain {
dependencies { dependencies {
implementation kotlin('stdlib-jdk8')
api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version" api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
api "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$kotlin_serialisation_runtime_version" api "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$kotlin_serialisation_runtime_version"
api "com.soywiz.korlibs.klock:klock:$klockVersion"
api "com.benasher44:uuid:$uuidVersion"
} }
} }
} }

View File

@ -1 +1,8 @@
project_vcs_base=https://git.insanusmokrassar.com/PostsSystem/PostsSystemCore project_public_name=PostsSystemCore
project_bintray_repo=InsanusMokrassar
project_url=https://git.insanusmokrassar.com/PostsSystem/PostsSystemCore
project_vcs=https://git.insanusmokrassar.com/PostsSystem/PostsSystemCore.git
kotlin.incremental.multiplatform=true

View File

@ -1,55 +1,57 @@
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 {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name "${project.name}-jvm"
description "${project_public_description}"
scm { pom.withXml {
developerConnection "scm:git:[fetch=]${project_vcs_base}/${project.name}.git[push=]ssh:git@github.com:insanusmokrassar/${project.name}.git" asNode().children().last() + {
url "${project_vcs_base}/${project.name}" 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"
} }
developer {
developers { id "mi-ast"
developer { name "Michail Astafiev"
id "InsanusMokrassar" email "astaf65@gmail.com"
name "Ovsyannikov Alexey"
email "ovsyannikov.alexey95@gmail.com"
}
developer {
id "mi-ast"
name "Michail Astafiev"
email "astaf65@gmail.com"
}
} }
}
licenses { licenses {
license { license {
name "The Apache Software License, Version 2.0" name "The Apache Software License, Version 2.0"
url "${project_vcs_base}/${project.name}/blob/master/LICENSE" url "${project_url}/src/master/LICENSE"
distribution "repo" distribution "repo"
}
} }
} }
} }
@ -59,5 +61,5 @@ 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_vcs_base}/${project.name}" 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

View File

@ -1,21 +1,5 @@
/*
* This settings file was generated by the Gradle 'init' task.
*
* The settings file is used to specify which projects to include in your build.
* In a single project build this file can be empty or even removed.
*
* Detailed information about configuring a multi-project build in Gradle can be found
* in the user guide at https://docs.gradle.org/4.4.1/userguide/multi_project_builds.html
*/
/*
// To declare projects as part of a multi-project build use the 'include' method
include 'shared'
include 'api'
include 'services:webservice'
*/
rootProject.name='postssystem' rootProject.name='postssystem'
include ':postssystem.core' include ':postssystem.core'
include ':postssystem.exposed' include ':postssystem.exposed'
enableFeaturePreview("GRADLE_METADATA") enableFeaturePreview("GRADLE_METADATA")