Skip to content

Commit

Permalink
Adapt to AGP 8.2
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
  • Loading branch information
AndyScherzinger committed Dec 2, 2023
1 parent 3ff0c2c commit 87e7493
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 8 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
with:
distribution: "temurin"
java-version: 17
- name: Lint
run: bash ./gradlew lintDevDebug --stacktrace

Expand All @@ -33,6 +38,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
with:
distribution: "temurin"
java-version: 17
- name: Unit tests
run: bash ./gradlew test --stacktrace

Expand All @@ -42,6 +52,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
with:
distribution: "temurin"
java-version: 17
- name: Build debug APK
run: bash ./gradlew assembleDev --stacktrace
- name: Upload APK
Expand Down
7 changes: 4 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apply plugin: 'com.android.application'
apply plugin: 'org.jetbrains.kotlin.android'

android {
compileSdkVersion 33
compileSdk 33

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

defaultConfig {
Expand All @@ -26,6 +26,7 @@ android {

buildFeatures {
viewBinding true
buildConfig = true
}

buildTypes {
Expand Down
12 changes: 8 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
Expand Down Expand Up @@ -28,12 +30,14 @@ allprojects {
}

subprojects {
tasks.withType(Test) {
tasks.withType(Test).configureEach {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
kotlinOptions {
jvmTarget = "11"
tasks.withType(KotlinCompile).tap {
configureEach {
kotlinOptions {
jvmTarget = "17"
}
}
}
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.nonFinalResIds=false
android.nonTransitiveRClass=false
android.useAndroidX=true
org.gradle.jvmargs=-Xmx4096m
# Default value: -Xmx10248m -XX:MaxPermSize=256m
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 87e7493

Please sign in to comment.