From 24a5efd5f85c0ad1b2cc227db5f2552d32c408c1 Mon Sep 17 00:00:00 2001 From: Aayush Gupta Date: Sat, 1 Oct 2022 13:12:12 +0530 Subject: [PATCH] gradle: Migrate to new plugins and dependency management system Signed-off-by: Aayush Gupta --- app/build.gradle | 6 ++++-- build.gradle | 24 +++--------------------- settings.gradle | 16 ++++++++++++++++ 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index df344be99..c5d535d37 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,7 +1,9 @@ import com.github.spotbugs.snom.SpotBugsTask -apply plugin: 'com.android.application' -apply plugin: 'com.github.spotbugs' +plugins { + id 'com.android.application' + id 'com.github.spotbugs' +} spotbugs { ignoreFailures = false diff --git a/build.gradle b/build.gradle index 760ab47c1..8132cb54c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,29 +1,11 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. -buildscript { - repositories { - google() - mavenCentral() - maven { url "https://jitpack.io" } - gradlePluginPortal() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.0.4' - classpath 'gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.7.5' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } +plugins { + id 'com.android.application' version '7.0.4' apply false + id 'com.github.spotbugs' version "4.7.5" apply false } allprojects { - repositories { - google() - mavenCentral() - maven { url "https://jitpack.io" } - gradlePluginPortal() - } tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:deprecation" } diff --git a/settings.gradle b/settings.gradle index e7b4def49..8b4f17817 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,17 @@ +pluginManagement { + repositories { + gradlePluginPortal() + google() + mavenCentral() + } +} +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + maven { url "https://jitpack.io" } + } +} +rootProject.name = "Catima" include ':app'