Published to bintray.

This commit is contained in:
Kevin Gorham 2020-06-06 20:22:46 -04:00
parent 59a2b0d7ea
commit 9b35efbdd2
No known key found for this signature in database
GPG Key ID: CCA55602DF49FC38
4 changed files with 126 additions and 11 deletions

View File

@ -1,25 +1,26 @@
import cash.z.ecc.android.Deps
buildscript {
ext {
kotlin_version = '1.3.72'
}
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${Deps.kotlinVersion}"
}
}
apply plugin: 'java-library'
apply plugin: 'kotlin'
plugins {
id 'java-library'
id 'maven-publish'
id 'com.jfrog.bintray' version '1.8.5'
id "org.jetbrains.kotlin.jvm" version '1.3.72'
id 'org.jetbrains.dokka' version '0.10.1'
}
// jitpack (note: to change the version, push another release per https://jitpack.io/docs/#publishing-on-jitpack)
apply plugin: 'com.github.dcendents.android-maven'
group = 'com.github.zcash'
apply from: "publish.gradle"
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${Deps.kotlinVersion}"
}
repositories {

View File

@ -0,0 +1,7 @@
plugins {
`kotlin-dsl`
}
repositories {
jcenter()
}

View File

@ -0,0 +1,18 @@
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.3.72"
const val group = "cash.z.ecc.android"
const val artifactName = "zcash-android-wallet-plugins"
const val versionName = "1.0.0"
const val description = "Lightweight dependency that makes it easier to plugin 3rd party implementations to the zcash Android SDK."
const val githubUrl = "https://github.com/zcash/zcash-android-wallet-plugins"
object Kotlin : Version(kotlinVersion) {
val STDLIB = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version"
}
}
open class Version(@JvmField val version: String)

89
publish.gradle Normal file
View File

@ -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 = false
version {
name = Deps.versionName
desc = Deps.description
released = new Date()
vcsTag = this.version
}
}
}