Publishing is functional again on Bintray.

Minor uncommitted tweaks. Published version Alpha08.
This commit is contained in:
Kevin Gorham 2020-10-01 16:22:29 -04:00
parent e8ec06f561
commit 5879bb3442
No known key found for this signature in database
GPG Key ID: CCA55602DF49FC38
5 changed files with 14 additions and 7 deletions

View File

@ -6,8 +6,8 @@ object Deps {
const val kotlinVersion = "1.4.10"
const val group = "cash.z.ecc.android"
const val artifactName = "zcash-android-sdk"
const val versionName = "1.1.0-beta07"
const val versionCode = 1_01_00_207 // last digits are alpha(0XX) beta(2XX) rc(4XX) release(8XX). Ex: 1_08_04_401 is an release candidate build of version 1.8.4 and 1_08_04_800 would be the final release.
const val versionName = "1.1.0-beta08"
const val versionCode = 1_01_00_208 // last digits are alpha(0XX) beta(2XX) rc(4XX) release(8XX). Ex: 1_08_04_401 is an release candidate build of version 1.8.4 and 1_08_04_800 would be the final release.
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"
@ -16,7 +16,7 @@ object Deps {
// to publish for local development run: ./gradlew publishToMavenLocal
// Remember: publish both mainnet and testnet!
const val publishingDryRun = true
val publishingTarget = Publication.Mainnet
val publishingTarget = Publication.Testnet
object Publication {
object Mainnet {

View File

@ -14,8 +14,6 @@ import cash.z.wallet.sdk.rpc.CompactFormats
fun Fragment.mainActivity() = context as? MainActivity
/**
* Add locale-specific commas to a number, if it exists.
*/

View File

@ -22,6 +22,14 @@ class Initializer constructor(appContext: Context, builder: Builder): SdkSynchr
val viewingKeys: List<String>
val birthday: WalletBirthdayTool.WalletBirthday
/**
* True when accounts have been created by this initializer.
*
* NOTE: This is a code smell that the initializer should not be creating databases but that
* will be addressed in the next iteration and/or when the Data Access API is implemented
*/
var accountsCreated = false
init {
val loadedBirthday =
builder.birthday ?: WalletBirthdayTool.loadNearest(context, builder.birthdayHeight)
@ -31,6 +39,7 @@ class Initializer constructor(appContext: Context, builder: Builder): SdkSynchr
host = builder.host
port = builder.port
rustBackend = initRustBackend(birthday)
// TODO: get rid of this by first answering the question: why is this necessary?
initMissingDatabases(birthday, *viewingKeys.toTypedArray())
}
@ -90,6 +99,7 @@ class Initializer constructor(appContext: Context, builder: Builder): SdkSynchr
"Warning: did not initialize the accounts table. It probably was already initialized."
) {
rustBackend.initAccountsTable(*viewingKeys)
accountsCreated = true
twig("Initialized the accounts table with ${viewingKeys.size} viewingKey(s)")
}
}

View File

@ -16,4 +16,3 @@ internal inline fun <R> tryWarn(message: String, block: () -> R): R? {
return null
}
}

View File

@ -175,7 +175,7 @@ pub unsafe extern "C" fn Java_cash_z_ecc_android_sdk_jni_RustBackend_initAccount
) -> jboolean {
let res = panic::catch_unwind(|| {
let db_data = utils::java_string_to_rust(&env, db_data);
// TODO: avoid all this unwrapping and also surface erros, better
// TODO: avoid all this unwrapping and also surface errors, better
let count = env.get_array_length(extfvks_arr).unwrap();
let extfvks = (0..count)
.map(|i| env.get_object_array_element(extfvks_arr, i))