import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask buildscript { repositories { google() jcenter() mavenCentral() } dependencies { classpath("com.android.tools.build:gradle:3.4.1") classpath(kotlin("gradle-plugin", "1.3.40")) } } plugins { id("com.github.ben-manes.versions") version "0.21.0" } allprojects { repositories { google() jcenter() mavenCentral() } } tasks { named("dependencyUpdates") { resolutionStrategy { componentSelection { all { val blacklistedGroups = listOf("commons-io", "org.eclipse.jgit") val rejected = listOf("alpha", "beta", "rc", "cr", "m", "preview") .map { qualifier -> Regex("(?i).*[.-]$qualifier[.\\d-]*") } .any { it.matches(candidate.version) || blacklistedGroups.contains(candidate.group) } if (rejected) { reject("Release candidate") } } } } checkForGradleUpdate = true outputFormatter = "json" outputDir = "build/dependencyUpdates" reportfileName = "report" } named("wrapper") { gradleVersion = "5.5" distributionType = Wrapper.DistributionType.ALL } }