list_toolchain_updates_checks 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #!/bin/bash
  2. # android-components
  3. read -d '' p << 'EOF' || true
  4. if (m/const\\s+val\\s+VERSION\\s+=\\s+"([^"]+)"/) {
  5. print $1;
  6. exit;
  7. }
  8. EOF
  9. needed=$(cat buildSrc/src/main/java/AndroidComponents.kt | perl -ne "$p")
  10. current='[% pc("android-components", "var/android_components_version") %]'
  11. check_update_needed android-components "$needed" "$current"
  12. # targetSdkVersion
  13. read -d '' p << 'EOF' || true
  14. if (m/const\\s+val\\s+targetSdkVersion\\s+=\\s+([^"]+)/) {
  15. print $1;
  16. exit;
  17. }
  18. EOF
  19. needed=$(cat buildSrc/src/main/java/Config.kt | perl -ne "$p")
  20. current=30
  21. check_update_needed targetSdkVersion "$needed" "$current"
  22. # compileSdkVersion
  23. read -d '' p << 'EOF' || true
  24. if (m/const\\s+val\\s+compileSdkVersion\\s+=\\s+([^"]+)/) {
  25. print $1;
  26. exit;
  27. }
  28. EOF
  29. needed=$(cat buildSrc/src/main/java/Config.kt | perl -ne "$p")
  30. current=30
  31. check_update_needed compileSdkVersion "$needed" "$current"
  32. # minSdkVersion
  33. read -d '' p << 'EOF' || true
  34. if (m/const\\s+val\\s+minSdkVersion\\s+=\\s+([^"]+)/) {
  35. print $1;
  36. exit;
  37. }
  38. EOF
  39. needed=$(cat buildSrc/src/main/java/Config.kt | perl -ne "$p")
  40. current=21
  41. check_update_needed minSdkVersion "$needed" "$current"
  42. # gradle
  43. read -d '' p << 'EOF' || true
  44. if (m|distributionUrl=https\\\\://services.gradle.org/distributions/gradle-(.*)-all.zip|) {
  45. print $1;
  46. exit;
  47. }
  48. EOF
  49. needed=$(cat gradle/wrapper/gradle-wrapper.properties | perl -ne "$p")
  50. current='[% c("var/gradle_version") %]'
  51. check_update_needed gradle "$needed" "$current"
  52. # android-gradle-plugin
  53. read -d '' p << 'EOF' || true
  54. if (m/const\\s+val\\s+android_gradle_plugin\\s+=\\s+"([^"]+)"/) {
  55. print $1;
  56. exit;
  57. }
  58. EOF
  59. needed=$(cat buildSrc/src/main/java/Dependencies.kt | perl -ne "$p")
  60. current='4.0.1'
  61. check_update_needed android-gradle-plugin "$needed" "$current"