You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
138 lines
3.2 KiB
138 lines
3.2 KiB
import cash.z.ecc.android.Deps
|
|
|
|
plugins {
|
|
id 'maven-publish'
|
|
id 'com.jfrog.bintray'
|
|
id "org.jetbrains.kotlin.jvm"
|
|
id 'org.jetbrains.dokka' version '0.10.1'
|
|
id 'java-library'
|
|
}
|
|
|
|
tasks {
|
|
compileKotlin {
|
|
kotlinOptions { jvmTarget = 1.8 }
|
|
sourceCompatibility = 1.8
|
|
}
|
|
compileTestKotlin {
|
|
kotlinOptions { jvmTarget = 1.8 }
|
|
sourceCompatibility = 1.8
|
|
}
|
|
|
|
// Generate Kotlin/Java documentation from sources.
|
|
dokka {
|
|
outputFormat = "html"
|
|
}
|
|
}
|
|
dependencies {
|
|
implementation Deps.Kotlin.STDLIB
|
|
|
|
// Tests
|
|
testImplementation Deps.Kotest.RUNNER
|
|
testImplementation Deps.Kotest.ASSERTIONS
|
|
testImplementation Deps.Kotest.PROPERTY
|
|
testImplementation Deps.Square.MOSHI
|
|
testImplementation Deps.Square.MOSHI_KOTLIN
|
|
}
|
|
test {
|
|
useJUnitPlatform()
|
|
testLogging {
|
|
showExceptions = true
|
|
showStackTraces = true
|
|
exceptionFormat = "full"
|
|
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
|
|
}
|
|
}
|
|
}
|