diff options
author | android-build-prod (mdb) <android-build-team-robot@google.com> | 2019-06-14 19:46:48 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-06-14 19:46:48 +0000 |
commit | 762c9db8a24b778912492a9dd10f21c52b8581b5 (patch) | |
tree | a860f938210250da65ebe07c2232ae353dccddaf | |
parent | 362074fd8b467b7e6d561eb406e8c57962abe9ec (diff) | |
parent | c8befd858b74e617e2f6885e515acf4f3b2000a2 (diff) | |
download | support-762c9db8a24b778912492a9dd10f21c52b8581b5.tar.gz |
Merge "Making isDependencyRange("[1.0.0-beta01]") return false" into snap-temp-L21000000328721920
-rw-r--r-- | buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt b/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt index e3360473c85..4f2ce63bdb2 100644 --- a/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt +++ b/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt @@ -583,9 +583,15 @@ fun Project.addToProjectMap(extension: AndroidXExtension) { } private fun isDependencyRange(version: String?): Boolean { - return ((version!!.startsWith("[") || version.startsWith("(")) && - (version.endsWith("]") || version.endsWith(")")) || - version.endsWith("+")) + if ((version!!.startsWith("[") || version.startsWith("(")) && + version.contains(",") && + (version.endsWith("]") || version.endsWith(")"))) { + return true + } + if (version.endsWith("+")) { + return true + } + return false } private fun Project.createCheckResourceApiTask(): DefaultTask { |