forked from Automattic/pocket-casts-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdependencies.gradle
290 lines (270 loc) · 17.3 KB
/
dependencies.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
287
288
289
290
final VERSION_CODE_DIFFERENCE_BETWEEN_APP_AND_AUTOMOTIVE = 50000
def secretProperties = loadPropertiesFromFile(file("$rootDir/secret.properties") )
def versionProperties = loadPropertiesFromFile(file("${rootDir}/version.properties"))
static def loadPropertiesFromFile(inputFile) {
def properties = new Properties()
if (inputFile.exists()) {
inputFile.withInputStream { stream ->
properties.load(stream)
}
}
return properties
}
// Unfortunately we currently need to rely on a property to separate the version code between app & automotive builds.
// This is mainly because the library modules use the version code information from BuildConfig directly instead
// of receiving from the clients.
//
// On the bright side, the difference between the app & automotive modules is a static number, so even if there is
// an issue and the wrong version code information is used, it'd be easy to identify it.
//
// The long term solution is to move the version information out of the `base.gradle` and into the specific
// app & automotive modules and pass this information to the modules that require it.
def isAutomotiveBuild = (project.findProperty("IS_AUTOMOTIVE_BUILD") ?: false).toBoolean()
def getVersionCode = {
def appVersionCode = versionProperties.getProperty("versionCode", null).toInteger()
if (isAutomotiveBuild) {
return appVersionCode + VERSION_CODE_DIFFERENCE_BETWEEN_APP_AND_AUTOMOTIVE
}
return appVersionCode
}
def getVersionName = {
def versionName = versionProperties.getProperty("versionName", null)
if (isAutomotiveBuild) {
return "${versionName}a"
}
return versionName
}
project.ext {
// Application
applicationId = 'au.com.shiftyjelly.pocketcasts'
versionName = getVersionName()
versionCode = getVersionCode()
// Android
minSdkVersion = 23
minSdkVersionWear = 26
targetSdkVersion = 33
compileSdkVersion = 33
testInstrumentationRunner = 'androidx.test.runner.AndroidJUnitRunner'
// App Signing
storeFile = file("$rootDir/${secretProperties.getProperty("signingKeyStoreFile", null)}")
if (storeFile.exists()) {
// Use secret properties
storePassword = secretProperties.getProperty("signingKeyStorePassword", null)
keyAlias = secretProperties.getProperty("signingKeyAlias", null)
keyPassword = secretProperties.getProperty("signingKeyPassword", null)
} else {
// Check local gradle properties
def keystoreFilePropertyKey = "pocketcastsKeyStoreFile"
if (project.hasProperty(keystoreFilePropertyKey)) {
storeFile = file(project.getProperty(keystoreFilePropertyKey))
storePassword = project.getProperty("pocketcastsKeyStorePassword")
keyAlias = project.getProperty("pocketcastsKeyStoreAlias")
keyPassword = project.getProperty("pocketcastsKeyStoreAliasPassword")
}
}
canSignRelease = storeFile.exists()
// Secrets
settingsEncryptSecret = secretProperties.getProperty("pocketcastsSettingsEncryptSecret", "")
sharingServerSecret = secretProperties.getProperty("pocketcastsSharingServerSecret", "")
pocketcastsSentryDsn = secretProperties.getProperty("pocketcastsSentryDsn", "")
googleSignInServerClientId = secretProperties.getProperty("googleSignInServerClientId", "")
// Library versions
versionAccessibilityTestFramework = '4.0.0'
versionBillingClient = '5.0.0'
versionCompose = '1.4.2' // When updating this, also check if versionComposeAccompanist should be updated as well: https://github.com/google/accompanist#compose-versions
versionComposeAccompanist = '0.30.1'
versionComposeCompiler = '1.3.0'
versionComposeWear = '1.2.0-alpha07'
versionDagger = '2.41'
versionEspresso = '3.4.0'
versionMedia3 = '1.0.0'
versionGlide = '4.13.2'
versionHilt = '2.43.2'
// When updating this, check to see if versionComposeWear will be updated as well (and update that variable if appropriate)
// https://github.com/google/horologist/blob/main/gradle/libs.versions.toml
versionHorologist = '0.4.2'
versionKotlinCoroutines = '1.6.4'
versionLifecycle = '2.6.0'
versionMoshi = '1.13.0'
versionNavigation = '2.5.1'
versionPaging = '3.1.1'
versionRetrofit = '2.9.0'
versionRoom = '2.4.3'
versionTest = '1.5.0'
versionWork = '2.7.1'
versionAccessibilityTestFramework = '4.0.0'
// Automattic library versions
versionTracks = 'trunk-b3655d42123501a1d9a304789b738610ab4403c8'
androidLibs = [
appCompat: "androidx.appcompat:appcompat:1.5.0",
auth: "com.google.android.gms:play-services-auth:20.4.0",
mediarouter: "androidx.mediarouter:mediarouter:1.3.1",
palette: "androidx.palette:palette:1.0.0",
recyclerview: "androidx.recyclerview:recyclerview:1.2.1",
swipeToRefresh: "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0",
design: "com.google.android.material:material:1.5.0",
cardview: "androidx.cardview:cardview:1.0.0",
browser: "androidx.browser:browser:1.4.0",
percent: "androidx.percentlayout:percentlayout:1.0.0-rc02",
preference: "androidx.preference:preference:1.2.0",
cast: "com.google.android.gms:play-services-cast-framework:21.2.0",
desugarJdk: "com.android.tools:desugar_jdk_libs:1.1.5",
// Firebase BoM (Bill of Materials enables you to manage all your Firebase library versions by specifying only one version)
firebaseBom: "com.google.firebase:firebase-bom:30.5.0",
firebaseAnalytics: "com.google.firebase:firebase-analytics-ktx",
firebaseConfig: "com.google.firebase:firebase-config-ktx",
constraintLayout: "androidx.constraintlayout:constraintlayout:2.1.4",
ktx: "androidx.core:core-ktx:1.9.0",
ktxFragment: "androidx.fragment:fragment-ktx:1.5.2",
ktxPreference: "androidx.preference:preference-ktx:1.2.0",
annotations: "androidx.annotation:annotation:1.3.0",
liveDataReactiveStreams: "androidx.lifecycle:lifecycle-reactivestreams-ktx:$versionLifecycle",
lifecycleViewModel: "androidx.lifecycle:lifecycle-viewmodel-ktx:$versionLifecycle",
lifecycleScope: "androidx.lifecycle:lifecycle-runtime-ktx:$versionLifecycle",
lifecycleLiveData: "androidx.lifecycle:lifecycle-livedata-ktx:$versionLifecycle",
lifecycleProcess: "androidx.lifecycle:lifecycle-process:$versionLifecycle",
billing: "com.android.billingclient:billing:$versionBillingClient",
billingKtx: "com.android.billingclient:billing-ktx:$versionBillingClient",
openSource: 'com.google.android.gms:play-services-oss-licenses:17.0.0',
browserHelper: 'com.google.androidbrowserhelper:androidbrowserhelper:2.3.0',
flexbox: 'com.google.android.flexbox:flexbox:3.0.0',
androidTestCore: "androidx.test:core:$versionTest",
room: "androidx.room:room-runtime:$versionRoom",
roomRx: "androidx.room:room-rxjava2:$versionRoom",
roomKtx: "androidx.room:room-ktx:$versionRoom",
roomCompile: "androidx.room:room-compiler:$versionRoom",
roomTest: "androidx.room:room-testing:$versionRoom",
paging: "androidx.paging:paging-runtime:$versionPaging",
pagingRx: "androidx.paging:paging-rxjava2:$versionPaging",
testRunner: "androidx.test:runner:$versionTest",
testRules: "androidx.test:rules:$versionTest",
testEspressoCore: "androidx.test.espresso:espresso-core:$versionEspresso",
testEspressoContrib: "androidx.test.espresso:espresso-contrib:$versionEspresso",
testExpressoWeb: "androidx.test.espresso:espresso-web:$versionEspresso",
testExpressoIdlingConcurrent: "androidx.test.espresso.idling:idling-concurrent:$versionEspresso",
testExpressoIdlingResouce: "androidx.test.espresso:espresso-idling-resource:$versionEspresso",
testUiautomator: "androidx.test.uiautomator:uiautomator:2.2.0",
junitExt: "androidx.test.ext:junit:1.1.3",
workManager: "androidx.work:work-runtime-ktx:$versionWork",
workManagerRx: "androidx.work:work-rxjava2:$versionWork",
workManagerTest: "androidx.work:work-testing:$versionWork",
navigationFragment: "androidx.navigation:navigation-fragment-ktx:$versionNavigation",
navigationUi: "androidx.navigation:navigation-ui-ktx:$versionNavigation",
viewPager: "androidx.viewpager2:viewpager2:1.0.0",
composeActivity: "androidx.activity:activity-compose:1.5.1",
composeAnimation: "androidx.compose.animation:animation:$versionCompose",
composeConstraint: "androidx.constraintlayout:constraintlayout-compose:1.0.1",
composeIcons: "androidx.compose.material:material-icons-extended:$versionCompose",
composeLiveData: "androidx.compose.runtime:runtime-livedata:$versionCompose",
composeMaterial: "androidx.compose.material:material:$versionCompose",
composeMaterialIconsExtended: "androidx.compose.material:material-icons-extended:$versionCompose",
composeNavigation: "androidx.navigation:navigation-compose:$versionNavigation",
composeUi: "androidx.compose.ui:ui:$versionCompose",
composeUiTestManifest: "androidx.compose.ui:ui-test-manifest:$versionCompose",
composeUiTestJunit: "androidx.compose.ui:ui-test-junit4:$versionCompose",
composeUiTooling: "androidx.compose.ui:ui-tooling:$versionCompose",
composeUiToolingPreview: "androidx.compose.ui:ui-tooling-preview:$versionCompose",
composeRx: "androidx.compose.runtime:runtime-rxjava2:$versionCompose",
composeViewModel: "androidx.lifecycle:lifecycle-viewmodel-compose:$versionLifecycle",
composeUiUtil: "androidx.compose.ui:ui-util:$versionCompose",
guava: 'com.google.guava:guava:27.1-android', // Required to fix conflict between versions in exoplayer and workmanager
wearComposeMaterial: "androidx.wear.compose:compose-material:$versionComposeWear",
wearComposeFoundation: "androidx.wear.compose:compose-foundation:$versionComposeWear",
wearComposeNavigation: "androidx.wear.compose:compose-navigation:$versionComposeWear",
wearPlayServices: "com.google.android.gms:play-services-wearable:18.0.0",
horologistAudioUi: "com.google.android.horologist:horologist-audio-ui:$versionHorologist",
horologistAuthData: "com.google.android.horologist:horologist-auth-data:$versionHorologist",
horologistAuthComposables: "com.google.android.horologist:horologist-auth-composables:$versionHorologist",
horologistAuthDataPhone: "com.google.android.horologist:horologist-auth-data-phone:$versionHorologist",
horologistAuthUi: "com.google.android.horologist:horologist-auth-ui:$versionHorologist",
horologistBaseUi: "com.google.android.horologist:horologist-base-ui:$versionHorologist",
horologistComposeLayout: "com.google.android.horologist:horologist-compose-layout:$versionHorologist",
horologistDatalayer: "com.google.android.horologist:horologist-datalayer:$versionHorologist",
horologistMedia: "com.google.android.horologist:horologist-media:$versionHorologist",
horologistMedia3Backend: "com.google.android.horologist:horologist-media3-backend:$versionHorologist",
horologistMediaUi: "com.google.android.horologist:horologist-media-ui:$versionHorologist",
horologistMediaData: "com.google.android.horologist:horologist-media-data:$versionHorologist",
horologistNetworkAwarness: "com.google.android.horologist:horologist-network-awareness:$versionHorologist",
media3DatasourceOkhttp: "androidx.media3:media3-datasource-okhttp:$versionMedia3",
// Fixes instrumentation tests, see: https://github.com/android/android-test/issues/861#issuecomment-1180219978
accessibilityTestFramework: "com.google.android.apps.common.testing.accessibility.framework:accessibility-test-framework:$versionAccessibilityTestFramework"
]
libs = [
kotlin: "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version",
kotlinJdk8: "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.10",
kotlinCoroutines: "org.jetbrains.kotlinx:kotlinx-coroutines-core:$versionKotlinCoroutines",
kotlinCoroutinesAndroid: "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versionKotlinCoroutines",
kotlinCoroutinesPlayServices: "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$versionKotlinCoroutines",
kotlinCoroutinesRx: "org.jetbrains.kotlinx:kotlinx-coroutines-rx2:$versionKotlinCoroutines",
kotlinCoroutinesTest: "org.jetbrains.kotlinx:kotlinx-coroutines-test:$versionKotlinCoroutines",
// Retrofit
retrofit: "com.squareup.retrofit2:retrofit:$versionRetrofit",
retrofitMoshi: "com.squareup.retrofit2:converter-moshi:$versionRetrofit",
retrofitRxJava: "com.squareup.retrofit2:adapter-rxjava2:$versionRetrofit",
moshi: "com.squareup.moshi:moshi:$versionMoshi",
moshiKotlinCompile: "com.squareup.moshi:moshi-kotlin-codegen:$versionMoshi",
moshiAdapters: "com.squareup.moshi:moshi-adapters:$versionMoshi",
// Timber (logging) - https://github.com/JakeWharton/timber
timber: "com.jakewharton.timber:timber:5.0.1",
// Android device names for debug email - https://bintray.com/bintray/jcenter/com.jaredrummler%3Aandroid-device-names
deviceNames: "com.jaredrummler:android-device-names:2.1.0",
// Media3
media3Cast: "androidx.media3:media3-cast:$versionMedia3",
media3Datasource: "androidx.media3:media3-datasource:$versionMedia3",
media3Exoplayer: "androidx.media3:media3-exoplayer:$versionMedia3",
media3ExoplayerHls: "androidx.media3:media3-exoplayer-hls:$versionMedia3",
media3Extractor: "androidx.media3:media3-extractor:$versionMedia3",
media3Ui: "androidx.media3:media3-ui:$versionMedia3",
// Material Dialog - https://github.com/afollestad/material-dialogs
materialDialog: "com.afollestad.material-dialogs:core:3.3.0",
// Glide (image loading) - https://github.com/bumptech/glide
glide: "com.github.bumptech.glide:glide:$versionGlide",
glideOkHttp: "com.github.bumptech.glide:okhttp3-integration:$versionGlide",
glideCompile: "com.github.bumptech.glide:compiler:$versionGlide",
coil: "io.coil-kt:coil:2.2.1",
coilCompose: "io.coil-kt:coil-compose:2.2.1",
// OkHttp (http client) - https://github.com/square/okhttp
okHttp: "com.squareup.okhttp3:okhttp:4.9.3",
okHttpLogging: "com.squareup.okhttp3:logging-interceptor:4.9.3",
// RxJava - https://github.com/ReactiveX/RxAndroid/releases
rxAndroid: "io.reactivex.rxjava2:rxandroid:2.1.1",
rxJava: "io.reactivex.rxjava2:rxjava:2.2.21",
rxRelay: "com.jakewharton.rxrelay2:rxrelay:2.1.1",
// RxKotlin
rxKoltin: "io.reactivex.rxjava2:rxkotlin:2.4.0",
// Hilt
hiltAndroid: "com.google.dagger:hilt-android:$versionHilt",
hiltDaggerCompiler: "com.google.dagger:hilt-compiler:$versionHilt",
hiltCompiler: "androidx.hilt:hilt-compiler:1.0.0",
hiltWorkManager: "androidx.hilt:hilt-work:1.0.0",
hiltNavigationCompose: "androidx.hilt:hilt-navigation-compose:1.0.0",
// Lottie
lottie: "com.airbnb.android:lottie:5.2.0",
lottieCompose: "com.airbnb.android:lottie-compose:5.2.0",
// JUnit
junit: "junit:junit:4.13.2",
// Mockito
testMockitoAndroid: "org.mockito:mockito-android:4.6.1",
testMokitoKotlin: "org.mockito.kotlin:mockito-kotlin:4.0.0",
testMokitoKotlinInline: 'org.mockito:mockito-inline:4.4.0',
// MaterialProgressBar
materialProgressBar: "me.zhanghai.android.materialprogressbar:library:1.6.1",
// JSONassert - https://github.com/skyscreamer/JSONassert
jsonAssert: 'org.skyscreamer:jsonassert:1.5.0',
mockWebServer: "com.squareup.okhttp3:mockwebserver:4.9.3",
barista: "com.adevinta.android:barista:4.2.0",
// Accompanist - https://google.github.io/accompanist/
accompanistFlowLayout: "com.google.accompanist:accompanist-flowlayout:$versionComposeAccompanist",
accompanistSystemUiController: "com.google.accompanist:accompanist-systemuicontroller:$versionComposeAccompanist",
// Automattic Tracks
automatticTracks: "com.automattic:Automattic-Tracks-Android:$versionTracks",
// Sentry
sentryBom: 'io.sentry:sentry-bom:6.4.2',
sentry: 'io.sentry:sentry-android',
sentryFragment: 'io.sentry:sentry-android-fragment',
sentryTimber: 'io.sentry:sentry-android-timber',
// AboutLibraries - https://github.com/mikepenz/AboutLibraries
aboutLibrariesCore: 'com.mikepenz:aboutlibraries-core:10.5.0',
aboutLibrariesCompose: 'com.mikepenz:aboutlibraries-compose:10.5.0',
]
}