Migrate to new Gradle plugins & dependency system
apply 'com.android.application' to the whole project as this
follows legacy packaging
Set a root project name while at it
Change-Id: I1bae55cd1d740cdf45082c752f11f91705cd9655
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
diff --git a/build.gradle b/build.gradle
index dd8cc84..739be21 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,23 +1,7 @@
-buildscript {
- repositories {
- google()
- mavenCentral()
- }
-
- dependencies {
- classpath 'com.android.tools.build:gradle:8.2.2'
- }
+plugins {
+ id("com.android.application") version "8.1.2" apply true
}
-allprojects {
- repositories {
- google()
- mavenCentral()
- }
-}
-
-apply plugin: 'com.android.application'
-
android {
namespace 'com.android.deskclock'
compileSdk 34
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..d51de7b
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,15 @@
+pluginManagement {
+ repositories {
+ gradlePluginPortal()
+ google()
+ mavenCentral()
+ }
+}
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+rootProject.name = "DeskClock"