diff --git a/buildSrc/src/main/java/cash/z/ecc/android/Dependencies.kt b/buildSrc/src/main/java/cash/z/ecc/android/Dependencies.kt index cf85dbc..507dcf4 100644 --- a/buildSrc/src/main/java/cash/z/ecc/android/Dependencies.kt +++ b/buildSrc/src/main/java/cash/z/ecc/android/Dependencies.kt @@ -3,13 +3,7 @@ package cash.z.ecc.android object Deps { // For use in the top-level build.gradle which gives an error when provided // `Deps.Kotlin.version` directly - const val kotlinVersion = "1.4.10" - const val group = "cash.z.ecc.android" - const val artifactName = "kotlin-bip39" - const val versionName = "1.0.1" - const val description = "A concise implementation of BIP-0039 in Kotlin for Android." - const val githubUrl = "https://github.com/zcash/kotlin-bip39" - const val publishingActive = false // set to true to activate bintrayUpload task + const val kotlinVersion = "1.4.30" object Kotlin : Version(kotlinVersion) { val STDLIB = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 954687e..21ff1db 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip diff --git a/lib/build.gradle b/lib/build.gradle index 2151428..d4b887a 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -1,14 +1,14 @@ 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' + id 'com.vanniktech.maven.publish' version '0.14.2' } -apply from: "publish.gradle" +group = project.property('GROUP') +version = project.property('VERSION_NAME') tasks { compileKotlin { diff --git a/lib/gradle.properties b/lib/gradle.properties new file mode 100644 index 0000000..5541195 --- /dev/null +++ b/lib/gradle.properties @@ -0,0 +1,19 @@ +# Publishing : Required +GROUP=cash.z.ecc.android +POM_ARTIFACT_ID=kotlin-bip39 +VERSION_NAME=1.0.2 + +# Publishing : Optional +POM_NAME=Kotlin BIP-39 +POM_DESCRIPTION=A concise implementation of BIP-0039 in Kotlin for Android. +POM_INCEPTION_YEAR=2020 +POM_URL=https://github.com/zcash/kotlin-bip39/ +POM_SCM_URL=https://github.com/zcash/kotlin-bip39/ +POM_SCM_CONNECTION=scm:git:git://github.com/zcash/kotlin-bip39.git +POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/zcash/kotlin-bip39.git +POM_LICENCE_NAME=The MIT License +POM_LICENCE_URL=http://opensource.org/licenses/MIT +POM_LICENCE_DIST=repo +POM_DEVELOPER_ID=gmale +POM_DEVELOPER_NAME=Kevin Gorham +POM_DEVELOPER_URL=https://github.com/gmale/ diff --git a/lib/publish.gradle b/lib/publish.gradle deleted file mode 100644 index 6208132..0000000 --- a/lib/publish.gradle +++ /dev/null @@ -1,89 +0,0 @@ -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.findProperty('bintrayUser') ?: System.getenv('BINTRAY_USER') - key = project.findProperty('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 = !Deps.publishingActive - version { - name = Deps.versionName - desc = Deps.description - released = new Date() - vcsTag = this.version - } - } -}