forked from Automattic/pocket-casts-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.gradle
286 lines (255 loc) · 11.5 KB
/
base.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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-parcelize'
apply plugin: 'kotlin-kapt'
apply plugin: 'dagger.hilt.android.plugin'
def SERVER_MAIN_URL_PROD = "\"https://refresh.pocketcasts.com\""
def SERVER_API_URL_PROD = "\"https://api.pocketcasts.com\""
def SERVER_CACHE_URL_PROD = "\"https://cache.pocketcasts.com\""
def SERVER_STATIC_URL_PROD = "\"https://static.pocketcasts.com\""
def SERVER_SHARING_URL_PROD = "\"https://sharing.pocketcasts.com\""
def SERVER_LIST_URL_PROD = "\"https://lists.pocketcasts.com\""
def SERVER_LIST_HOST_PROD = "\"lists.pocketcasts.com\""
def SERVER_SHORT_URL_PROD = "\"https://pca.st\""
def WEB_BASE_HOST_PROD = "\"pocketcasts.com\""
android {
compileSdkVersion project.compileSdkVersion
defaultConfig {
minSdkVersion project.minSdkVersion
targetSdkVersion project.targetSdkVersion
versionCode project.versionCode
versionName project.versionName
buildConfigField 'int', 'VERSION_CODE', "${project.versionCode}"
buildConfigField 'String', 'VERSION_NAME', "\"${project.versionName}\""
buildConfigField "String", "SETTINGS_ENCRYPT_SECRET", "\"${project.settingsEncryptSecret}\""
buildConfigField "String", "SHARING_SERVER_SECRET", "\"${project.sharingServerSecret}\""
buildConfigField "String", "GOOGLE_SIGN_IN_SERVER_CLIENT_ID", "\"${project.googleSignInServerClientId}\""
// Feature Flags
buildConfigField "boolean", "END_OF_YEAR_ENABLED", "false"
buildConfigField "boolean", "SINGLE_SIGN_ON_ENABLED", "false"
testInstrumentationRunner project.testInstrumentationRunner
testApplicationId "au.com.shiftyjelly.pocketcasts.test" + project.name.replace("-", "_")
vectorDrawables.useSupportLibrary = true
}
lint {
abortOnError false
disable 'AppCompatResource', 'ContentDescription', 'DiffUtilEquals'
xmlReport true
}
compileOptions {
// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
// disable Kotlin warnings for Coroutines, working with the annotation @OptIn(DelicateCoroutinesApi::class)
freeCompilerArgs += [
"-opt-in=kotlin.RequiresOptIn"
]
kotlinOptions.allWarningsAsErrors = true
}
composeOptions {
kotlinCompilerExtensionVersion project.versionComposeCompiler
}
testOptions {
animationsDisabled = true
}
packagingOptions {
resources {
excludes += [
'META-INF/rxjava.properties',
'META-INF/AL2.0',
'META-INF/LGPL2.1',
'META-INF/licenses/ASM',
// Fixes issue running './gradlew connectedDebugAndroidTest' with clashing testing libraries.
'**/attach_hotspot_windows.dll'
]
}
}
if (canSignRelease) {
signingConfigs {
release {
storeFile = project.storeFile
storePassword = project.storePassword
keyAlias = project.keyAlias
keyPassword = project.keyPassword
}
}
}
buildTypes {
debug {
pseudoLocalesEnabled true
testCoverageEnabled false
ext.alwaysUpdateBuildId = false
buildConfigField "String", "SERVER_MAIN_URL", "\"https://refresh.pocketcasts.net\""
buildConfigField "String", "SERVER_API_URL", "\"https://api.pocketcasts.net\""
buildConfigField "String", "SERVER_CACHE_URL", "\"https://podcast-api.pocketcasts.net\""
buildConfigField "String", "SERVER_STATIC_URL", "\"https://static.pocketcasts.net\""
buildConfigField "String", "SERVER_SHARING_URL", "\"https://sharing.pocketcasts.net\""
buildConfigField "String", "SERVER_SHORT_URL", "\"https://pcast.pocketcasts.net\""
buildConfigField "String", "WEB_BASE_HOST", "\"pocket-casts-main-development.mystagingwebsite.com\""
buildConfigField "String", "SERVER_LIST_URL", "\"https://lists.pocketcasts.net\""
buildConfigField "String", "SERVER_LIST_HOST", "\"lists.pocketcasts.net\""
}
debugProd {
debuggable true
testCoverageEnabled false
ext.alwaysUpdateBuildId = false
buildConfigField "String", "SERVER_MAIN_URL", SERVER_MAIN_URL_PROD
buildConfigField "String", "SERVER_API_URL", SERVER_API_URL_PROD
buildConfigField "String", "SERVER_CACHE_URL", SERVER_CACHE_URL_PROD
buildConfigField "String", "SERVER_STATIC_URL", SERVER_STATIC_URL_PROD
buildConfigField "String", "SERVER_SHARING_URL", SERVER_SHARING_URL_PROD
buildConfigField "String", "SERVER_SHORT_URL", SERVER_SHORT_URL_PROD
buildConfigField "String", "WEB_BASE_HOST", WEB_BASE_HOST_PROD
buildConfigField "String", "SERVER_LIST_URL", SERVER_LIST_URL_PROD
buildConfigField "String", "SERVER_LIST_HOST", SERVER_LIST_HOST_PROD
}
release {
minifyEnabled true
debuggable false
proguardFiles getDefaultProguardFile('proguard-android.txt'), "$rootProject.rootDir.absolutePath/app/proguard-rules.pro"
buildConfigField "String", "SERVER_MAIN_URL", SERVER_MAIN_URL_PROD
buildConfigField "String", "SERVER_API_URL", SERVER_API_URL_PROD
buildConfigField "String", "SERVER_CACHE_URL", SERVER_CACHE_URL_PROD
buildConfigField "String", "SERVER_STATIC_URL", SERVER_STATIC_URL_PROD
buildConfigField "String", "SERVER_SHARING_URL", SERVER_SHARING_URL_PROD
buildConfigField "String", "SERVER_SHORT_URL", SERVER_SHORT_URL_PROD
buildConfigField "String", "WEB_BASE_HOST", WEB_BASE_HOST_PROD
buildConfigField "String", "SERVER_LIST_URL", SERVER_LIST_URL_PROD
buildConfigField "String", "SERVER_LIST_HOST", SERVER_LIST_HOST_PROD
if (canSignRelease) {
signingConfig signingConfigs.release
}
}
}
}
dependencies {
// Uncomment if you want to run with leak canary
//debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.6'
implementation androidLibs.appCompat
implementation androidLibs.auth
implementation androidLibs.ktx
implementation androidLibs.ktxFragment
implementation androidLibs.ktxPreference
implementation androidLibs.mediarouter
implementation androidLibs.palette
implementation androidLibs.recyclerview
implementation androidLibs.design
implementation androidLibs.cardview
implementation androidLibs.preference
implementation androidLibs.browser
implementation androidLibs.constraintLayout
implementation androidLibs.cast
implementation platform(androidLibs.firebaseBom)
implementation androidLibs.firebaseAnalytics
implementation androidLibs.firebaseConfig
implementation androidLibs.liveDataReactiveStreams
implementation androidLibs.lifecycleViewModel
implementation androidLibs.lifecycleScope
implementation androidLibs.lifecycleLiveData
implementation androidLibs.lifecycleProcess
implementation androidLibs.paging
implementation androidLibs.pagingRx
implementation androidLibs.workManager
implementation androidLibs.workManagerRx
implementation androidLibs.navigationFragment
implementation androidLibs.navigationUi
implementation androidLibs.billing
implementation androidLibs.billingKtx
implementation androidLibs.openSource
implementation androidLibs.viewPager
implementation androidLibs.swipeToRefresh
implementation androidLibs.browserHelper
implementation androidLibs.guava
implementation androidLibs.flexbox
implementation androidLibs.composeActivity
implementation androidLibs.composeAnimation
implementation androidLibs.composeConstraint
implementation androidLibs.composeIcons
implementation androidLibs.composeLiveData
implementation androidLibs.composeMaterial
implementation androidLibs.composeNavigation
implementation androidLibs.composeRx
implementation androidLibs.composeUi
implementation androidLibs.composeUiToolingPreview
implementation androidLibs.composeViewModel
implementation androidLibs.composeUiUtil
implementation libs.kotlinCoroutines
implementation libs.kotlinCoroutinesAndroid
implementation libs.kotlinCoroutinesPlayServices
implementation libs.kotlinCoroutinesRx
implementation libs.deviceNames
implementation libs.exoplayerCore
implementation libs.exoplayerUi
implementation libs.exoplayerMediaSession
implementation libs.exoplayerCast
implementation libs.glide
implementation libs.glideOkHttp
implementation libs.coil
implementation libs.coilCompose
implementation libs.okHttp
implementation libs.okHttpLogging
implementation libs.rxJava
implementation libs.rxAndroid
implementation libs.rxKoltin
implementation libs.rxRelay
implementation libs.retrofit
implementation libs.retrofitMoshi
implementation libs.retrofitRxJava
implementation libs.moshi
implementation libs.moshiAdapters
implementation libs.kotlin
implementation libs.timber
implementation libs.materialDialog
implementation libs.lottie
implementation libs.lottieCompose
implementation libs.materialProgressBar
implementation libs.hiltAndroid
implementation libs.hiltWorkManager
implementation libs.hiltNavigationCompose
implementation libs.accompanistFlowLayout
implementation libs.accompanistSystemUiController
implementation platform(libs.sentryBom)
implementation libs.sentry
implementation libs.sentryFragment
implementation libs.sentryTimber
kapt libs.moshiKotlinCompile
kapt libs.glideCompile
kapt libs.hiltCompiler
kapt libs.hiltDaggerCompiler
debugImplementation androidLibs.composeUiTooling
debugProdImplementation androidLibs.composeUiTooling
debugImplementation androidLibs.composeUiTestManifest
debugProdImplementation androidLibs.composeUiTestManifest
testImplementation libs.junit
testImplementation libs.jsonAssert
testImplementation libs.mockWebServer
testImplementation libs.testMokitoKotlin
testImplementation libs.testMokitoKotlinInline
testImplementation libs.kotlinCoroutinesTest
androidTestImplementation libs.jsonAssert
androidTestImplementation androidLibs.androidTestCore
androidTestImplementation androidLibs.roomTest
androidTestImplementation androidLibs.annotations
androidTestImplementation androidLibs.testRunner
androidTestImplementation androidLibs.testRules
androidTestImplementation androidLibs.testEspressoCore
androidTestImplementation androidLibs.testEspressoContrib
androidTestImplementation androidLibs.testExpressoWeb
androidTestImplementation androidLibs.testExpressoIdlingConcurrent
androidTestImplementation androidLibs.testExpressoIdlingResouce
androidTestImplementation androidLibs.testUiautomator
androidTestImplementation androidLibs.workManagerTest
androidTestImplementation androidLibs.composeUiTestJunit
androidTestImplementation libs.testMockitoAndroid
androidTestImplementation libs.testMokitoKotlin
androidTestImplementation libs.mockWebServer
androidTestImplementation(libs.barista) {
exclude group: 'org.jetbrains.kotlin'
}
coreLibraryDesugaring androidLibs.desugarJdk
}