refresh publish scripts

This commit is contained in:
InsanusMokrassar 2020-01-09 17:26:40 +06:00
parent e64054df13
commit 611be13e8f
7 changed files with 67 additions and 85 deletions

View File

@ -17,8 +17,8 @@ plugins {
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version" id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version"
} }
project.version = "$project_public_version" project.version = "0.1.1"
project.group = "$project_public_group" project.group = "com.insanusmokrassar"
apply from: "publish.gradle" apply from: "publish.gradle"

View File

@ -1,16 +1,3 @@
project_public_name=PostsSystemCore project_public_name=PostsSystemCore
project_public_license_name=Apache-2.0
project_public_license_fullname=The Apache Software License, Version 2.0
project_public_license_url=https://git.insanusmokrassar.com/PostsSystem/PostsSystemCore/src/master/LICENSE
project_public_version=0.1.1
project_public_group=com.insanusmokrassar
project_public_description=Core library for PostsSystem
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 kotlin.incremental.multiplatform=true

View File

@ -1,5 +1,4 @@
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply plugin: 'signing'
task javadocsJar(type: Jar) { task javadocsJar(type: Jar) {
classifier = 'javadoc' classifier = 'javadoc'
@ -25,41 +24,41 @@ publishing {
asNode().children().last() + { asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST resolveStrategy = Closure.DELEGATE_FIRST
description "${project_public_description}" description "Core library for PostsSystem"
name "${project_public_name}" name "PostsSystem Core"
url "${project_url}" url "https://git.insanusmokrassar.com/PostsSystem/PostsSystemCore"
scm { scm {
developerConnection "scm:git:[fetch=]${project_vcs}[push=]${project_vcs}" developerConnection "scm:git:[fetch=]https://git.insanusmokrassar.com/PostsSystem/PostsSystemCore.git[push=]https://git.insanusmokrassar.com/PostsSystem/PostsSystemCore.git"
url "${project_vcs}" url "https://git.insanusmokrassar.com/PostsSystem/PostsSystemCore.git"
} }
developers { developers {
developer {
id "InsanusMokrassar" developer {
name "Ovsyannikov Alexey" id "InsanusMokrassar"
email "ovsyannikov.alexey95@gmail.com" name "Ovsiannikov Aleksei"
} 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 { licenses {
license {
name "${project_public_license_fullname}" license {
url "${project_public_license_url}" name "Apache Software License 2.0"
distribution "repo" url "https://opensource.org/licenses/Apache-2.0"
} }
} }
} }
} }
} }
} }
signing {
useGpgCmd()
sign(publishing.publications)
}

View File

@ -6,14 +6,18 @@ 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')
pkg { pkg {
repo = "$project_bintray_repo" repo = "InsanusMokrassar"
name = "${project.name}" name = "${project.name}"
vcsUrl = "${project_url}" vcsUrl = "https://github.com/PostsSystem/PostsSystemCore"
licenses = ["${project_public_license_name}"] licenses = ["Apache-2.0"]
version { version {
name = "${project.version}" name = "${project.version}"
released = new Date() released = new Date()
vcsTag = "${project.version}" vcsTag = "${project.version}"
gpg {
sign = true
passphrase = project.hasProperty('signing.gnupg.passphrase') ? project.property('signing.gnupg.passphrase') : System.getenv('signing.gnupg.passphrase')
}
} }
} }
} }
@ -24,4 +28,4 @@ bintrayUpload.doFirst {
} }
} }
bintrayUpload.dependsOn publishToMavenLocal bintrayUpload.dependsOn publishToMavenLocal

View File

@ -1 +1 @@
{"bintrayConfig":{"repo":"InsanusMokrassar","packageName":"${project.name}","packageVcs":"https://github.com/PostsSystem/PostsSystemCore"},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://opensource.org/licenses/Apache-2.0"}],"mavenConfig":{"name":"PostsSystem Core","description":"Core library for PostsSystem","url":"https://git.insanusmokrassar.com/PostsSystem/PostsSystemCore","vcsUrl":"https://git.insanusmokrassar.com/PostsSystem/PostsSystemCore.git","developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"},{"id":"mi-ast","name":"Michail Astafiev","eMail":"astaf65@gmail.com"}]}} {"bintrayConfig":{"repo":"InsanusMokrassar","packageName":"${project.name}","packageVcs":"https://github.com/PostsSystem/PostsSystemCore"},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://git.insanusmokrassar.com/PostsSystem/PostsSystemCore/src/master/LICENSE"}],"mavenConfig":{"name":"PostsSystem Core","description":"Core library for PostsSystem","url":"https://git.insanusmokrassar.com/PostsSystem/PostsSystemCore","vcsUrl":"https://git.insanusmokrassar.com/PostsSystem/PostsSystemCore.git","developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"},{"id":"mi-ast","name":"Michail Astafiev","eMail":"astaf65@gmail.com"}]}}

View File

@ -1,13 +1,6 @@
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply plugin: 'signing'
task sourcesJar(type: Jar) { task javadocsJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
task javadocJar(type: Jar) {
from javadoc
classifier = 'javadoc' classifier = 'javadoc'
} }
@ -24,50 +17,41 @@ afterEvaluate {
} }
publishing { publishing {
publications { publications.all {
maven(MavenPublication) { artifact javadocsJar
from components.java
artifact javadocJar
artifact sourcesJar
pom.withXml { pom.withXml {
asNode().children().last() + { asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST resolveStrategy = Closure.DELEGATE_FIRST
description "Exposed realisation for PostsSystem Core" description "Exposed realisation for PostsSystem Core"
name "PostsSystem Core Exposed realization" name "PostsSystem Core Exposed realization"
url "https://git.insanusmokrassar.com/PostsSystem/Core/" url "https://git.insanusmokrassar.com/PostsSystem/Core/"
scm { scm {
developerConnection "scm:git:[fetch=]https://git.insanusmokrassar.com/PostsSystem/Core/.git[push=]https://git.insanusmokrassar.com/PostsSystem/Core/.git" developerConnection "scm:git:[fetch=]https://git.insanusmokrassar.com/PostsSystem/Core/.git[push=]https://git.insanusmokrassar.com/PostsSystem/Core/.git"
url "https://git.insanusmokrassar.com/PostsSystem/Core/.git" url "https://git.insanusmokrassar.com/PostsSystem/Core/.git"
} }
developers {
developers {
developer { developer {
id "InsanusMokrassar" id "InsanusMokrassar"
name "Ovsiannikov Aleksei" name "Ovsiannikov Aleksei"
email "ovsyannikov.alexey95@gmail.com" email "ovsyannikov.alexey95@gmail.com"
} }
}
} licenses {
licenses {
license { license {
name "Apache Software License 2.0" name "Apache Software License 2.0"
url "https://git.insanusmokrassar.com/PostsSystem/Core/src/master/LICENSE" url "https://git.insanusmokrassar.com/PostsSystem/Core/src/master/LICENSE"
} }
}
} }
} }
} }
} }
}
signing {
useGpgCmd()
sign publishing.publications.maven
} }

View File

@ -1,10 +1,10 @@
apply plugin: 'com.jfrog.bintray' apply plugin: 'com.jfrog.bintray'
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 = ["maven"]
pkg { pkg {
repo = "InsanusMokrassar" repo = "InsanusMokrassar"
name = "${project.name}" name = "${project.name}"
@ -14,10 +14,18 @@ bintray {
name = "${project.version}" name = "${project.version}"
released = new Date() released = new Date()
vcsTag = "${project.version}" vcsTag = "${project.version}"
gpg {
sign = true
passphrase = project.hasProperty('signing.gnupg.passphrase') ? project.property('signing.gnupg.passphrase') : System.getenv('signing.gnupg.passphrase')
}
} }
} }
} }
apply from: "maven.publish.gradle" bintrayUpload.doFirst {
publications = publishing.publications.collect {
it.name
}
}
bintrayUpload.dependsOn publishToMavenLocal bintrayUpload.dependsOn publishToMavenLocal