1
0
Fork 0

upgrade gradle 7.4.2 -> 8.0.1 (#259)

* upgraded gradle 7.4.2 -> 8.0.1

* updated github workflow

* removed RenderScript

* excluded 'kotlin-stdlib-jdk8' to prevent 'duplicate class' errors

* updated memory limits
This commit is contained in:
Dimo Karaivanov 2023-05-17 11:39:54 +03:00 committed by sspanak
parent adeae333b2
commit b3fde40aa2
4 changed files with 38 additions and 8 deletions

View file

@ -15,6 +15,11 @@ jobs:
# setup
- name: Checkout project sources
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2

View file

@ -4,16 +4,22 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.0.1'
}
}
apply plugin: 'com.android.application'
configurations.all {
// fixes 'duplicate class error', when using these combine: androidx.core:1.10.1, androidx.preference:1.2.0 and androidx.room:2.5.1
// see: https://stackoverflow.com/questions/75274720/a-failure-occurred-while-executing-appcheckdebugduplicateclasses/75315276#75315276
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
}
dependencies {
implementation "androidx.core:core:1.9.0"
implementation 'androidx.core:core:1.10.1'
implementation 'androidx.preference:preference:1.2.0'
implementation "androidx.room:room-runtime:2.5.1"
annotationProcessor "androidx.room:room-compiler:2.5.1"
implementation 'androidx.room:room-runtime:2.5.1'
annotationProcessor 'androidx.room:room-compiler:2.5.1'
}
repositories {
@ -213,7 +219,6 @@ android {
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
@ -255,7 +260,6 @@ android {
debuggable false
jniDebuggable false
renderscriptDebuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
@ -263,6 +267,10 @@ android {
// signingConfig android.signingConfigs.release
}
}
buildFeatures {
renderScript false
aidl true
}
applicationVariants.all { variant ->
tasks["merge${variant.name.capitalize()}Assets"].dependsOn(validateDictionaries)

View file

@ -1 +1,18 @@
## For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Wed May 17 11:42:52 EEST 2023
android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=true
android.nonTransitiveRClass=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536M -Dkotlin.daemon.jvm.options\="-Xmx1536M"

View file

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip