[#304] Configure included builds for SDK
This commit is contained in:
parent
4eb3692d2b
commit
254fb13a7d
18
README.md
18
README.md
|
@ -53,6 +53,24 @@ Note: The lack of an explicit Gradle task is not a typo. A default task is confi
|
|||
|
||||
Tip: On macOS and Linux, Gradle is invoked with `./gradlew`. On Windows, Gradle is invoked with `gradlew`.
|
||||
|
||||
|
||||
# Included builds
|
||||
To simplify implementation of SDK features in conjunction with changes to the app, a Gradle [Included Build](https://docs.gradle.org/current/userguide/composite_builds.html) can be configured.
|
||||
|
||||
1. Check out the SDK to a directory path of `../zcash-android-sdk` relative to the root of this app's repo. For example:
|
||||
|
||||
parent/
|
||||
zcash-android-wallet/
|
||||
zcash-android-sdk/
|
||||
|
||||
1. Verify that the `zcash-android-sdk` builds correctly on its own
|
||||
1. Build `zcash-android-wallet`, setting the Gradle property `IS_SDK_INCLUDED_BUILD=true`
|
||||
|
||||
There are some limitations of included builds:
|
||||
1. Properties from `zcash-android-wallet` will override those set in `zcash-android-sdk` with the same name
|
||||
1. Modules in each project cannot share the same name. For this reason, build-conventions have different names in each repo (`zcash-android-sdk/build-conventions` vs `secant-android-wallet/build-convention`)
|
||||
1. Kotlin and KSP versions will need to be coordinated between the two projects, because KSP is tightly coupled to the Kotlin version
|
||||
|
||||
# Contributing
|
||||
|
||||
Contributions are very much welcomed! Please read our [Contributing Guidelines](/CONTRIBUTING.md) and [Code of Conduct](/CONDUCT.md). Our backlog has many Issues tagged with the `good first issue` label. Please fork the repo and make a pull request for us to review.
|
||||
|
|
|
@ -20,4 +20,7 @@ android.builder.sdkDownload=true
|
|||
|
||||
# Optionally configures test orchestrator. While it provides isolated tests, it also nearly doubles
|
||||
# the time it takes for test to run.
|
||||
isUseTestOrchestrator=false
|
||||
isUseTestOrchestrator=false
|
||||
|
||||
# Toggles between using the SDK Maven artifact versus an included build
|
||||
IS_SDK_INCLUDED_BUILD=false
|
|
@ -1,21 +0,0 @@
|
|||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("com.github.ben-manes.versions") version("0.39.0") apply(false)
|
||||
}
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven { url "https://jitpack.io" }
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name="Zcash Wallet"
|
||||
include ":app", ":qrecycler", ":feedback", ":mnemonic", ":lockbox"
|
|
@ -0,0 +1,36 @@
|
|||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("com.github.ben-manes.versions") version("0.39.0") apply(false)
|
||||
}
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven("https://jitpack.io")
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name="ecc-wallet"
|
||||
include(":app")
|
||||
include(":qrecycler")
|
||||
include(":feedback")
|
||||
include(":mnemonic")
|
||||
include(":lockbox")
|
||||
|
||||
if (extra["IS_SDK_INCLUDED_BUILD"].toString().toBoolean()) {
|
||||
// Currently assume the SDK is up one level with a hardcoded directory name
|
||||
// If this becomes problematic, `IS_SDK_INCLUDED_BUILD` could be turned into a path
|
||||
// instead.
|
||||
includeBuild("../zcash-android-sdk") {
|
||||
dependencySubstitution {
|
||||
substitute(module("cash.z.ecc.android:zcash-android-sdk")).using(project(":sdk-lib"))
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue