Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions WooCommerce/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ android {
coreLibraryDesugaringEnabled true
}

flavorDimensions "buildType"
flavorDimensions = ["buildType"]

productFlavors {
// Used for release/beta builds. Usually shouldn't be build locally.
Expand Down Expand Up @@ -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 ->
Expand Down
21 changes: 3 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}

/**
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading