-
Notifications
You must be signed in to change notification settings - Fork 86
/
build.gradle.kts
127 lines (104 loc) · 3.75 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
plugins {
id("com.android.library")
id(libs.plugins.kotlin.android.get().pluginId)
alias(libs.plugins.sqlDelight)
alias(libs.plugins.google.ksp)
id("publish-module-android")
id("jacoco-report")
}
project.apply {
extra[KEY_PUBLISH_ARTIFACT_ID] = ANDROID_CORE
extra[KEY_PUBLISH_VERSION] = CORE_VERSION
extra[KEY_SDK_NAME] = "Android Core"
}
android {
namespace = "com.walletconnect.android"
compileSdk = COMPILE_SDK
defaultConfig {
minSdk = MIN_SDK
buildConfigField(type = "String", name = "SDK_VERSION", value = "\"${requireNotNull(extra.get(KEY_PUBLISH_VERSION))}\"")
buildConfigField("String", "PROJECT_ID", "\"${System.getenv("WC_CLOUD_PROJECT_ID") ?: ""}\"")
buildConfigField("Integer", "TEST_TIMEOUT_SECONDS", "${System.getenv("TEST_TIMEOUT_SECONDS") ?: 30}")
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments += mutableMapOf("clearPackageData" to "true")
File("${rootDir.path}/gradle/consumer-rules").listFiles()?.let { proguardFiles ->
consumerProguardFiles(*proguardFiles)
}
ndk.abiFilters += listOf("armeabi-v7a", "x86", "x86_64", "arm64-v8a")
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "${rootDir.path}/gradle/proguard-rules/sdk-rules.pro")
}
}
lint {
abortOnError = true
ignoreWarnings = true
warningsAsErrors = false
}
compileOptions {
sourceCompatibility = jvmVersion
targetCompatibility = jvmVersion
}
kotlinOptions {
jvmTarget = jvmVersion.toString()
freeCompilerArgs = listOf("-Xcontext-receivers")
}
sourceSets {
getByName("test").resources.srcDirs("src/test/resources")
}
buildFeatures {
buildConfig = true
}
testOptions {
execution = "ANDROIDX_TEST_ORCHESTRATOR"
unitTests {
isIncludeAndroidResources = true
isReturnDefaultValues = true
}
registerManagedDevices()
}
}
sqldelight {
databases {
create("AndroidCoreDatabase") {
packageName.set("com.walletconnect.android.sdk.core")
schemaOutputDirectory.set(file("src/main/sqldelight/databases"))
// generateAsync.set(true) // TODO: Enable once all repository methods have been converted to suspend functions
verifyMigrations.set(true)
}
}
}
dependencies {
debugApi(project(":foundation"))
releaseApi("com.walletconnect:foundation:$FOUNDATION_VERSION")
api(libs.coroutines)
implementation(libs.scarlet.android)
implementation(libs.bundles.sqlDelight)
//noinspection UseTomlInstead
api("net.zetetic:android-database-sqlcipher:4.5.4@aar")
implementation(libs.relinker)
api(libs.androidx.security)
api(libs.koin.android)
api(libs.timber)
ksp(libs.moshi.ksp)
api(libs.web3jCrypto)
api(libs.bundles.kethereum)
api(libs.bundles.retrofit)
api(libs.beagle.logOkhttp)
implementation(platform(libs.firebase.bom))
implementation(libs.firebase.messaging)
testImplementation(libs.bundles.androidxTest)
testImplementation(libs.robolectric)
testImplementation(libs.json)
testImplementation(libs.coroutines.test)
testImplementation(libs.bundles.scarlet.test)
testImplementation(libs.bundles.sqlDelight.test)
testImplementation(libs.koin.test)
androidTestImplementation(libs.mockk.android)
androidTestImplementation(libs.coroutines.test)
androidTestImplementation(libs.core)
androidTestUtil(libs.androidx.testOrchestrator)
androidTestImplementation(libs.bundles.androidxAndroidTest)
}