Pulled publish settings into separate file.
So that it is easier to reuse this in our other similar projects.
This commit is contained in:
parent
739deab7d0
commit
abd9fa4da7
|
@ -5,8 +5,10 @@ object Deps {
|
|||
// `Deps.Kotlin.version` directly
|
||||
const val kotlinVersion = "1.3.72"
|
||||
const val group = "cash.z.ecc.android"
|
||||
const val artifactName = "kotlin-bip39"
|
||||
const val versionName = "1.0.0-beta08"
|
||||
const val description = "A concise implementation of BIP-0039 in Kotlin for Android."
|
||||
const val githubUrl = "https://github.com/zcash/kotlin-bip39"
|
||||
|
||||
object Kotlin : Version(kotlinVersion) {
|
||||
val STDLIB = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version"
|
||||
|
|
|
@ -8,6 +8,8 @@ plugins {
|
|||
id 'java-library'
|
||||
}
|
||||
|
||||
apply from: "publish.gradle"
|
||||
|
||||
tasks {
|
||||
compileKotlin {
|
||||
kotlinOptions { jvmTarget = 1.8 }
|
||||
|
@ -42,97 +44,7 @@ test {
|
|||
events = ["failed", "skipped"]
|
||||
showStandardStreams = true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sourceCompatibility = "8"
|
||||
targetCompatibility = "8"
|
||||
|
||||
|
||||
/////////////////////////////////////////
|
||||
// Publishing
|
||||
/////////////////////////////////////////
|
||||
|
||||
group = Deps.group
|
||||
version = Deps.versionName
|
||||
|
||||
// Create the pom configuration:
|
||||
def pomConfig = {
|
||||
licenses {
|
||||
license {
|
||||
name "MIT-style"
|
||||
url "http://opensource.org/licenses/MIT"
|
||||
distribution "repo"
|
||||
}
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id "gmale"
|
||||
name "Kevin Gorham"
|
||||
email "kevin.gorham@z.cash"
|
||||
}
|
||||
}
|
||||
|
||||
scm {
|
||||
url "https://github.com/zcash/kotlin-bip39"
|
||||
}
|
||||
}
|
||||
|
||||
// Jar containing Kotlin sources
|
||||
task sourcesJar(type: Jar) {
|
||||
archiveClassifier = 'sources'
|
||||
from kotlin.sourceSets.main.kotlin.srcDirs
|
||||
}
|
||||
|
||||
// Jar containing docs
|
||||
task docsJar(type: Jar) {
|
||||
archiveClassifier = "javadoc"
|
||||
group = JavaBasePlugin.DOCUMENTATION_GROUP
|
||||
dependsOn dokka
|
||||
from dokka
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
Production(MavenPublication) {
|
||||
from components.java
|
||||
artifact sourcesJar
|
||||
artifact docsJar
|
||||
groupId Deps.group
|
||||
artifactId "kotlin-bip39"
|
||||
version Deps.versionName
|
||||
|
||||
pom.withXml {
|
||||
def root = asNode()
|
||||
root.appendNode('description', Deps.description)
|
||||
root.appendNode('name', 'kotlin-bip39')
|
||||
root.appendNode('url', 'https://github.com/zcash/kotlin-bip39')
|
||||
root.children().last() + pomConfig
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bintray {
|
||||
user = project.hasProperty('bintrayUser') ?: System.getenv('BINTRAY_USER')
|
||||
key = project.hasProperty('bintrayApiKey') ?: System.getenv('BINTRAY_API_KEY')
|
||||
publications = ['Production']
|
||||
override = true
|
||||
pkg {
|
||||
repo = 'android'
|
||||
name = 'kotlin-bip39'
|
||||
description = Deps.description
|
||||
publish = true
|
||||
publicDownloadNumbers = true
|
||||
userOrg = 'ecc-mobile'
|
||||
licenses = ['MIT']
|
||||
vcsUrl = 'https://github.com/zcash/kotlin-bip39.git'
|
||||
dryRun = true
|
||||
version {
|
||||
name = Deps.versionName
|
||||
desc = Deps.description
|
||||
released = new Date()
|
||||
vcsTag = this.version
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
import cash.z.ecc.android.Deps
|
||||
|
||||
/////////////////////////////////////////
|
||||
// Publishing
|
||||
/////////////////////////////////////////
|
||||
|
||||
group = Deps.group
|
||||
version = Deps.versionName
|
||||
|
||||
// Create the pom configuration:
|
||||
def pomConfig = {
|
||||
licenses {
|
||||
license {
|
||||
name "MIT-style"
|
||||
url "http://opensource.org/licenses/MIT"
|
||||
distribution "repo"
|
||||
}
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id "gmale"
|
||||
name "Kevin Gorham"
|
||||
email "kevin.gorham@z.cash"
|
||||
}
|
||||
}
|
||||
|
||||
scm {
|
||||
url Deps.githubUrl
|
||||
}
|
||||
}
|
||||
|
||||
// Jar containing Kotlin sources
|
||||
task sourcesJar(type: Jar) {
|
||||
archiveClassifier = 'sources'
|
||||
from kotlin.sourceSets.main.kotlin.srcDirs
|
||||
}
|
||||
|
||||
// Jar containing docs
|
||||
task docsJar(type: Jar) {
|
||||
archiveClassifier = "javadoc"
|
||||
group = JavaBasePlugin.DOCUMENTATION_GROUP
|
||||
dependsOn dokka
|
||||
from dokka
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
Production(MavenPublication) {
|
||||
from components.java
|
||||
artifact sourcesJar
|
||||
artifact docsJar
|
||||
groupId Deps.group
|
||||
artifactId Deps.artifactName
|
||||
version Deps.versionName
|
||||
|
||||
pom.withXml {
|
||||
def root = asNode()
|
||||
root.appendNode('description', Deps.description)
|
||||
root.appendNode('name', Deps.artifactName)
|
||||
root.appendNode('url', )
|
||||
root.children().last() + pomConfig
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bintray {
|
||||
user = project.hasProperty('bintrayUser') ?: System.getenv('BINTRAY_USER')
|
||||
key = project.hasProperty('bintrayApiKey') ?: System.getenv('BINTRAY_API_KEY')
|
||||
publications = ['Production']
|
||||
override = true
|
||||
pkg {
|
||||
repo = 'android'
|
||||
name = Deps.artifactName
|
||||
description = Deps.description
|
||||
publish = true
|
||||
publicDownloadNumbers = true
|
||||
userOrg = 'ecc-mobile'
|
||||
licenses = ['MIT']
|
||||
vcsUrl = Deps.githubUrl
|
||||
dryRun = true
|
||||
version {
|
||||
name = Deps.versionName
|
||||
desc = Deps.description
|
||||
released = new Date()
|
||||
vcsTag = this.version
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue