1
1
// :mobile build.gradle
2
2
plugins {
3
- id " com.android.application"
4
- id " androidx.navigation.safeargs"
3
+ alias(libs. plugins. android. application)
4
+ alias(libs. plugins. androidx. navigation. safeargs)
5
+ alias(libs. plugins. androidx. room)
5
6
}
6
7
7
8
/* * Load API access-token from file `token.properties` */
@@ -27,18 +28,17 @@ android {
27
28
minSdk 22
28
29
targetSdk 34
29
30
applicationId ' io.syslogic.github'
31
+ // noinspection GroovyConstructorNamedArguments
30
32
manifestPlaceholders = [ accessToken : " " ]
31
33
versionName rootProject. ext. get(' versionName' )
32
34
versionCode rootProject. ext. get(' versionCode' )
33
35
testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
34
36
testBuildType " debug"
35
37
multiDexEnabled true
38
+ }
36
39
37
- javaCompileOptions {
38
- annotationProcessorOptions {
39
- arguments = [ " room.schemaLocation" : " $rootDir /schema" . toString() ]
40
- }
41
- }
40
+ room {
41
+ schemaDirectory(" ${ rootDir} /schema" )
42
42
}
43
43
44
44
compileOptions {
@@ -47,8 +47,8 @@ android {
47
47
}
48
48
49
49
sourceSets {
50
- main {
51
- androidTest . assets. srcDirs + = files(" $projectDir /schemas" . toString())
50
+ androidTest {
51
+ assets. srcDirs + = files(" $projectDir /schemas" . toString())
52
52
}
53
53
}
54
54
@@ -80,6 +80,7 @@ android {
80
80
debug {
81
81
applicationIdSuffix " .debug"
82
82
signingConfig signingConfigs. debug
83
+ // noinspection GroovyConstructorNamedArguments
83
84
manifestPlaceholders = [ accessToken : " ${ accessToken} " ]
84
85
renderscriptDebuggable true
85
86
pseudoLocalesEnabled false
@@ -91,6 +92,7 @@ android {
91
92
}
92
93
release {
93
94
signingConfig signingConfigs. release
95
+ // noinspection GroovyConstructorNamedArguments
94
96
manifestPlaceholders = [ accessToken : " " ]
95
97
proguardFile " ${ project.rootDir} /proguard/android.pro"
96
98
proguardFile " ${ project.rootDir} /proguard/androidx.pro"
@@ -122,73 +124,73 @@ dependencies {
122
124
api project(path : ' :library' )
123
125
124
126
// Material Design Components
125
- implementation " com.google.android. material:material: $m aterial_design_version "
127
+ implementation libs . material. design
126
128
127
129
// Annotations
128
- implementation " androidx.annotation:annotation: $a ndroidx_annotation_version "
130
+ implementation libs . androidx. annotation
129
131
130
132
// Flexbox Layout
131
- implementation " com.google.android. flexbox:flexbox: $f lexbox_version "
133
+ implementation libs . flexbox
132
134
133
135
// https://developer.android.com/jetpack/androidx/
134
- implementation " androidx.appcompat:appcompat: $a ndroidx_appcompat_version "
135
- implementation " androidx.core:core- splashscreen: $a ndroidx_splash_version "
136
- implementation " androidx.recyclerview:recyclerview: $a ndroidx_recyclerview_version "
137
- implementation " androidx.preference:preference: $a ndroidx_preference_version "
138
- implementation " androidx.cardview:cardview: $a ndroidx_cardview_version "
136
+ implementation libs . androidx. appcompat
137
+ implementation libs . androidx. splashscreen
138
+ implementation libs . androidx. recyclerview
139
+ implementation libs . androidx. preference
140
+ implementation libs . androidx. cardview
139
141
140
142
// Navigation
141
- androidTestImplementation " androidx.navigation:navigation- testing: $a ndroidx_navigation_version "
142
- implementation " androidx.navigation:navigation- fragment: $a ndroidx_navigation_version "
143
+ androidTestImplementation libs . androidx. navigation. testing
144
+ implementation libs . androidx. navigation. fragment
143
145
144
146
// Fragment
145
- androidTestImplementation " androidx.fragment:fragment- testing: $a ndroidx_fragment_version "
146
- implementation " androidx.fragment:fragment: $a ndroidx_fragment_version "
147
+ androidTestImplementation libs . androidx. fragment. testing
148
+ implementation libs . androidx. fragment
147
149
148
150
// Room Runtime
149
- annotationProcessor " androidx.room:room- compiler: $a ndroidx_room_version "
150
- testImplementation " androidx.room:room- testing: $a ndroidx_room_version "
151
- implementation " androidx.room:room- runtime: $a ndroidx_room_version "
151
+ annotationProcessor libs . androidx. room. compiler
152
+ testImplementation libs . androidx. room. testing
153
+ implementation libs . androidx. room. runtime
152
154
153
155
// Retrofit2
154
- implementation " com.google.code. gson:gson: $g son_version "
155
- implementation " com.squareup.retrofit2: retrofit: $r etrofit_version "
156
- implementation (" com.squareup.retrofit2:converter- gson: $r etrofit_version " ) {
156
+ implementation libs . gson
157
+ implementation libs . retrofit
158
+ implementation (libs . retrofit . gson. converter ) {
157
159
exclude group : " com.google.code.gson" , module : " gson"
158
160
}
159
161
160
162
// https://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit
161
- implementation " org.eclipse. jgit:org.eclipse.jgit: $j git_version "
163
+ implementation libs . jgit
162
164
163
165
// https://mvnrepository.com/artifact/org.slf4j/slf4j-simple
164
166
// api "org.slf4j:slf4j-nop:$slf4j_version"
165
- api " org .slf4j:slf4j-simple: $s lf4j_version "
167
+ api libs . slf4j
166
168
167
169
// jUnit
168
- testImplementation " junit:junit: $j unit_version "
170
+ testImplementation libs . junit
169
171
170
172
// Required for connected tests.
171
173
// https://mvnrepository.com/artifact/androidx.test/monitor
172
- debugImplementation " androidx.test: monitor: $a ndroidx_test_monitor_version "
174
+ debugImplementation libs . androidx. test. monitor
173
175
174
176
// https://mvnrepository.com/artifact/androidx.test.ext
175
- androidTestImplementation " androidx.test.ext: junit: $a ndroidx_test_junit_version "
177
+ androidTestImplementation libs . androidx. test. junit
176
178
177
179
// https://mvnrepository.com/artifact/androidx.test
178
180
// https://developer.android.com/jetpack/androidx/releases/test
179
- androidTestImplementation " androidx.test: core: $a ndroidx_test_core_version "
180
- androidTestImplementation " androidx.test: runner: $a ndroidx_test_runner_version "
181
- androidTestImplementation " androidx.test: rules: $a ndroidx_test_rules_version "
181
+ androidTestImplementation libs . androidx. test. core
182
+ androidTestImplementation libs . androidx. test. runner
183
+ androidTestImplementation libs . androidx. test. rules
182
184
183
185
// https://mvnrepository.com/artifact/androidx.test.uiautomator/uiautomator
184
- androidTestImplementation " androidx.test.uiautomator:uiautomator: $a ndroidx_test_uiautomator_version "
186
+ androidTestImplementation libs . androidx. test. uiautomator
185
187
186
188
// Espresso
187
- androidTestImplementation " androidx.test.espresso:espresso-core:$androidx_test_espresso_version "
189
+ androidTestImplementation libs. androidx. espresso. core
190
+ androidTestImplementation libs. androidx. espresso. web
188
191
// androidTestImplementation "androidx.test.espresso:espresso-contrib:$androidx_test_espresso_version"
189
192
// androidTestImplementation "androidx.test.espresso:espresso-intents:$androidx_test_espresso_version"
190
193
// androidTestImplementation "androidx.test.espresso:espresso-accessibility:$androidx_test_espresso_version"
191
- androidTestImplementation " androidx.test.espresso:espresso-web:$androidx_test_espresso_version "
192
194
// androidTestImplementation "androidx.test.espresso.idling:idling-concurrent:$espresso_version"
193
195
194
196
// The following dependency can be either "implementation" or "androidTestImplementation",
0 commit comments