-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathbuild.gradle
198 lines (166 loc) · 6 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
plugins {
id "com.jraska.module.graph.assertion" version "2.6.0"
id "com.github.triplet.play" version "3.9.1"
id "com.jraska.github.client.firebase"
id 'com.jraska.gradle.buildtime'
id 'com.jraska.github.client.release'
id 'com.jraska.module.stats'
id 'com.jraska.module.lint.report'
id 'com.spotify.ruler'
id 'com.jraska.appsize.report'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
android {
namespace 'com.jraska.github.client'
compileSdk 34
defaultConfig {
applicationId "com.jraska.github.client"
minSdkVersion 26
targetSdkVersion 34
versionName '0.67.0'
versionCode 190
multiDexEnabled true
testInstrumentationRunner "com.jraska.github.client.TestRunner"
}
signingConfigs {
debug {
storeFile file("debug.keystore")
storePassword "github-client"
keyAlias "github-client"
keyPassword "github-client"
}
release {
storeFile file("prod.keystore")
storePassword = System.getenv('CLIENT_GITHUB_STORE_PASS')
keyAlias "prod"
keyPassword System.getenv('CLIENT_GITHUB_KEY_PASS')
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
minifyEnabled false
applicationIdSuffix '.dev'
versionNameSuffix '-dev'
}
release {
signingConfig signingConfigs.release
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
testOptions {
unitTests.returnDefaultValues = true
}
packagingOptions {
resources {
excludes += ['META-INF/licenses/ASM', 'META-INF/AL2.0', 'META-INF/LGPL2.1']
}
}
if (gradle.startParameter.taskNames.any { it.contains("Firebase") }) {
sourceSets.androidTest.java {
srcDirs += ["../feature/about/src/androidTest/java"]
srcDirs += ["../feature/users/src/androidTest/java"]
}
sourceSets.androidTest.assets {
srcDirs += ["../feature/about/src/androidTest/assets"]
srcDirs += ["../feature/users/src/androidTest/assets"]
}
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation project(':core-api')
implementation project(':core')
implementation project(':core-android-api')
implementation project(':navigation-api')
implementation project(':feature:identity')
implementation project(':feature:identity-api')
implementation project(':feature:network-status')
implementation project(':feature:performance')
implementation project(':feature:push')
implementation project(':feature:push-api')
implementation project(':feature:users')
implementation project(':feature:repo')
implementation project(':feature:settings')
implementation project(':feature:about')
implementation project(':feature:shortcuts')
implementation project(':feature:chrome-custom-tabs')
implementation project(':feature:in-app-update')
implementation project(':feature:config-debug')
implementation project(':feature:config-debug-api')
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.browser:browser:1.8.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.core:core:1.13.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.lifecycle:lifecycle-runtime:2.7.0'
implementation 'androidx.media:media:1.7.0'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
implementation 'com.airbnb.android:epoxy:5.1.4'
implementation 'com.google.android.material:material:1.12.0'
implementation platform('com.google.firebase:firebase-bom:33.0.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-config'
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-messaging'
implementation 'com.google.firebase:firebase-database'
implementation fresco
kapt daggerAnnotationProcessor
implementation dagger
implementation retrofit
implementation 'com.jakewharton.threetenabp:threetenabp:1.4.7'
implementation okHttpLoggingInterceptor
implementation 'com.jakewharton.timber:timber:5.0.1'
implementation 'com.google.code.gson:gson:2.10.1'
androidTestImplementation espressoCore
androidTestImplementation espressoIdlingResource
androidTestImplementation androidTestRunner
androidTestImplementation 'org.assertj:assertj-core:3.26.3'
androidTestImplementation project(':core-testing')
androidTestImplementation project(':core-android-testing')
androidTestImplementation coroutinesJvm
androidTestImplementation retrofit
androidTestImplementation retrofitGsonConverter
androidTestImplementation okHttpMockWebServer
kaptAndroidTest daggerAnnotationProcessor
}
apply plugin: 'com.jraska.module.graph.assertion'
moduleGraphAssert {
maxHeight = 2
allowed = [":app -> .*", ".* -> [\\S:]*-api"]
restricted = ["[\\S:]*-api -X> [\\S:]*-api"]
assertOnAnyBuild = true
}
play {
track = 'internal'
serviceAccountCredentials = file("$buildDir/play-publish-key.json")
}
ruler {
abi.set("arm64-v8a")
locale.set("en")
screenDensity.set(480)
sdkVersion.set(27)
}
ext.referenceDevice = "arm64-v8a-en-480dpi-api27"
project.afterEvaluate {
if (gradle.startParameter.taskNames.any { it.startsWith("publishBundle") }) {
def credentials = System.getenv("PLAY_PUBLISHER_CREDENTIALS")
if (credentials == null) {
throw new GradleException("PLAY_PUBLISHER_CREDENTIALS not set, cannot release")
}
buildDir.mkdir()
new File("$buildDir/play-publish-key.json").write(credentials)
// https://github.com/Triple-T/gradle-play-publisher/issues/859
tasks.named("publishBundle").configure {
it.dependsOn("uploadCrashlyticsMappingFileRelease")
}
}
}