11// :mobile build.gradle
22plugins {
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)
56}
67
78/* * Load API access-token from file `token.properties` */
@@ -27,18 +28,17 @@ android {
2728 minSdk 22
2829 targetSdk 34
2930 applicationId ' io.syslogic.github'
31+ // noinspection GroovyConstructorNamedArguments
3032 manifestPlaceholders = [ accessToken : " " ]
3133 versionName rootProject. ext. get(' versionName' )
3234 versionCode rootProject. ext. get(' versionCode' )
3335 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
3436 testBuildType " debug"
3537 multiDexEnabled true
38+ }
3639
37- javaCompileOptions {
38- annotationProcessorOptions {
39- arguments = [ " room.schemaLocation" : " $rootDir /schema" . toString() ]
40- }
41- }
40+ room {
41+ schemaDirectory(" ${ rootDir} /schema" )
4242 }
4343
4444 compileOptions {
@@ -47,8 +47,8 @@ android {
4747 }
4848
4949 sourceSets {
50- main {
51- androidTest . assets. srcDirs + = files(" $projectDir /schemas" . toString())
50+ androidTest {
51+ assets. srcDirs + = files(" $projectDir /schemas" . toString())
5252 }
5353 }
5454
@@ -80,6 +80,7 @@ android {
8080 debug {
8181 applicationIdSuffix " .debug"
8282 signingConfig signingConfigs. debug
83+ // noinspection GroovyConstructorNamedArguments
8384 manifestPlaceholders = [ accessToken : " ${ accessToken} " ]
8485 renderscriptDebuggable true
8586 pseudoLocalesEnabled false
@@ -91,6 +92,7 @@ android {
9192 }
9293 release {
9394 signingConfig signingConfigs. release
95+ // noinspection GroovyConstructorNamedArguments
9496 manifestPlaceholders = [ accessToken : " " ]
9597 proguardFile " ${ project.rootDir} /proguard/android.pro"
9698 proguardFile " ${ project.rootDir} /proguard/androidx.pro"
@@ -122,73 +124,73 @@ dependencies {
122124 api project(path : ' :library' )
123125
124126 // Material Design Components
125- implementation " com.google.android. material:material: $m aterial_design_version "
127+ implementation libs . material. design
126128
127129 // Annotations
128- implementation " androidx.annotation:annotation: $a ndroidx_annotation_version "
130+ implementation libs . androidx. annotation
129131
130132 // Flexbox Layout
131- implementation " com.google.android. flexbox:flexbox: $f lexbox_version "
133+ implementation libs . flexbox
132134
133135 // 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
139141
140142 // 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
143145
144146 // 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
147149
148150 // 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
152154
153155 // 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 ) {
157159 exclude group : " com.google.code.gson" , module : " gson"
158160 }
159161
160162 // 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
162164
163165 // https://mvnrepository.com/artifact/org.slf4j/slf4j-simple
164166 // api "org.slf4j:slf4j-nop:$slf4j_version"
165- api " org .slf4j:slf4j-simple: $s lf4j_version "
167+ api libs . slf4j
166168
167169 // jUnit
168- testImplementation " junit:junit: $j unit_version "
170+ testImplementation libs . junit
169171
170172 // Required for connected tests.
171173 // https://mvnrepository.com/artifact/androidx.test/monitor
172- debugImplementation " androidx.test: monitor: $a ndroidx_test_monitor_version "
174+ debugImplementation libs . androidx. test. monitor
173175
174176 // https://mvnrepository.com/artifact/androidx.test.ext
175- androidTestImplementation " androidx.test.ext: junit: $a ndroidx_test_junit_version "
177+ androidTestImplementation libs . androidx. test. junit
176178
177179 // https://mvnrepository.com/artifact/androidx.test
178180 // 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
182184
183185 // 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
185187
186188 // Espresso
187- androidTestImplementation " androidx.test.espresso:espresso-core:$androidx_test_espresso_version "
189+ androidTestImplementation libs. androidx. espresso. core
190+ androidTestImplementation libs. androidx. espresso. web
188191 // androidTestImplementation "androidx.test.espresso:espresso-contrib:$androidx_test_espresso_version"
189192 // androidTestImplementation "androidx.test.espresso:espresso-intents:$androidx_test_espresso_version"
190193 // androidTestImplementation "androidx.test.espresso:espresso-accessibility:$androidx_test_espresso_version"
191- androidTestImplementation " androidx.test.espresso:espresso-web:$androidx_test_espresso_version "
192194 // androidTestImplementation "androidx.test.espresso.idling:idling-concurrent:$espresso_version"
193195
194196 // The following dependency can be either "implementation" or "androidTestImplementation",
0 commit comments