aboutsummaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2019-03-02 23:38:57 +0530
committerMohamed Zenadi <zeapo@users.noreply.github.com>2019-03-02 19:08:57 +0100
commitffe489c2939d7e43f48552496464a71c5c4335fb (patch)
tree824da283648b460aa8fa541e008cab2da800f758 /build.gradle.kts
parent3c06063153d0b7f71998128dc6fb4e5967e33624 (diff)
Dependency updates (#489)
* Configure dependencyUpdates task Configured to emit JSON reports in build directory and to only use stable releases. Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com> * Update dependencies Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts29
1 files changed, 26 insertions, 3 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index 6a8c4dd5..dc9ef005 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,4 +1,4 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
+import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
buildscript {
repositories {
@@ -7,11 +7,15 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath("com.android.tools.build:gradle:3.2.1")
- classpath(kotlin("gradle-plugin", "1.2.71"))
+ classpath("com.android.tools.build:gradle:3.3.1")
+ classpath(kotlin("gradle-plugin", "1.3.21"))
}
}
+plugins {
+ id("com.github.ben-manes.versions") version "0.21.0"
+}
+
allprojects {
repositories {
google()
@@ -19,3 +23,22 @@ allprojects {
mavenCentral()
}
}
+
+tasks.named<DependencyUpdatesTask>("dependencyUpdates") {
+ resolutionStrategy {
+ componentSelection {
+ all {
+ val rejected = listOf("alpha", "beta", "rc", "cr", "m", "preview")
+ .map { qualifier -> Regex("(?i).*[.-]$qualifier[.\\d-]*") }
+ .any { it.matches(candidate.version) }
+ if (rejected) {
+ reject("Release candidate")
+ }
+ }
+ }
+ }
+ checkForGradleUpdate = true
+ outputFormatter = "json"
+ outputDir = "build/dependencyUpdates"
+ reportfileName = "report"
+}