android: update project

- Upgrade AGP dependency from 8.3.0 to 8.4.1
- Upgrade Gradle version to 8.6
- Use version catalogs
This commit is contained in:
scribam 2024-05-19 21:27:53 +02:00 committed by flyinghead
parent 20652516e7
commit a5608f4f22
7 changed files with 38 additions and 18 deletions

View File

@ -1,9 +1,4 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.3.0' apply false
id 'com.android.library' version '8.3.0' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
alias(libs.plugins.android.application) apply false
}

View File

@ -1,5 +1,5 @@
plugins {
id 'com.android.application'
alias(libs.plugins.android.application)
}
def getVersionName = { ->
@ -80,10 +80,10 @@ android {
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'org.apache.httpcomponents.client5:httpclient5:5.0.3'
implementation 'org.slf4j:slf4j-android:1.7.35'
implementation libs.appcompat
implementation libs.commons.lang3
implementation libs.httpclient5
implementation libs.slf4j.android
implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'], exclude: [])
implementation 'androidx.documentfile:documentfile:1.0.1'
implementation libs.documentfile
}

View File

@ -1,4 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<supports-screens
android:anyDensity="true"

View File

@ -8,8 +8,8 @@
# The setting is particularly useful for tweaking memory settings.
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

View File

@ -0,0 +1,17 @@
[versions]
agp = "8.4.1"
appcompat = "1.3.1"
commonsLang3 = "3.12.0"
documentfile = "1.0.1"
httpclient5 = "5.0.3"
slf4jAndroid = "1.7.35"
[libraries]
appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
commons-lang3 = { module = "org.apache.commons:commons-lang3", version.ref = "commonsLang3" }
documentfile = { module = "androidx.documentfile:documentfile", version.ref = "documentfile" }
httpclient5 = { module = "org.apache.httpcomponents.client5:httpclient5", version.ref = "httpclient5" }
slf4j-android = { module = "org.slf4j:slf4j-android", version.ref = "slf4jAndroid" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }

View File

@ -1,6 +1,6 @@
#Mon Jun 05 22:55:18 CEST 2023
#Sun May 19 21:28:41 CEST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -1,6 +1,12 @@
pluginManagement {
repositories {
google()
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
gradlePluginPortal()
}