chiark / gitweb /
Add Gradle 2.10 to the BS
[fdroidserver.git] / buildserver / cookbooks / gradle / recipes / gradle
index 6964e9c46e4475d486d64ffb6bb1b2290b20a0e5..61d6f52d9be84205192cd808e8bf6d45a9d36c04 100755 (executable)
@@ -23,11 +23,14 @@ contains() {
 
 # key-value pairs of what gradle version each gradle plugin version
 # should accept
-d_plugin_k=(  1.0 0.14 0.13 0.12 0.11 0.10  0.9  0.8 0.7 0.6 0.5 0.4 0.3 0.2)
-d_plugin_v=(2.2.1  2.1  2.1 1.12 1.12 1.12 1.11 1.10 1.9 1.8 1.6 1.6 1.4 1.4)
+d_plugin_k=(1.3 1.2   1.1   1.0 0.14 0.13 0.12 0.11 0.10  0.9  0.8 0.7 0.6 0.5 0.4 0.3 0.2)
+d_plugin_v=(2.4 2.3 2.2.1 2.2.1  2.1  2.1 1.12 1.12 1.12 1.11 1.10 1.9 1.8 1.6 1.6 1.4 1.4)
+
+# All gradle versions we know about
+plugin_v=(2.10 2.9 2.8 2.7 2.6 2.5 2.4 2.3 2.2.1 2.1 1.12 1.11 1.10 1.9 1.8 1.7 1.6 1.4)
 
 # Find the highest version available
-for v in ${d_plugin_v}; do
+for v in ${plugin_v[*]}; do
        if contains $v "${v_all[*]}"; then
                v_def=$v
                break
@@ -40,7 +43,7 @@ for f in build.gradle ../build.gradle; do
        while read l; do
                if [[ -z "$plugin_pver" && $l == *'com.android.tools.build:gradle:'* ]]; then
                        plugin_pver=$(echo -n "$l" | sed "s/.*com.android.tools.build:gradle:\\([0-9\\.\\+]\\+\\).*/\\1/")
-               elif [[ -z "$wrapper_ver" && $l == *'gradleVersion'* ]]; then
+               elif [[ -z "$wrapper_ver" && $l == *'gradleVersion = '* ]]; then
                        wrapper_ver=$(echo -n "$l" | sed "s/.*gradleVersion *=* *[\"']\\([0-9\\.]\\+\\)[\"'].*/\\1/")
                fi
        done < $f