Skip to content

Commit

Permalink
Switch back to Groovy DSL for root project build script
Browse files Browse the repository at this point in the history
Unlike the Kotlin implementation allows creating extra properties that can be read inside the plugins block
  • Loading branch information
Alberto97 committed Sep 3, 2023
1 parent b5c4e4f commit 7176afd
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 23 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ dependencies {
implementation("androidx.activity:activity-compose:1.7.2")

// Hilt
val hiltVersion = "2.48"
val hiltVersion: String by rootProject.extra
implementation("com.google.dagger:hilt-android:$hiltVersion")
ksp("com.google.dagger:hilt-android-compiler:$hiltVersion")
ksp("androidx.hilt:hilt-compiler:1.1.0-alpha01")
Expand Down
28 changes: 28 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
agpVersion = "8.1.1"
hiltVersion = "2.48"
kotlinVersion = "1.9.10"
}
}

plugins {
id("com.android.application") version "$agpVersion" apply false
id("com.android.library") version "$agpVersion" apply false
id("org.jetbrains.kotlin.android") version "$kotlinVersion" apply false
id("com.google.dagger.hilt.android") version "$hiltVersion" apply false
id("com.google.devtools.ksp") version "$kotlinVersion-1.0.13" apply false
id("org.gradle.android.cache-fix") version "2.7.4" apply false
}

allprojects {
repositories {
google()
mavenCentral()
}
}

tasks.register("clean", Delete) {
delete(rootProject.buildDir)
}
22 changes: 0 additions & 22 deletions build.gradle.kts

This file was deleted.

0 comments on commit 7176afd

Please sign in to comment.