forked from perawallet/pera-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
247 lines (201 loc) · 11 KB
/
build.gradle
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
plugins {
id "io.gitlab.arturbosch.detekt" version "$detekt_version"
id "com.android.application"
id "com.google.gms.google-services"
id "com.google.firebase.crashlytics"
id "kotlin-android"
id "kotlin-parcelize"
id "kotlin-kapt"
id "androidx.navigation.safeargs.kotlin"
id "dagger.hilt.android.plugin"
id 'com.google.firebase.firebase-perf'
}
apply from: 'https://raw.githubusercontent.com/Hipo/macaron/master/config/quality/quality.gradle'
def flavorsGradlePath = 'flavors.gradle'
def browsersGradlePath = 'browsers.gradle'
def offrampGradlePath = 'offramp.gradle'
if (project.file(flavorsGradlePath).exists()) {
apply from: flavorsGradlePath
}
if (project.file(browsersGradlePath).exists()) {
apply from: browsersGradlePath
}
if (project.file(offrampGradlePath).exists()) {
apply from: offrampGradlePath
}
android {
compileSdkVersion targets.compileSdkVersion
defaultConfig {
applicationId application.applicationId
minSdkVersion targets.minSdkVersion
targetSdkVersion targets.targetSdkVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
javaCompileOptions {
annotationProcessorOptions {
arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
}
signingConfigs {
releaseLocal {
def localProps = new Properties()
try {
localProps.load(new FileInputStream(file('../local.properties')))
storeFile file(localProps["RELEASE_STORE_FILE"])
storePassword localProps["RELEASE_STORE_PASSWORD"]
keyAlias localProps["RELEASE_KEY_ALIAS"]
keyPassword localProps["RELEASE_KEY_PASSWORD"]
} catch (e) {
println(e)
}
}
}
buildTypes {
releaseLocal {
signingConfig signingConfigs.releaseLocal
multiDexEnabled true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
manifestPlaceholders = [enableCrashReporting: "true", enableFirebasePerformanceLogcat: "false"]
}
release {
multiDexEnabled true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
manifestPlaceholders = [enableCrashReporting: "true", enableFirebasePerformanceLogcat: "false"]
}
debug {
multiDexEnabled true
minifyEnabled false
manifestPlaceholders = [enableCrashReporting: "false", enableFirebasePerformanceLogcat: "true"]
}
}
flavorDimensions "app", "server"
productFlavors {
def apiKeyProps = new Properties()
staging {
dimension "server"
versionNameSuffix " (STAGING)"
applicationIdSuffix ".staging"
apiKeyProps.load(new FileInputStream(file('../app/src/staging/api-key.properties')))
buildConfigField "String", "ALGORAND_BASE_URL", '"https://node-testnet.chain.perawallet.app/"'
buildConfigField "String", "ALGORAND_API_KEY", apiKeyProps["ALGORAND_API_KEY"]
buildConfigField "String", "INDEXER_API_KEY", apiKeyProps["INDEXER_API_KEY"]
buildConfigField "String", "MOBILE_API_KEY", apiKeyProps["MOBILE_API_KEY"]
buildConfigField "String", "MOBILE_ALGORAND_MAINNET_BASE_URL", '"https://mainnet.staging.api.perawallet.app/"'
buildConfigField "String", "MOBILE_ALGORAND_TESTNET_BASE_URL", '"https://testnet.staging.api.perawallet.app/"'
buildConfigField "String", "PERA_3D_EXPLORER_BASE_URL", '"https://static-hosting.perawallet.app/3dviewer/index.html"'
buildConfigField "String", "DISCOVER_WEBVIEW_USERNAME", apiKeyProps["DISCOVER_WEBVIEW_USERNAME"]
buildConfigField "String", "DISCOVER_WEBVIEW_PASSWORD", apiKeyProps["DISCOVER_WEBVIEW_PASSWORD"]
buildConfigField "String", "DISCOVER_VERSION", "\"${discoverVersions.staging}\""
buildConfigField "String", "DISCOVER_URL", '"https://discover-mobile-staging.perawallet.app/"'
buildConfigField "String", "DISCOVER_BROWSE_DAPP_URL", '"https://discover-mobile-staging.perawallet.app/main/browser"'
buildConfigField "String", "MELD_URL", '"https://mainnet.staging.api.perawallet.app/v1/onramp-services/meld/redirect-to-fluidmoney/?walletAddress="'
}
prod {
dimension "server"
apiKeyProps.load(new FileInputStream(file('../app/src/prod/api-key.properties')))
buildConfigField "String", "ALGORAND_BASE_URL", '"https://node-mainnet.chain.perawallet.app/"'
buildConfigField "String", "ALGORAND_API_KEY", apiKeyProps["ALGORAND_API_KEY"]
buildConfigField "String", "INDEXER_API_KEY", apiKeyProps["INDEXER_API_KEY"]
buildConfigField "String", "MOBILE_API_KEY", apiKeyProps["MOBILE_API_KEY"]
buildConfigField "String", "MOBILE_ALGORAND_MAINNET_BASE_URL", '"https://mainnet.api.perawallet.app/"'
buildConfigField "String", "MOBILE_ALGORAND_TESTNET_BASE_URL", '"https://testnet.api.perawallet.app/"'
buildConfigField "String", "PERA_3D_EXPLORER_BASE_URL", '"https://static-hosting.perawallet.app/3dviewer/index.html"'
buildConfigField "String", "DISCOVER_WEBVIEW_USERNAME", apiKeyProps["DISCOVER_WEBVIEW_USERNAME"]
buildConfigField "String", "DISCOVER_WEBVIEW_PASSWORD", apiKeyProps["DISCOVER_WEBVIEW_PASSWORD"]
buildConfigField "String", "DISCOVER_VERSION", "\"${discoverVersions.prod}\""
buildConfigField "String", "DISCOVER_URL", '"https://discover-mobile.perawallet.app/"'
buildConfigField "String", "DISCOVER_BROWSE_DAPP_URL", '"https://discover-mobile.perawallet.app/main/browser"'
buildConfigField "String", "MELD_URL", '"https://mainnet.api.perawallet.app/v1/onramp-services/meld/redirect-to-fluidmoney/?walletAddress="'
}
}
kapt {
correctErrorTypes = true
}
compileOptions {
coreLibraryDesugaringEnabled true
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
sourceSets {
// Adds exported schema location as test app assets.
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
}
buildFeatures {
viewBinding true
buildConfig = true
}
namespace application.applicationId
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${libVersions.coroutines}"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${libVersions.coroutines}"
implementation "com.google.android.material:material:${libVersions.material}"
implementation "com.google.android.flexbox:flexbox:${libVersions.flexbox}"
implementation "androidx.appcompat:appcompat:${libVersions.appCompat}"
implementation "androidx.legacy:legacy-support-v4:${libVersions.legacySupport}"
implementation "androidx.lifecycle:lifecycle-extensions:${libVersions.lifecycleExt}"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:${libVersions.lifecycle}"
implementation "androidx.lifecycle:lifecycle-common-java8:${libVersions.lifecycle}"
implementation "androidx.constraintlayout:constraintlayout:${libVersions.constraintLayout}"
implementation "androidx.core:core-ktx:${libVersions.coreKtx}"
implementation platform("com.google.firebase:firebase-bom:${libVersions.firebaseBom}")
implementation "com.google.firebase:firebase-analytics"
implementation "com.google.firebase:firebase-messaging"
implementation "com.google.firebase:firebase-crashlytics"
implementation "com.google.firebase:firebase-perf"
implementation "androidx.biometric:biometric:${libVersions.biometric}"
implementation "com.journeyapps:zxing-android-embedded:${libVersions.zxing}"
implementation "androidx.room:room-runtime:${libVersions.room}"
implementation "androidx.room:room-ktx:${libVersions.room}"
kapt "androidx.room:room-compiler:${libVersions.room}"
implementation "androidx.navigation:navigation-fragment-ktx:${libVersions.navigation}"
implementation "androidx.navigation:navigation-ui-ktx:${libVersions.navigation}"
implementation "no.nordicsemi.android:ble:${libVersions.ble}"
implementation "androidx.fragment:fragment-ktx:${libVersions.fragment}"
implementation "androidx.multidex:multidex:${libVersions.multidex}"
implementation "androidx.browser:browser:${libVersions.browser}"
implementation "androidx.paging:paging-runtime-ktx:${libVersions.paging}"
implementation "com.google.crypto.tink:tink-android:${libVersions.tink}"
implementation "com.google.android.play:core:${libVersions.playcore}"
implementation "com.google.dagger:hilt-android:$dagger_gradle_version"
kapt "com.google.dagger:hilt-android-compiler:$dagger_gradle_version"
kapt "androidx.hilt:hilt-compiler:${libVersions.hiltCompiler}"
implementation "com.github.bumptech.glide:glide:${libVersions.glide}"
kapt "com.github.bumptech.glide:compiler:${libVersions.glide}"
implementation "com.airbnb.android:lottie:${libVersions.lottie}"
implementation "com.squareup.retrofit2:retrofit:${libVersions.retrofit}"
implementation "com.squareup.retrofit2:converter-gson:${libVersions.retrofit}"
implementation "com.squareup.okhttp3:logging-interceptor:${libVersions.okhttp}"
implementation "com.hipo.macaron:hipoexceptions:${libVersions.hipoexceptions}"
// Chart
implementation "com.github.PhilJay:MPAndroidChart:${libVersions.mpAndroidChart}"
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:${libVersions.desugar}"
// Wallet Connect v1
implementation "org.java-websocket:Java-WebSocket:${libVersions.javaWebSocket}"
implementation "com.github.komputing:khex:${libVersions.khex}"
implementation "com.squareup.moshi:moshi:${libVersions.moshi}"
implementation "com.squareup.moshi:moshi-kotlin:${libVersions.moshi}"
// Wallet Connect v2
implementation(platform("com.walletconnect:android-bom:${libVersions.walletConnectBom}"))
implementation("com.walletconnect:android-core") {
exclude group: 'com.jakewharton.timber', module: 'timber'
}
implementation "com.walletconnect:sign"
// ExoPlayer
implementation "com.google.android.exoplayer:exoplayer:${libVersions.exoPlayer}"
implementation("com.algorand:algosdk:${libVersions.algoSdk}") {
exclude group: 'org.bouncycastle'
}
// Test
testImplementation "junit:junit:${testLibVersions.junit}"
androidTestImplementation "androidx.room:room-testing:${libVersions.room}"
androidTestImplementation "androidx.test:runner:${testLibVersions.runner}"
androidTestImplementation "androidx.test.espresso:espresso-core:${testLibVersions.espresso}"
}