diff --git a/WooCommerce/build.gradle b/WooCommerce/build.gradle index 90aa0fbff66..8959fc8e102 100644 --- a/WooCommerce/build.gradle +++ b/WooCommerce/build.gradle @@ -151,7 +151,7 @@ android { coreLibraryDesugaringEnabled true } - flavorDimensions "buildType" + flavorDimensions = ["buildType"] productFlavors { // Used for release/beta builds. Usually shouldn't be build locally. @@ -552,12 +552,6 @@ android.buildTypes.all { buildType -> } } -task printVersionName { - doLast { - println android.defaultConfig.versionName - } -} - static def loadPropertiesFromFile(inputFile) { def properties = new Properties() inputFile.withInputStream { stream -> diff --git a/build.gradle b/build.gradle index c1cb2a24666..6fa70f15ae0 100644 --- a/build.gradle +++ b/build.gradle @@ -83,7 +83,7 @@ subprojects { } } -def detektAll = tasks.register("detektAll", Detekt) { +tasks.register("detektAll", Detekt) { description = "Custom DETEKT build for all modules" parallel = true ignoreFailures = false @@ -101,27 +101,12 @@ def detektAll = tasks.register("detektAll", Detekt) { } } -def detektAutoCorrectPrompt = tasks.register("detektAutoCorrectPrompt") { - doLast { - def detektTask = detektAll.get() - if (detektTask.state.failure != null && !detektTask.autoCorrect) { - println ".-----------------------------------------------------------------------------------------------------------------------------------.\n" + - "| 🛠 Did you know: you can ask Detekt to automatically resolve some of the issues by running `./gradlew detektAll --auto-correct` |\n" + - "'-----------------------------------------------------------------------------------------------------------------------------------'" - } - } -} - -detektAll.configure { - finalizedBy detektAutoCorrectPrompt -} - dependencies { detektPlugins(libs.detekt.formatting) } -task clean(type: Delete) { - delete rootProject.buildDir +tasks.register('clean', Delete) { + delete rootProject.layout.buildDirectory } /** diff --git a/gradle.properties b/gradle.properties index b5559839f0d..a9cdcd14e30 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,6 +3,7 @@ ksp.allow.all.target.configuration=false # Enables Gradle Build Cache - https://docs.gradle.org/current/userguide/build_cache.html org.gradle.caching=true +org.gradle.configuration-cache=true android.useAndroidX=true android.enableJetifier=false