diff --git a/app/build.gradle b/app/build.gradle index 4b9e0a2..96c3835 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,19 +1,17 @@ -apply plugin: 'com.android.application' +plugins { + alias(libs.plugins.androidApplication) +} android { namespace 'com.dosse.airpods' - - compileSdkVersion 33 - buildToolsVersion '33.0.0' + compileSdk 34 defaultConfig { applicationId "com.dosse.airpods" - minSdkVersion 23 - targetSdkVersion 33 + minSdk 26 + targetSdk 34 versionCode 22 versionName '1.9.1' - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { @@ -23,20 +21,16 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } - - - compileOptions { - sourceCompatibility = 11 - targetCompatibility = 11 + buildFeatures { + buildConfig true } - - lint { - abortOnError false + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } } dependencies { - //noinspection GradleDependency 1.5.0/1.5.1 is broken - implementation 'androidx.appcompat:appcompat:1.4.2' - implementation 'androidx.preference:preference:1.2.0' -} + implementation libs.androidx.appcompat + implementation libs.androidx.preference +} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 9965862..2bbd2a9 100644 --- a/build.gradle +++ b/build.gradle @@ -1,23 +1,4 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - - } - dependencies { - classpath 'com.android.tools.build:gradle:7.3.1' - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} +plugins { + alias(libs.plugins.androidApplication) apply false +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index d546dea..4387edc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,12 +6,16 @@ # 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. -android.enableJetifier=true -android.useAndroidX=true -org.gradle.jvmargs=-Xmx1536m +org.gradle.jvmargs=-Xmx2048m -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 +# This option should only be used with decoupled projects. For more details, visit +# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects # org.gradle.parallel=true - - +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library +android.nonTransitiveRClass=true \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..e4c40d2 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,12 @@ +[versions] +agp = "8.3.1" +appcompat = "1.6.1" +preference = "1.2.1" + +[libraries] +androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } +androidx-preference = { group = "androidx.preference", name = "preference", version.ref = "preference" } + +[plugins] +androidApplication = { id = "com.android.application", version.ref = "agp" } + diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9519b65..e07dca6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu Sep 29 21:38:30 IDT 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle b/settings.gradle index e7b4def..874be6d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,23 @@ +pluginManagement { + repositories { + google { + content { + includeGroupByRegex("com\\.android.*") + includeGroupByRegex("com\\.google.*") + includeGroupByRegex("androidx.*") + } + } + mavenCentral() + gradlePluginPortal() + } +} +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} + +rootProject.name = "OpenPods" include ':app'