From 06f713b8ae14a13339cfbe2656998ac62530c8a0 Mon Sep 17 00:00:00 2001 From: devgianlu Date: Sat, 14 Sep 2024 16:26:04 +0200 Subject: [PATCH] Update project structure and dependencies --- CommonUtils | 2 +- app/build.gradle | 14 ++++++++------ build.gradle | 27 ++++----------------------- gradle.properties | 1 - settings.gradle | 23 +++++++++++++++++++++++ 5 files changed, 36 insertions(+), 31 deletions(-) diff --git a/CommonUtils b/CommonUtils index a3d7c0da..732bd93e 160000 --- a/CommonUtils +++ b/CommonUtils @@ -1 +1 @@ -Subproject commit a3d7c0dae0b39c4523c4847e4c14b5205fc71f84 +Subproject commit 732bd93e2654bcc189870dbd57ee098669ad5dec diff --git a/app/build.gradle b/app/build.gradle index 5a2f39e7..fd1c391d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,10 +2,11 @@ import com.github.triplet.gradle.androidpublisher.ReleaseStatus plugins { id 'com.github.triplet.play' version '3.9.1' + id 'com.android.application' + id 'com.google.gms.google-services' + id 'com.google.firebase.crashlytics' } -apply plugin: 'com.android.application' - def isCi = System.getenv("CI") == "true" android { namespace 'com.gianlu.aria2app' @@ -87,6 +88,10 @@ android { useLegacyPackaging = true } } + + buildFeatures { + buildConfig true + } } play { @@ -118,8 +123,5 @@ dependencies { implementation 'androidx.documentfile:documentfile:1.0.1' implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0' - implementation 'com.google.android.material:material:1.11.0' + implementation 'com.google.android.material:material:1.12.0' } - -apply plugin: 'com.google.gms.google-services' -apply plugin: 'com.google.firebase.crashlytics' \ No newline at end of file diff --git a/build.gradle b/build.gradle index 68d7182f..7827d423 100644 --- a/build.gradle +++ b/build.gradle @@ -1,24 +1,5 @@ -buildscript { - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:8.6.0' - classpath 'com.google.gms:google-services:4.4.1' - classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9' - } -} - -allprojects { - repositories { - google() - mavenCentral() - maven { url "https://jitpack.io" } - } -} - -task clean(type: Delete) { - delete rootProject.buildDir +plugins { + id 'com.android.application' version '8.6.0' apply false + id 'com.google.gms.google-services' version '4.4.2' apply false + id 'com.google.firebase.crashlytics' version '3.0.2' apply false } diff --git a/gradle.properties b/gradle.properties index 2f6ff247..fe9f0316 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,5 @@ android.useAndroidX=true android.enableJetifier=true org.gradle.jvmargs=-Xmx1024m -android.defaults.buildfeatures.buildconfig=true android.nonTransitiveRClass=false android.nonFinalResIds=false diff --git a/settings.gradle b/settings.gradle index ab25d76f..3e419955 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,26 @@ +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() + maven { url "https://jitpack.io" } + } +} + include ':CommonUtils', ':aria2lib', ':app' project(':CommonUtils').projectDir = new File('./CommonUtils') project(':aria2lib').projectDir = new File('./aria2lib') \ No newline at end of file