From 0a204bb37caf71366fbf8a8124fe3f8a2b890d29 Mon Sep 17 00:00:00 2001 From: iliyangermanov Date: Mon, 4 Sep 2023 00:46:56 +0300 Subject: [PATCH] Delete obsolete Gradle tasks --- build.gradle.kts | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 8c2b9e6858..0b1eec2fca 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,12 +1,5 @@ -import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask - // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - // Run with: - // ./gradlew dependencyUpdates // Simple report in the console - // ./gradlew dependencyUpdates -DoutputFormatter=html,json,xml // Report in console & generate files accordingly - id("com.github.ben-manes.versions") version "0.39.0" - // Run with: // ./gradlew detekt // Simple report in the console // ./gradlew detektFormat // To check with enabled auto-correction @@ -15,35 +8,6 @@ plugins { alias(libs.plugins.gradleWrapperUpgrade) } -tasks { - register("clean", Delete::class) { - delete(rootProject.buildDir) - } - - withType { - rejectVersionIf { - isNonStable(candidate.version) - } - } -} - -// Any of parameter of this task can be passed on or changed when running the gradle task as parameter -tasks.named("dependencyUpdates").configure { - outputFormatter = "html" - outputDir = "build/reports/dependencyUpdates" - reportfileName = "report" -} - -// https://github.com/ben-manes/gradle-versions-plugin#rejectversionsif-and-componentselection -// This has been tested thoroughly by community -fun isNonStable(version: String): Boolean { - val stableKeyword = - listOf("RELEASE", "FINAL", "GA", "RC").any { version.toUpperCase().contains(it) } - val regex = "^[0-9,.v-]+(-r)?$".toRegex() - val isStable = stableKeyword || regex.matches(version) - return isStable.not() -} - wrapperUpgrade { gradle { create("ivyWallet") {