12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #!/bin/bash
- # android-components
- read -d '' p << 'EOF' || true
- if (m/const\\s+val\\s+VERSION\\s+=\\s+"([^"]+)"/) {
- print $1;
- exit;
- }
- EOF
- needed=$(cat buildSrc/src/main/java/AndroidComponents.kt | perl -ne "$p")
- current='[% pc("android-components", "var/android_components_version") %]'
- check_update_needed android-components "$needed" "$current"
- # targetSdkVersion
- read -d '' p << 'EOF' || true
- if (m/const\\s+val\\s+targetSdkVersion\\s+=\\s+([^"]+)/) {
- print $1;
- exit;
- }
- EOF
- needed=$(cat buildSrc/src/main/java/Config.kt | perl -ne "$p")
- current=30
- check_update_needed targetSdkVersion "$needed" "$current"
- # compileSdkVersion
- read -d '' p << 'EOF' || true
- if (m/const\\s+val\\s+compileSdkVersion\\s+=\\s+([^"]+)/) {
- print $1;
- exit;
- }
- EOF
- needed=$(cat buildSrc/src/main/java/Config.kt | perl -ne "$p")
- current=31
- check_update_needed compileSdkVersion "$needed" "$current"
- # minSdkVersion
- read -d '' p << 'EOF' || true
- if (m/const\\s+val\\s+minSdkVersion\\s+=\\s+([^"]+)/) {
- print $1;
- exit;
- }
- EOF
- needed=$(cat buildSrc/src/main/java/Config.kt | perl -ne "$p")
- current=21
- check_update_needed minSdkVersion "$needed" "$current"
- # gradle
- read -d '' p << 'EOF' || true
- if (m|distributionUrl=https\\\\://services.gradle.org/distributions/gradle-(.*)-bin.zip|) {
- print $1;
- exit;
- }
- EOF
- needed=$(cat gradle/wrapper/gradle-wrapper.properties | perl -ne "$p")
- current='[% c("var/gradle_version") %]'
- check_update_needed gradle "$needed" "$current"
- # android-gradle-plugin
- read -d '' p << 'EOF' || true
- if (m/const\\s+val\\s+android_gradle_plugin\\s+=\\s+"([^"]+)"/) {
- print $1;
- exit;
- }
- EOF
- needed=$(cat buildSrc/src/main/java/Dependencies.kt | perl -ne "$p")
- current='7.0.0'
- check_update_needed android-gradle-plugin "$needed" "$current"
|