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_version=1.3.50
kotlin_coroutines_version=1.3.1
kotlin_serialisation_runtime_version=0.13.0
kotlin_version=1.3.60
kotlin_coroutines_version=1.3.2
kotlin_serialisation_runtime_version=0.14.0
klockVersion=1.7.3
uuidVersion=0.0.5

View File

@ -1,6 +1,3 @@
project.version = "$project_public_version"
project.group = "$project_public_group"
buildscript {
repositories {
mavenLocal()
@ -15,8 +12,14 @@ buildscript {
}
}
apply plugin: 'kotlinx-serialization'
apply plugin: 'kotlin-multiplatform'
plugins {
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"
repositories {
@ -27,12 +30,12 @@ repositories {
}
kotlin {
jvm("jvm8")
jvm()
sourceSets {
commonMain {
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-serialization-runtime-common:$kotlin_serialisation_runtime_version"
@ -40,10 +43,14 @@ kotlin {
api "com.benasher44:uuid:$uuidVersion"
}
}
jvm8Main {
jvmMain {
dependencies {
implementation kotlin('stdlib-jdk8')
api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_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: '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.name}-jvm"
description "${project_public_description}"
publications.all {
artifact javadocsJar
scm {
developerConnection "scm:git:[fetch=]${project_vcs_base}/${project.name}.git[push=]ssh:git@github.com:insanusmokrassar/${project.name}.git"
url "${project_vcs_base}/${project.name}"
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"
}
developer {
id "mi-ast"
name "Michail Astafiev"
email "astaf65@gmail.com"
}
}
licenses {
license {
name "The Apache Software License, Version 2.0"
url "${project_vcs_base}/${project.name}/blob/master/LICENSE"
distribution "repo"
}
licenses {
license {
name "The Apache Software License, Version 2.0"
url "${project_url}/src/master/LICENSE"
distribution "repo"
}
}
}
@ -59,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_vcs_base}/${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

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'
include ':postssystem.core'
include ':postssystem.exposed'
enableFeaturePreview("GRADLE_METADATA")