secant-android-wallet/settings.gradle.kts

206 lines
11 KiB
Plaintext
Raw Normal View History

enableFeaturePreview("VERSION_CATALOGS")
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
pluginManagement {
repositories {
val isRepoRestrictionEnabled = true
google {
if (isRepoRestrictionEnabled) {
content {
includeGroup("androidx.navigation")
includeGroup("com.android.tools")
includeGroup("com.google.testing.platform")
includeGroupByRegex("androidx.*")
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.android\\.tools.*")
}
}
}
gradlePluginPortal {
if (isRepoRestrictionEnabled) {
content {
excludeGroup("androidx.navigation")
excludeGroup("com.android.tools")
excludeGroup("com.google.testing.platform")
excludeGroupByRegex("androidx.*")
excludeGroupByRegex("com\\.android.*")
excludeGroupByRegex("com\\.android\\.tools.*")
}
}
}
}
plugins {
val androidGradlePluginVersion = extra["ANDROID_GRADLE_PLUGIN_VERSION"].toString()
val detektVersion = extra["DETEKT_VERSION"].toString()
val gradleVersionsPluginVersion = extra["GRADLE_VERSIONS_PLUGIN_VERSION"].toString()
val kotlinVersion = extra["KOTLIN_VERSION"].toString()
val playPublisherVersion = extra["PLAY_PUBLISHER_PLUGIN_VERSION_MATCHER"].toString()
id("com.android.application") version (androidGradlePluginVersion) apply (false)
id("com.android.library") version (androidGradlePluginVersion) apply (false)
id("com.github.ben-manes.versions") version (gradleVersionsPluginVersion) apply (false)
id("com.github.triplet.play") version (playPublisherVersion) apply (false)
id("io.gitlab.arturbosch.detekt") version (detektVersion) apply (false)
kotlin("android") version (kotlinVersion) apply (false)
kotlin("jvm") version (kotlinVersion)
kotlin("multiplatform") version (kotlinVersion)
}
}
dependencyResolutionManagement {
@Suppress("UnstableApiUsage")
repositories {
val isRepoRestrictionEnabled = true
maven("https://dl.google.com/dl/android/maven2/") { // google()
if (isRepoRestrictionEnabled) {
content {
includeGroup("android.arch.lifecycle")
includeGroup("android.arch.core")
includeGroup("com.google.android.material")
includeGroupByRegex("androidx.*")
includeGroupByRegex("com\\.android.*")
}
}
}
maven("https://repo.maven.apache.org/maven2/") { // mavenCentral()
if (isRepoRestrictionEnabled) {
content {
excludeGroup("android.arch.lifecycle")
excludeGroup("android.arch.core")
excludeGroup("com.google.android.material")
excludeGroupByRegex("androidx.*")
excludeGroupByRegex("com\\.android.*")
}
}
}
}
@Suppress("UnstableApiUsage", "MaxLineLength")
versionCatalogs {
create("libs") {
val androidxActivityVersion = extra["ANDROIDX_ACTIVITY_VERSION"].toString()
val androidxAnnotationVersion = extra["ANDROIDX_ANNOTATION_VERSION"].toString()
val androidxAppcompatVersion = extra["ANDROIDX_APPCOMPAT_VERSION"].toString()
val androidxComposeCompilerVersion = extra["ANDROIDX_COMPOSE_COMPILER_VERSION"].toString()
2021-12-03 05:19:15 -08:00
val androidxComposeVersion = extra["ANDROIDX_COMPOSE_VERSION"].toString()
val androidxCoreVersion = extra["ANDROIDX_CORE_VERSION"].toString()
val androidxEspressoVersion = extra["ANDROIDX_ESPRESSO_VERSION"].toString()
2021-10-09 07:36:58 -07:00
val androidxLifecycleVersion = extra["ANDROIDX_LIFECYCLE_VERSION"].toString()
val androidxNavigationComposeVersion = extra["ANDROIDX_NAVIGATION_COMPOSE_VERSION"].toString()
2021-12-03 05:19:15 -08:00
val androidxSecurityCryptoVersion = extra["ANDROIDX_SECURITY_CRYPTO_VERSION"].toString()
val androidxSplashScreenVersion = extra["ANDROIDX_SPLASH_SCREEN_VERSION"].toString()
val androidxTestJunitVersion = extra["ANDROIDX_TEST_JUNIT_VERSION"].toString()
2021-10-11 12:52:24 -07:00
val androidxTestOrchestratorVersion = extra["ANDROIDX_TEST_ORCHESTRATOR_VERSION"].toString()
val androidxTestVersion = extra["ANDROIDX_TEST_VERSION"].toString()
val androidxUiAutomatorVersion = extra["ANDROIDX_UI_AUTOMATOR_VERSION"].toString()
val coreLibraryDesugaringVersion = extra["CORE_LIBRARY_DESUGARING_VERSION"].toString()
val googleMaterialVersion = extra["GOOGLE_MATERIAL_VERSION"].toString()
val jacocoVersion = extra["JACOCO_VERSION"].toString()
val javaVersion = extra["ANDROID_JVM_TARGET"].toString()
val kotlinVersion = extra["KOTLIN_VERSION"].toString()
val kotlinxCoroutinesVersion = extra["KOTLINX_COROUTINES_VERSION"].toString()
val zcashBip39Version = extra["ZCASH_BIP39_VERSION"].toString()
2021-12-03 05:19:15 -08:00
val zcashSdkVersion = extra["ZCASH_SDK_VERSION"].toString()
2022-01-13 09:49:08 -08:00
val zxingVersion = extra["ZXING_VERSION"].toString()
// Standalone versions
version("jacoco", jacocoVersion)
version("java", javaVersion)
// Aliases
2021-09-17 05:33:27 -07:00
alias("androidx-activity").to("androidx.activity:activity-ktx:$androidxActivityVersion")
alias("androidx-activity-compose").to("androidx.activity:activity-compose:$androidxActivityVersion")
2021-09-17 05:33:27 -07:00
alias("androidx-annotation").to("androidx.annotation:annotation:$androidxAnnotationVersion")
2021-10-09 07:36:58 -07:00
alias("androidx-appcompat").to("androidx.appcompat:appcompat:$androidxAppcompatVersion")
alias("androidx-compose-foundation").to("androidx.compose.foundation:foundation:$androidxComposeVersion")
alias("androidx-compose-material").to("androidx.compose.material:material:$androidxComposeVersion")
alias("androidx-compose-material-icons-core").to("androidx.compose.material:material-icons-core:$androidxComposeVersion")
alias("androidx-compose-material-icons-extended").to("androidx.compose.material:material-icons-extended:$androidxComposeVersion")
alias("androidx-compose-tooling").to("androidx.compose.ui:ui-tooling:$androidxComposeVersion")
alias("androidx-compose-ui").to("androidx.compose.ui:ui:$androidxComposeVersion")
alias("androidx-compose-compiler").to("androidx.compose.compiler:compiler:$androidxComposeCompilerVersion")
2021-09-17 05:33:27 -07:00
alias("androidx-core").to("androidx.core:core-ktx:$androidxCoreVersion")
2021-10-09 07:36:58 -07:00
alias("androidx-lifecycle-livedata").to("androidx.lifecycle:lifecycle-livedata-ktx:$androidxLifecycleVersion")
alias("androidx-navigation-compose").to("androidx.navigation:navigation-compose:$androidxNavigationComposeVersion")
alias("androidx-security-crypto").to("androidx.security:security-crypto-ktx:$androidxSecurityCryptoVersion")
2021-12-03 05:19:15 -08:00
alias("androidx-splash").to("androidx.core:core-splashscreen:$androidxSplashScreenVersion")
2021-10-18 13:18:13 -07:00
alias("androidx-viewmodel-compose").to("androidx.lifecycle:lifecycle-viewmodel-compose:$androidxLifecycleVersion")
alias("desugaring").to("com.android.tools:desugar_jdk_libs:$coreLibraryDesugaringVersion")
2021-09-17 05:33:27 -07:00
alias("google-material").to("com.google.android.material:material:$googleMaterialVersion")
alias("kotlin-stdlib").to("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
alias("kotlin-reflect").to("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
alias("kotlinx-coroutines-android").to("org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinxCoroutinesVersion")
alias("kotlinx-coroutines-core").to("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion")
alias("zcash-sdk").to("cash.z.ecc.android:zcash-android-sdk:$zcashSdkVersion")
alias("zcash-bip39").to("cash.z.ecc.android:kotlin-bip39:$zcashBip39Version")
alias("zcash-walletplgns").to("cash.z.ecc.android:zcash-android-wallet-plugins:$zcashBip39Version")
2022-01-13 09:49:08 -08:00
alias("zxing").to("com.google.zxing:core:$zxingVersion")
// Test libraries
alias("androidx-compose-test-junit").to("androidx.compose.ui:ui-test-junit4:$androidxComposeVersion")
alias("androidx-compose-test-manifest").to("androidx.compose.ui:ui-test-manifest:$androidxComposeVersion")
// Cannot use espresso-contrib, because it causes a build failure
//alias("androidx-espresso-contrib").to("androidx.test.espresso:espresso-contrib:$androidxEspressoVersion")
2021-09-17 05:33:27 -07:00
alias("androidx-espresso-core").to("androidx.test.espresso:espresso-core:$androidxEspressoVersion")
alias("androidx-espresso-intents").to("androidx.test.espresso:espresso-intents:$androidxEspressoVersion")
2021-10-11 12:52:24 -07:00
alias("androidx-test-core").to("androidx.test:core:$androidxTestVersion")
alias("androidx-test-junit").to("androidx.test.ext:junit:$androidxTestJunitVersion")
alias("androidx-test-orchestrator").to("androidx.test:orchestrator:$androidxTestOrchestratorVersion")
alias("androidx-test-runner").to("androidx.test:runner:$androidxTestVersion")
2021-09-17 05:33:27 -07:00
alias("androidx-uiAutomator").to("androidx.test.uiautomator:uiautomator-v18:$androidxUiAutomatorVersion")
alias("kotlinx-coroutines-test").to("org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinxCoroutinesVersion")
// Bundles
bundle(
"androidx-compose",
listOf(
"androidx-activity-compose",
"androidx-compose-compiler",
"androidx-compose-foundation",
"androidx-compose-material",
"androidx-compose-material-icons-core",
"androidx-compose-material-icons-extended",
"androidx-compose-tooling",
"androidx-compose-ui",
"androidx-navigation-compose",
"androidx-viewmodel-compose"
)
)
bundle(
"androidx-test",
listOf(
"androidx-espresso-core",
"androidx-espresso-intents",
2021-10-11 12:52:24 -07:00
"androidx-test-core",
"androidx-test-junit",
"androidx-test-runner"
)
)
}
}
}
rootProject.name = "zcash-android-app"
includeBuild("build-convention")
include("app")
include("build-info-lib")
include("preference-api-lib")
include("preference-impl-android-lib")
include("sdk-ext-lib")
include("ui-lib")
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"))
}
}
}