Published to bintray and updated demo apps, accordingly.
This commit is contained in:
parent
75718e9e71
commit
712dac2481
|
@ -42,10 +42,13 @@ buildscript {
|
|||
classpath 'com.github.str4d:rust-android-gradle:68b4ecc053'
|
||||
classpath 'org.owasp:dependency-check-gradle:5.3.0'
|
||||
classpath "gradle.plugin.com.dorongold.plugins:task-tree:1.5"
|
||||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
|
||||
}
|
||||
}
|
||||
|
||||
apply from: 'custom-tasks.gradle'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'com.jfrog.bintray'
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
|
@ -60,6 +63,7 @@ apply plugin: 'org.mozilla.rust-android-gradle.rust-android'
|
|||
apply plugin: 'org.owasp.dependencycheck'
|
||||
apply plugin: "com.dorongold.task-tree"
|
||||
apply from: 'ci.gradle'
|
||||
apply from: 'publish.gradle'
|
||||
|
||||
group = Deps.group
|
||||
version = Deps.versionName
|
||||
|
@ -200,6 +204,10 @@ cargo {
|
|||
zcashmainnetRelease {
|
||||
defaultFeaturesAnd("mainnet")
|
||||
}
|
||||
zcashtestnetDebug {
|
||||
}
|
||||
zcashtestnetRelease {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,18 @@ object Deps {
|
|||
const val description = "This lightweight SDK connects Android to Zcash. It welds together Rust and Kotlin in a minimal way, allowing third-party Android apps to send and receive shielded transactions easily, securely and privately."
|
||||
const val githubUrl = "https://github.com/zcash/zcash-android-wallet-sdk"
|
||||
|
||||
// publishing
|
||||
object Publication {
|
||||
object Mainnet {
|
||||
const val variant = "zcashmainnetRelease"
|
||||
const val artifactId = "sdk-mainnet"
|
||||
}
|
||||
object Testnet {
|
||||
const val variant = "zcashtestnetRelease"
|
||||
const val artifactId = "sdk-testnet"
|
||||
}
|
||||
}
|
||||
|
||||
object Kotlin : Version(kotlinVersion) {
|
||||
val STDLIB = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version"
|
||||
}
|
||||
|
|
|
@ -43,22 +43,42 @@ task docsJar(type: Jar) {
|
|||
from dokka
|
||||
}
|
||||
|
||||
def activePublication = Deps.Publication.Testnet
|
||||
publishing {
|
||||
publications {
|
||||
Production(MavenPublication) {
|
||||
from components.java
|
||||
artifact sourcesJar
|
||||
artifact docsJar
|
||||
groupId Deps.group
|
||||
artifactId Deps.artifactName
|
||||
version Deps.versionName
|
||||
android.libraryVariants.all { variant ->
|
||||
if (variant.name != activePublication.variant) return
|
||||
|
||||
pom.withXml {
|
||||
def root = asNode()
|
||||
root.appendNode('description', Deps.description)
|
||||
root.appendNode('name', Deps.artifactName)
|
||||
root.appendNode('url', )
|
||||
root.children().last() + pomConfig
|
||||
Production(MavenPublication) {
|
||||
artifact variant.outputs[0].packageLibrary // the AAR
|
||||
artifact sourcesJar
|
||||
artifact docsJar
|
||||
groupId Deps.group
|
||||
artifactId activePublication.artifactId
|
||||
version Deps.versionName
|
||||
|
||||
pom.withXml {
|
||||
def root = asNode()
|
||||
root.appendNode('description', Deps.description)
|
||||
root.appendNode('name', activePublication.artifactId)
|
||||
root.appendNode('url', )
|
||||
root.children().last() + pomConfig
|
||||
|
||||
// AAR-specific: we must explicitly add dependencies for an AAR
|
||||
def depsNode = root["dependencies"][0] ?: root.appendNode("dependencies")
|
||||
def addDep = {
|
||||
if (it.group == null) return // Avoid empty dependency nodes
|
||||
def dependencyNode = depsNode.appendNode('dependency')
|
||||
dependencyNode.appendNode('groupId', it.group)
|
||||
dependencyNode.appendNode('artifactId', it.name)
|
||||
dependencyNode.appendNode('version', it.version)
|
||||
if (it.hasProperty('optional') && it.optional) {
|
||||
dependencyNode.appendNode('optional', 'true')
|
||||
}
|
||||
}
|
||||
// run the 'addDep' closure over each dependency
|
||||
configurations.compile.allDependencies.each addDep
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -71,14 +91,15 @@ bintray {
|
|||
override = true
|
||||
pkg {
|
||||
repo = 'android'
|
||||
name = Deps.artifactName
|
||||
name = activePublication.artifactId
|
||||
description = Deps.description
|
||||
publish = true
|
||||
publicDownloadNumbers = true
|
||||
userOrg = 'ecc-mobile'
|
||||
labels = ['aar', 'android', 'zcash', 'ecc', 'sdk']
|
||||
licenses = ['MIT']
|
||||
vcsUrl = Deps.githubUrl
|
||||
dryRun = false
|
||||
dryRun = true
|
||||
version {
|
||||
name = Deps.versionName
|
||||
desc = Deps.description
|
||||
|
|
|
@ -49,12 +49,8 @@ android {
|
|||
|
||||
dependencies {
|
||||
// SDK
|
||||
// included here as a project in order to be able to quickly modify and see changes directly
|
||||
// in the demo app. However, normally, the SDK would be added from jcenter like all other
|
||||
// dependencies. See github for the latest coordinates such as:
|
||||
//
|
||||
// implementation 'cash.z.ecc.android.sdk:zcash-android-wallet-sdk:1.1.0-beta01`
|
||||
implementation project(path: ':sdk')
|
||||
zcashmainnetImplementation 'cash.z.ecc.android:sdk-mainnet:1.1.0-beta01'
|
||||
zcashtestnetImplementation 'cash.z.ecc.android:sdk-testnet:1.1.0-beta01'
|
||||
|
||||
// sample mnemonic plugin
|
||||
implementation 'com.github.zcash:zcash-android-wallet-plugins:1.0.1'
|
||||
|
@ -62,6 +58,7 @@ dependencies {
|
|||
|
||||
// SDK: grpc
|
||||
implementation 'io.grpc:grpc-okhttp:1.25.0'
|
||||
implementation "io.grpc:grpc-android:1.25.0"
|
||||
implementation 'io.grpc:grpc-protobuf-lite:1.25.0'
|
||||
implementation 'io.grpc:grpc-stub:1.25.0'
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<application
|
||||
android:name=".App"
|
||||
android:allowBackup="true"
|
||||
android:allowBackup="false"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<string name="app_name">Demo App</string>
|
||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||
<string name="nav_header_subtitle">v1.0.0-alpha02</string>
|
||||
<string name="nav_header_subtitle">v1.1.0</string>
|
||||
<string name="nav_header_desc">Navigation header</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
|
||||
|
|
|
@ -23,6 +23,9 @@ allprojects {
|
|||
google()
|
||||
jcenter()
|
||||
maven { url 'https://jitpack.io' }
|
||||
maven {
|
||||
url "https://dl.bintray.com/ecc-mobile/android"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../../../../buildSrc/src/main/java/cash/z/ecc/android/Deps.kt
|
|
@ -1,3 +1,2 @@
|
|||
include ':app', ":sdk"
|
||||
project(":sdk").projectDir = file("../../../zcash-android-wallet-sdk")
|
||||
include ':app'
|
||||
rootProject.name='Demo App'
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"network": "mainnet",
|
||||
"height": 830000,
|
||||
"hash": "00000000013284f6e727ed7cb6365726a044e050d0009ca4bcfbc7bdcd80f319",
|
||||
"time": 1589394076,
|
||||
"tree": "01a6bcb9b2f15aaa3e69ca0c0688c18b8859d54c9d6388f4d5fce8f72a2bfd990d0011019bcf88f0f1cf6d4cee6b74231c9466cd13b5e5390d4e05fdb1e4f4143cdf7a4f000000000145e054aa42c1c6f9a70581e04b05a565c9e6e2faf8885e9b76afcd841228715d01a20db43a61e0bc593598bc42c7b10c31194385c8fb00543cab4d4756b3eaf9030000014bb574ca908dc46d48278d9f5039b7d93217ea00eb63f682321503fe5b42b03f0001d6bdb5e3f2e34961d6f337c416704b74d0df45349b7b50e30cfaebea4934db1b0001e3586da44e3b0d6a0776f967e86c9bb7542b070ce52a7baac5a8e2a564780743011e76743978cad6dd5263d5a654db307368cb997b0c984ad51018d007c955972101e2bf698f5ac10b44da560d11a5e1d5c191a82a968a2be0a6948aa8748b54516001d2ea556f49fb934dc76f087935a5c07788000b4e3aae24883adfec51b5f4d260"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"network": "mainnet",
|
||||
"height": 840000,
|
||||
"hash": "00000000000a0b9a8753dfd46e1205590d35f4d365437a0d20d29317b33743c0",
|
||||
"time": 1590149064,
|
||||
"tree": "01101f7b8112735869abc0e74dac1f272935d09725ff03cd8cb63d472e112fa82a01d635e219273ade2859554e5191898ce9a79cb80f62c272dede1c2a71e183e21e120000000000000000000000000000000000011323ddf890bfd7b94fc609b0d191982cb426b8bf4d900d04709a8b9cb1a27625"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"network": "mainnet",
|
||||
"height": 850000,
|
||||
"hash": "00000000007b5c713129e71fc1496bcc321cd6cd3efec262c9fd73eb90695faa",
|
||||
"time": 1590901979,
|
||||
"tree": "015063008b28e034d7515616a1d975646927df30ac4f13d96ecf3f7ec1ddd49b26001201ff3ab46b9dedd6374a80ddcc746a63b05f9dacd6dbd21f7e0df00ec6df0156520157bfc70827a774ac00c13012ac96a984d75c54a15605d741f647923d531021420000014d624d2cd2908d1a438f4a70ac392ba151c7167095553556f23ca5612475224001b97205b2715b57b9f04451df4474c73586e8fc438f989b057cb83c24e7c80d5d0001d0ce3df812f137bfb07e56795014bfc66297491dde457df799406286d7287e1c0001a8e22e1a09d435fcf20b2599688e7094ca46d2c273ffcdfee0ee80eb3e1e4d2901e469171a108b4c837f17a8f67f4d02ff9688acc825d2e1ce1ad3f8b24ff1346c0001a8ee7010fb0075cf00f14f7541c57cd0e18167ac8b98c1b20454d3618715811a00000000011323ddf890bfd7b94fc609b0d191982cb426b8bf4d900d04709a8b9cb1a27625"
|
||||
}
|
Loading…
Reference in New Issue