Skip to content

Commit

Permalink
[Android] Update gradle and several dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
  • Loading branch information
AenBleidd committed May 23, 2023
1 parent 6c91e7f commit 3a90902
Show file tree
Hide file tree
Showing 10 changed files with 372 additions and 202 deletions.
3 changes: 1 addition & 2 deletions android/BOINC/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

99 changes: 46 additions & 53 deletions android/BOINC/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'org.ajoberstar.grgit' version '5.0.0'
id 'org.ajoberstar.grgit'
id 'jacoco'
}

Expand Down Expand Up @@ -321,10 +321,12 @@ preBuild.doFirst {

android {
compileSdkVersion 33
buildToolsVersion '31.0.0'
buildToolsVersion '33.0.1'

buildFeatures {
viewBinding true
buildConfig true
aidl true
}

defaultConfig {
Expand Down Expand Up @@ -382,15 +384,15 @@ android {
}

compileOptions {
sourceCompatibility '1.8'
targetCompatibility '1.8'
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17

// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true
}

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '17'
}

testOptions {
Expand All @@ -402,11 +404,12 @@ android {
includeNoLocationClasses = true
excludes = ['jdk.internal.*']
}
jvmArgs = ['--add-opens=java.base/java.lang=ALL-UNNAMED', '--add-opens=java.base/java.util=ALL-UNNAMED']
}
}
}
testCoverage {
jacocoVersion "$jacoco_version"
jacocoVersion
}
namespace 'edu.berkeley.boinc'

Expand All @@ -422,67 +425,57 @@ android {
}
}

ext {
coroutines_version = '1.6.4'
dagger_version = '2.44'
lifecycle_version = '2.5.1'
powermock_version = '2.0.9'
junit5_version = '5.9.1'
guava_version = '31.1-jre'
fragment_version = '1.5.3'
}

dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
coreLibraryDesugaring Android.tools.desugarJdkLibs

// androidx dependencies
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.fragment:fragment-ktx:1.5.3'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.viewpager2:viewpager2:1.0.0'

implementation 'javax.annotation:javax.annotation-api:1.3.2'
implementation 'com.github.bumptech.glide:glide:4.14.1'
implementation 'com.google.android.material:material:1.6.1'
implementation "com.google.guava:guava:$guava_version"
implementation 'com.squareup.okio:okio:3.2.0'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation AndroidX.multidex
implementation AndroidX.appCompat
implementation AndroidX.core.ktx
implementation AndroidX.fragment.ktx
implementation AndroidX.preference.ktx
implementation AndroidX.recyclerView
implementation AndroidX.swipeRefreshLayout
implementation AndroidX.viewPager2

implementation 'javax.annotation:javax.annotation-api:_'
implementation 'com.github.bumptech.glide:glide:_'
implementation Google.android.material
implementation "com.google.guava:guava:_"
implementation Square.okio
implementation 'org.apache.commons:commons-lang3:_'
implementation Kotlin.stdlib.jdk8

// lifecycle dependencies
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-service:$lifecycle_version"
implementation AndroidX.lifecycle.runtime.ktx
implementation AndroidX.lifecycle.service

// coroutine dependencies
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
implementation KotlinX.coroutines.core
implementation KotlinX.coroutines.android

// dagger dependencies
implementation "com.google.dagger:dagger:$dagger_version"
annotationProcessor "com.google.dagger:dagger-compiler:$dagger_version"
kapt "com.google.dagger:dagger-compiler:$dagger_version"
implementation Google.dagger
annotationProcessor Google.dagger.compiler
kapt Google.dagger.compiler

// Testing dependencies
testImplementation 'androidx.test:core:1.4.0'
testImplementation "com.google.guava:guava-testlib:$guava_version"
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.robolectric:robolectric:4.9'
testImplementation 'io.mockk:mockk:1.13.2'
debugImplementation "androidx.fragment:fragment-testing:$fragment_version"
testImplementation AndroidX.test.core
testImplementation "com.google.guava:guava-testlib:_"
testImplementation Testing.junit4
testImplementation Testing.robolectric
testImplementation Testing.mockK
debugImplementation AndroidX.fragment.testing

// powermock dependencies
testImplementation "org.powermock:powermock-module-junit4:$powermock_version"
testImplementation "org.powermock:powermock-api-mockito2:$powermock_version"
testImplementation "org.powermock:powermock-module-junit4:_"
testImplementation "org.powermock:powermock-api-mockito2:_"

// junit dependencies
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit5_version"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junit5_version"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit5_version"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:$junit5_version"
testImplementation Testing.junit.jupiter.api
testImplementation Testing.junit.jupiter.params
testRuntimeOnly Testing.junit.jupiter.engine
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:_"
}

repositories {
Expand Down Expand Up @@ -512,6 +505,6 @@ task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebugUnitTest']) {
}

jacoco {
toolVersion "$jacoco_version"
toolVersion
}

8 changes: 3 additions & 5 deletions android/BOINC/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.7.20'
ext.jacoco_version = '0.8.7'
repositories {
maven {
url 'https://maven.google.com/'
Expand All @@ -14,9 +12,9 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jacoco:org.jacoco.core:$jacoco_version"
classpath Android.tools.build.gradlePlugin
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:_"
classpath "org.jacoco:org.jacoco.core:_"
}
}

Expand Down
Binary file modified android/BOINC/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions android/BOINC/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Sat Jul 11 07:07:29 IDT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=5625a0ae20fe000d9225d000b36909c7a0e0e8dda61c19b12da769add847c975
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
Loading

0 comments on commit 3a90902

Please sign in to comment.