diff --git a/husky/app/build.gradle b/husky/app/build.gradle index ba27090..bab2238 100644 --- a/husky/app/build.gradle +++ b/husky/app/build.gradle @@ -123,7 +123,7 @@ android { } dependencies { - implementation fileTree(dir: "libs", include: ["*.jar"]) + implementation fileTree(dir: "libs", include: ["*.jar", "*.aar"]) implementation deps.androidx.appCompat implementation deps.androidx.browser diff --git a/husky/build.gradle b/husky/build.gradle index 9492bb8..727b886 100644 --- a/husky/build.gradle +++ b/husky/build.gradle @@ -1,3 +1,5 @@ +apply plugin: "com.github.ben-manes.versions" + buildscript { apply from: "versions.gradle" apply from: "dependencies.gradle" @@ -9,6 +11,8 @@ buildscript { dependencies { classpath deps.androidGradlePlugin classpath deps.kotlinGradlePlugin + + classpath "com.github.ben-manes:gradle-versions-plugin:0.42.0" } } @@ -23,6 +27,16 @@ allprojects { "-Xlint:-deprecation", ] } + + apply plugin: com.github.benmanes.gradle.versions.VersionsPlugin + + tasks.named("dependencyUpdates").configure { + gradleReleaseChannel = "current" + + rejectVersionIf { + isNonStable(it.candidate.version) + } + } } task clean(type: Delete) { diff --git a/husky/dependencies.gradle b/husky/dependencies.gradle index a68cde5..16239a8 100644 --- a/husky/dependencies.gradle +++ b/husky/dependencies.gradle @@ -129,9 +129,16 @@ deps.timber = "com.jakewharton.timber:timber:${versions.timber}" // Repository handler static def addRepos(RepositoryHandler handler) { handler.google() + handler.gradlePluginPortal() handler.mavenCentral() handler.maven { url "https://jitpack.io" } handler.maven { url "https://plugins.gradle.org/m2/" } } +static def isNonStable(String version) { + def stableKeyword = ["a", "alpha", "beta", "final", "ga", "m", "release", "rc"].any { it -> version.toLowerCase().contains(it) } + return stableKeyword +} + +ext.isNonStable = this.&isNonStable ext.addRepos = this.&addRepos