1+ import com.github.spotbugs.snom.Confidence
2+ import com.github.spotbugs.snom.Effort
3+
14buildscript {
25 repositories {
36 mavenCentral()
@@ -6,8 +9,8 @@ buildscript {
69 google()
710 }
811 dependencies {
9- classpath ' com.android.tools.build:gradle:7.1.3 '
10- classpath ' com.github.spotbugs.snom:spotbugs-gradle-plugin:5 .0.5 '
12+ classpath ' com.android.tools.build:gradle:8.3.0 '
13+ classpath ' com.github.spotbugs.snom:spotbugs-gradle-plugin:6 .0.8 '
1114 }
1215}
1316
@@ -31,6 +34,7 @@ task checkstyle(type: Checkstyle) {
3134 source ' src'
3235 classpath = files()
3336 ignoreFailures = false
37+ exclude ' test/bash/bats/**'
3438}
3539
3640task pmd (type : Pmd ) {
@@ -40,19 +44,19 @@ task pmd(type: Pmd) {
4044 source ' src'
4145 exclude ' **/**.png'
4246 exclude ' **/**.mp3'
43- exclude ' **/**.bats '
47+ exclude ' test/bash/bats/** '
4448 dependencies {
45- pmd ' net.sourceforge.pmd:pmd-java:6.44 .0'
46- pmd ' net.sourceforge.pmd:pmd-xml:6.44 .0'
49+ pmd ' net.sourceforge.pmd:pmd-java:6.55 .0'
50+ pmd ' net.sourceforge.pmd:pmd-xml:6.55 .0'
4751 }
4852}
4953
5054spotbugs {
5155 ignoreFailures = false
5256 showStackTraces = true
5357 showProgress = true
54- effort = ' default '
55- reportLevel = ' default '
58+ effort = Effort . valueOf( ' DEFAULT ' )
59+ reportLevel = Confidence . valueOf( ' DEFAULT ' )
5660 maxHeapSize = ' 1g'
5761 omitVisitors = [
5862 ' FindReturnRef' // This app exchanges data with external applications, we assume is safe.
@@ -95,16 +99,16 @@ def getVersionName = {
9599}
96100
97101android {
98- compileSdkVersion 33
99- buildToolsVersion ' 30.0.3'
102+ compileSdk 34
100103 packagingOptions {
101- exclude ' META-INF/LICENSE'
102- exclude ' META-INF/NOTICE'
104+ resources {
105+ excludes + = [' META-INF/LICENSE' , ' META-INF/NOTICE' ]
106+ }
103107 }
104108
105109 defaultConfig {
106110 // noinspection OldTargetApi
107- targetSdkVersion 33
111+ targetSdkVersion 34
108112 minSdkVersion 21 // Android 5.0
109113 versionCode getVersionCode()
110114 versionName getVersionName()
@@ -125,8 +129,8 @@ android {
125129 }
126130
127131 compileOptions {
128- sourceCompatibility JavaVersion . VERSION_11
129- targetCompatibility JavaVersion . VERSION_11
132+ sourceCompatibility JavaVersion . VERSION_17
133+ targetCompatibility JavaVersion . VERSION_17
130134 // Flag to enable support for the new language APIs
131135 coreLibraryDesugaringEnabled true
132136 }
@@ -164,7 +168,11 @@ android {
164168 }
165169 }
166170
167- lintOptions {
171+ buildFeatures {
172+ buildConfig true
173+ }
174+
175+ lint {
168176 lintConfig = new File (' config/lint.xml' )
169177
170178 disable ' UnusedResources' // linter can't handle static imports, so just skip this test
@@ -179,7 +187,6 @@ android {
179187 abortOnError true
180188 htmlReport false
181189 textReport true
182- textOutput ' stdout'
183190 }
184191 }
185192
@@ -191,6 +198,7 @@ android {
191198
192199 flavorDimensions ' brand'
193200
201+ namespace ' org.medicmobile.webapp.mobile'
194202 productFlavors {
195203 unbranded {
196204 // we will not create project-specific src directories
@@ -425,18 +433,19 @@ android {
425433
426434dependencies {
427435 implementation fileTree(dir : ' libs' , include : [' *.jar' ])
428- implementation ' androidx.core:core:1.7.0'
429- implementation ' androidx.activity:activity:1.4.0'
430- implementation ' androidx.fragment:fragment:1.4.1'
431- compileOnly ' com.github.spotbugs:spotbugs-annotations:4.5.3'
432- coreLibraryDesugaring ' com.android.tools:desugar_jdk_libs:1.1.5'
436+ implementation platform(' org.jetbrains.kotlin:kotlin-bom:1.9.23' )
437+ implementation ' androidx.core:core:1.12.0'
438+ implementation ' androidx.activity:activity:1.8.2'
439+ implementation ' androidx.fragment:fragment:1.6.2'
440+ compileOnly ' com.github.spotbugs:spotbugs-annotations:4.8.3'
441+ coreLibraryDesugaring ' com.android.tools:desugar_jdk_libs:2.0.4'
433442 testImplementation ' junit:junit:4.13.2'
434- testImplementation ' org.mockito:mockito-inline:4.0 .0'
443+ testImplementation ' org.mockito:mockito-inline:5.2 .0'
435444 testImplementation ' com.google.android:android-test:4.1.1.4'
436- testImplementation ' org.robolectric:robolectric:4.7 '
437- testImplementation ' androidx.test.espresso:espresso-core:3.5.0-alpha05 '
438- testImplementation ' androidx.test.espresso:espresso-intents:3.5.0-alpha05 '
439- testImplementation ' androidx.test.ext:junit:1.1.3 '
445+ testImplementation ' org.robolectric:robolectric:4.11.1 '
446+ testImplementation ' androidx.test.espresso:espresso-core:3.5.1 '
447+ testImplementation ' androidx.test.espresso:espresso-intents:3.5.1 '
448+ testImplementation ' androidx.test.ext:junit:1.1.5 '
440449 androidTestImplementation ' androidx.test.espresso:espresso-web:3.5.1'
441450 androidTestImplementation ' androidx.test.ext:junit:1.1.5'
442451 androidTestImplementation ' androidx.test:runner:1.5.2'
0 commit comments