diff --git a/app/build.gradle b/app/build.gradle index 3df93fef10..e4a46b61cf 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,6 +10,7 @@ ext { // by replacing $PREFIX since app code is dependant on the variant used to build the APK. // Currently supported values are: [ "apt-android-7" "apt-android-5" ] packageVariant = System.getenv("TERMUX_PACKAGE_VARIANT") ?: "apt-android-7" // Default: "apt-android-7" + noBootstrap = System.getenv("TERMUX_NO_BOOTSTRAP") ?: "0" } android { @@ -213,21 +214,29 @@ clean { task downloadBootstraps() { doLast { def packageVariant = project.ext.packageVariant - if (packageVariant == "apt-android-7") { - def version = "2022.04.28-r5" + "+" + packageVariant - downloadBootstrap("aarch64", "4a51a7eb209fe82efc24d52e3cccc13165f27377290687cb82038cbd8e948430", version) - downloadBootstrap("arm", "6459a786acbae50d4c8a36fa1c3de6a4dd2d482572f6d54f73274709bd627325", version) - downloadBootstrap("i686", "919d212b2f19e08600938db4079e794e947365022dbfd50ac342c50fcedcd7be", version) - downloadBootstrap("x86_64", "61b02fdc03ea4f5d9da8d8cf018013fdc6659e6da6cbf44e9b24d1c623580b89", version) - } else if (packageVariant == "apt-android-5") { - def version = "2022.04.28-r6" + "+" + packageVariant - downloadBootstrap("aarch64", "913609d439415c828c5640be1b0561467e539cb1c7080662decaaca2fb4820e7", version) - downloadBootstrap("arm", "26bfb45304c946170db69108e5eb6e3641aad751406ce106c80df80cad2eccf8", version) - downloadBootstrap("i686", "46dcfeb5eef67ba765498db9fe4c50dc4690805139aa0dd141a9d8ee0693cd27", version) - downloadBootstrap("x86_64", "615b590679ee6cd885b7fd2ff9473c845e920f9b422f790bb158c63fe42b8481", version) + if (project.ext.noBootstrap != "1") { + if (packageVariant == "apt-android-7") { + def version = "2022.04.28-r5" + "+" + packageVariant + downloadBootstrap("aarch64", "4a51a7eb209fe82efc24d52e3cccc13165f27377290687cb82038cbd8e948430", version) + downloadBootstrap("arm", "6459a786acbae50d4c8a36fa1c3de6a4dd2d482572f6d54f73274709bd627325", version) + downloadBootstrap("i686", "919d212b2f19e08600938db4079e794e947365022dbfd50ac342c50fcedcd7be", version) + downloadBootstrap("x86_64", "61b02fdc03ea4f5d9da8d8cf018013fdc6659e6da6cbf44e9b24d1c623580b89", version) + } else if (packageVariant == "apt-android-5") { + def version = "2022.04.28-r6" + "+" + packageVariant + downloadBootstrap("aarch64", "913609d439415c828c5640be1b0561467e539cb1c7080662decaaca2fb4820e7", version) + downloadBootstrap("arm", "26bfb45304c946170db69108e5eb6e3641aad751406ce106c80df80cad2eccf8", version) + downloadBootstrap("i686", "46dcfeb5eef67ba765498db9fe4c50dc4690805139aa0dd141a9d8ee0693cd27", version) + downloadBootstrap("x86_64", "615b590679ee6cd885b7fd2ff9473c845e920f9b422f790bb158c63fe42b8481", version) + } else { + throw new GradleException("Unsupported TERMUX_PACKAGE_VARIANT \"" + packageVariant + "\"") + } } else { - throw new GradleException("Unsupported TERMUX_PACKAGE_VARIANT \"" + packageVariant + "\"") + new File("app/src/main/cpp/", "bootstrap-" + "aarch64" + ".zip").text = "" + new File("app/src/main/cpp/", "bootstrap-" + "arm" + ".zip").text = "" + new File("app/src/main/cpp/", "bootstrap-" + "i686" + ".zip").text = "" + new File("app/src/main/cpp/", "bootstrap-" + "x86_64" + ".zip").text = "" } + } }