From ffb74ab43202fa37db4c84d77e94126c44e6df31 Mon Sep 17 00:00:00 2001 From: Jonathan Klee Date: Fri, 18 Aug 2023 15:17:31 +0200 Subject: [PATCH] Update AGP to 8.1.0 for Android Studio Giraffe --- app/build.gradle | 8 +++++--- app/src/main/AndroidManifest.xml | 3 +-- .../main/java/foundation/e/apps/AppLoungeApplication.kt | 5 ++++- build.gradle | 4 ++-- gradle.properties | 5 ++++- gradle/wrapper/gradle-wrapper.properties | 6 +++--- lint.xml | 3 +++ 7 files changed, 22 insertions(+), 12 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index ce11c6234..a40c4e6ab 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -119,17 +119,19 @@ android { } buildFeatures { viewBinding true + aidl true } compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = '11' + jvmTarget = '17' } lint { lintConfig file('lint.xml') } + namespace 'foundation.e.apps' kotlin.sourceSets.all { languageSettings.optIn("kotlin.RequiresOptIn") } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 508c47af8..881f88761 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools"> diff --git a/app/src/main/java/foundation/e/apps/AppLoungeApplication.kt b/app/src/main/java/foundation/e/apps/AppLoungeApplication.kt index 913c23a06..a9044e3fb 100644 --- a/app/src/main/java/foundation/e/apps/AppLoungeApplication.kt +++ b/app/src/main/java/foundation/e/apps/AppLoungeApplication.kt @@ -19,7 +19,9 @@ package foundation.e.apps import android.app.Application +import android.os.Build import android.util.Log +import androidx.annotation.RequiresApi import androidx.hilt.work.HiltWorkerFactory import androidx.work.Configuration import androidx.work.ExistingPeriodicWorkPolicy @@ -56,13 +58,14 @@ class AppLoungeApplication : Application(), Configuration.Provider { @Inject lateinit var preferenceManagerModule: PreferenceManagerModule + @RequiresApi(Build.VERSION_CODES.TIRAMISU) override fun onCreate() { super.onCreate() InstallWorkManager.context = this // Register broadcast receiver for package manager val pkgManagerBR = object : PkgManagerBR() {} - registerReceiver(pkgManagerBR, pkgManagerModule.getFilter()) + registerReceiver(pkgManagerBR, pkgManagerModule.getFilter(), RECEIVER_EXPORTED) val currentVersion = dataStoreModule.getTOSVersion() if (!currentVersion.contentEquals(TOS_VERSION)) { diff --git a/build.gradle b/build.gradle index 66271133a..1674b39d4 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,8 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '7.4.0' apply false - id 'com.android.library' version '7.4.0' apply false + id 'com.android.application' version '8.1.0' apply false + id 'com.android.library' version '8.1.0' apply false id 'org.jetbrains.kotlin.android' version '1.8.0' apply false id 'com.google.dagger.hilt.android' version '2.44' apply false id "org.jetbrains.kotlin.plugin.allopen" version "1.8.0" diff --git a/gradle.properties b/gradle.properties index 1462a5544..63b8f402f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,4 +18,7 @@ android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=true # Kotlin code style for this project: "official" or "obsolete": -kotlin.code.style=official \ No newline at end of file +kotlin.code.style=official +android.defaults.buildfeatures.buildconfig=true +android.nonTransitiveRClass=false +android.nonFinalResIds=false \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6c95afb59..fb45f10f5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Mar 24 11:52:02 BDT 2023 +#Thu Aug 17 09:40:45 CEST 2023 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/lint.xml b/lint.xml index 6be079d1d..bfd91922c 100644 --- a/lint.xml +++ b/lint.xml @@ -21,6 +21,9 @@ + + + -- GitLab