
> echo Attempting build for Justin-Credible-Ionic-TypeScript-MDHA-Starter with Node 20 and JDK 8
Attempting build for Justin-Credible-Ionic-TypeScript-MDHA-Starter with Node 20 and JDK 8

> docker run --rm -v /home/ubuntu/storage/cordova_assets/extracted/Justin-Credible-Ionic-TypeScript-MDHA-Starter/Ionic-TypeScript-MDHA-Starter-7ee1d87e6806a16a053bf2a7fbae7587b05d6870:/source:ro -v /home/ubuntu/BachelorsThesis/scripts/cordova/output/Justin-Credible-Ionic-TypeScript-MDHA-Starter:/output -v /home/ubuntu/.npm:/root/.npm cordova-android:20-jdk8 bash -c set -e
            cp -r /source/. /app
            cd /app
            rm -rf platforms plugins node_modules || true
            rm -rf $GRADLE_USER_HOME || true
            mkdir -p $GRADLE_USER_HOME

            # unset Gradle options
            unset JAVA_OPTS

            # install deps
            if [ -f yarn.lock ]; then
                yarn install --ignore-scripts
            else
                npm install --ignore-scripts
            fi

            # ensure android platform
            cordova platform add android
            cordova prepare android

            # ---- PATCH ROOT GRADLE FILES (CRITICAL FIX) ----
            for f in platforms/android/build.gradle platforms/android/CordovaLib/build.gradle; do
                if [ -f "$f" ]; then
                    # add missing repositories to buildscript + allprojects
                    sed -i '/buildscript[[:space:]]*{/a\
                repositories {\
                    google()\
                    mavenCentral()\
                    maven { url "https://plugins.gradle.org/m2/" }\
                    maven { url "https://maven.aliyun.com/repository/public" }\
                    maven { url "https://jcenter.bintray.com/" }\
                    maven { url "https://jitpack.io" }\
                }\
            ' "$f" || true

                    sed -i '/allprojects[[:space:]]*{/a\
                repositories {\
                    google()\
                    mavenCentral()\
                    maven { url "https://plugins.gradle.org/m2/" }\
                    maven { url "https://maven.aliyun.com/repository/public" }\
                    maven { url "https://jcenter.bintray.com/" }\
                    maven { url "https://jitpack.io" }\
                }\
            ' "$f" || true
                fi
            done

            # ---- FIX versioncompare (very common failure) ----
            grep -RIl 'com.g00fy2:versioncompare:1.3.4' platforms/android 2>/dev/null | \
            xargs -r sed -i 's/com.g00fy2:versioncompare:1.3.4/io.github.g00fy2:versioncompare:1.5.0/g' || true

            # ---- fix versioncompare imports (CRITICAL) ----
            find platforms/android \( -name "*.gradle" -o -name "*.gradle.kts" \) -print0 | \
            xargs -0 sed -i 's/import com\.g00fy2\.versioncompare\.Version/import io.github.g00fy2.versioncompare.Version/g' || true

            # ---- OPTIONAL: remove illegal JVM args ----
            find platforms/android -type f -exec sed -i 's/--illegal-access=permit//g' {} + || true

            # ---- JDK 8 specific patch (minimal, no overwrite!) ----
            if [ \"8\" = "8" ]; then
                # ensure older sdk usage (do NOT overwrite build.gradle anymore)
                find platforms/android -name "build.gradle" -exec \
                    sed -i 's/compileSdkVersion [0-9]\+/compileSdkVersion 30/g' {} \; || true

                find platforms/android -name "build.gradle" -exec \
                    sed -i 's/targetSdkVersion [0-9]\+/targetSdkVersion 30/g' {} \; || true
            fi

            # ---- android sdk path ----
            echo "sdk.dir=$ANDROID_HOME" > platforms/android/local.properties

            # ---- force APK output (suppress AAB generation) ----
            echo "android.bundle.enableAll=false" >> platforms/android/gradle.properties

            # ---- enable ABI splits ----
            if grep -q 'splits' platforms/android/app/build.gradle 2>/dev/null; then
                sed -i 's/enable false/enable true/' platforms/android/app/build.gradle || true
            else
                sed -i '/^android[[:space:]]*{/a\    splits {\n        abi {\n            reset()\n            enable true\n            universalApk false\n            include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"\n        }\n    }' platforms/android/app/build.gradle || true
            fi

            # ---- build debug APK ----
            cordova build android --debug --no-interactive --verbose

            cp platforms/android/app/build/outputs/apk/debug/*.apk /output/

            # ---- copy TPL metadata ----
            [ -f config.xml ] && cp config.xml /output/ || true
            [ -f plugins/fetch.json ] && cp plugins/fetch.json /output/ || true
            [ -f plugins/android.json ] && cp plugins/android.json /output/ || true
            [ -f platforms/android/app/build.gradle ] && cp platforms/android/app/build.gradle /output/app-build.gradle || true
            [ -f platforms/android/build.gradle ] && cp platforms/android/build.gradle /output/root-build.gradle || true
            [ -f platforms/android/settings.gradle ] && cp platforms/android/settings.gradle /output/ || true
            [ -f package.json ] && cp package.json /output/ || true
            [ -f package-lock.json ] && cp package-lock.json /output/ || true
            [ -f yarn.lock ] && cp yarn.lock /output/ || true
            [ -f pnpm-lock.yaml ] && cp pnpm-lock.yaml /output/ || true
            mkdir -p /output/plugin_manifests
            find plugins -name "plugin.xml" 2>/dev/null | while read f; do cp "$f" /output/plugin_manifests/$(echo "$f" | tr '/' '_') 2>/dev/null; done || true
            find plugins -name "*.gradle" 2>/dev/null | while read f; do cp "$f" /output/ 2>/dev/null; done || true
            find platforms/android -name "*.gradle" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/ 2>/dev/null; done || true
            mkdir -p /output/libs
            find plugins platforms/android -name "*.jar" -not -name "gradle-wrapper.jar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true
            find plugins platforms/android -name "*.aar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true
            find plugins platforms/android -name "*.so" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true
            
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: 'karma@0.13.19',
npm warn EBADENGINE   required: { node: '0.10 || 0.12 || 4 || 5' },
npm warn EBADENGINE   current: { node: 'v20.20.2', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: 'joi-assert@0.0.3',
npm warn EBADENGINE   required: { node: '>= 0.10.0 <= 0.11.0' },
npm warn EBADENGINE   current: { node: 'v20.20.2', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn deprecated bower@1.6.3: This Bower version has SECURITY BUG THAT ALLOWS TO WRITE TO ARBITRARY FILE ON YOUR COMPUTER when you install malicious package. Please upgrade Bower to at least version 1.8.8 if you don't want to get hacked. More info: https://snyk.io/blog/severe-security-vulnerability-in-bowers-zip-archive-extraction/
npm warn deprecated ionic@1.7.12: The Ionic CLI now uses ✨ @ionic/cli ✨ for its package name! 👉 https://twitter.com/ionicframework/status/1223268498362851330
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.
npm warn deprecated fstream-ignore@1.0.5: This package is no longer supported.
npm warn deprecated osenv@0.1.5: This package is no longer supported.
npm warn deprecated gulp-angular-templatecache@1.8.0: The original owners are no longer maintaining this package. It is usable in its current state but will not be updated. The package will be transferred responsibly to npm.
npm warn deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm warn deprecated uid-number@0.0.5: This package is no longer supported.
npm warn deprecated read-package-json@2.1.2: This package is no longer supported. Please use @npmcli/package-json instead.
npm warn deprecated lodash.template@3.6.2: This package is deprecated. Use https://socket.dev/npm/package/eta instead.
npm warn deprecated gulp-header@1.8.12: Removed event-stream from gulp-header
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm warn deprecated npmlog@4.1.2: This package is no longer supported.
npm warn deprecated osenv@0.0.3: This package is no longer supported.
npm warn deprecated har-validator@5.1.5: this library is no longer supported
npm warn deprecated lodash.template@4.18.1: This package is deprecated. Use https://socket.dev/npm/package/eta instead.
npm warn deprecated osenv@0.1.0: This package is no longer supported.
npm warn deprecated cryptiles@2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated gulp-footer@1.1.2: Security vulnerability surrounding event-stream, do *NOT* use.
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm warn deprecated are-we-there-yet@1.1.7: This package is no longer supported.
npm warn deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm warn deprecated ini@1.1.0: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm warn deprecated topo@1.1.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated json3@3.3.2: Please use the native JSON object instead of JSON 3
npm warn deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm warn deprecated rimraf@2.2.8: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@4.5.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm warn deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@5.0.15: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@4.5.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated glob@4.3.5: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@4.5.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated glob@6.0.4: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@5.0.15: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated rimraf@2.2.8: Rimraf versions prior to v4 are no longer supported
npm warn deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated rimraf@2.2.8: Rimraf versions prior to v4 are no longer supported
npm warn deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm warn deprecated glob@7.1.7: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated karma-phantomjs-launcher@0.2.1: PhantomJS development have stopped, use puppeteer or similar
npm warn deprecated xmldom@0.1.19: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm warn deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm warn deprecated dep-graph@1.1.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated q@1.0.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm warn deprecated gulp-util@3.0.6: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm warn deprecated q@0.9.7: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm warn deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated node-uuid@1.3.3: Use uuid module instead
npm warn deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm warn deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated rcloader@0.1.4: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated mkdirp@0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm warn deprecated uuid@2.0.3: uuid@10 and below is no longer supported.  For ESM codebases, update to uuid@latest.  For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).
npm warn deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm warn deprecated uuid@3.4.0: uuid@10 and below is no longer supported.  For ESM codebases, update to uuid@latest.  For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).
npm warn deprecated gauge@2.7.4: This package is no longer supported.
npm warn deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated node-uuid@1.4.8: Use uuid module instead
npm warn deprecated glob@3.1.21: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated mkdirp@0.5.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm warn deprecated har-validator@2.0.6: this library is no longer supported
npm warn deprecated request@2.47.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated request@2.42.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated request@2.42.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated fstream@1.0.12: This package is no longer supported.
npm warn deprecated request@2.51.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated glob@3.2.11: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated npmconf@2.1.3: this package has been reintegrated into npm and is now out of date with respect to npm
npm warn deprecated tough-cookie@0.12.1: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm warn deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated npmconf@2.1.1: this package has been reintegrated into npm and is now out of date with respect to npm
npm warn deprecated request@2.65.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated tar@1.0.2: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated glob@4.0.6: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@4.0.6: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated joi@4.9.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated log4js@0.6.38: 0.x is no longer supported. Please upgrade to 6.x or higher.
npm warn deprecated tsd@0.6.5: TSD is deprecated in favor of Typings (https://github.com/typings/typings) - see https://github.com/DefinitelyTyped/tsd/issues/269 for more information
npm warn deprecated tar@2.2.2: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated bower@1.3.12: This Bower version has SECURITY BUG THAT ALLOWS TO WRITE TO ARBITRARY FILE ON YOUR COMPUTER when you install malicious package. Please upgrade Bower to at least version 1.8.8 if you don't want to get hacked. More info: https://snyk.io/blog/severe-security-vulnerability-in-bowers-zip-archive-extraction/
npm warn deprecated highlight.js@8.9.1: Version no longer supported. Upgrade to @latest
npm warn deprecated node-sass@3.13.1: Node Sass is no longer supported. Please use `sass` or `sass-embedded` instead.
npm warn deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

added 1405 packages, and audited 3364 packages in 1m

52 packages are looking for funding
  run `npm fund` for details

184 vulnerabilities (5 low, 34 moderate, 106 high, 39 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
Using cordova-fetch for cordova-android
Adding android project...
Creating Cordova project for the Android platform:
	Path: platforms/android
	Package: net.justincredible.sampleapp
	Name: Ionic-TypeScript-MDHA-Starter
	Activity: MainActivity
	Android Target SDK: android-36
	Android Compile SDK: 36
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@15.1.0
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
Plugin 'cordova-plugin-whitelist' found in config.xml... Migrating it to package.json
Discovered plugin "cordova-plugin-whitelist". Adding it to the project
Installing "cordova-plugin-whitelist" for android
Plugin doesn't support this project's cordova-android version. cordova-android: 15.1.0, failed version requirement: >=4.0.0 <10.0.0
Skipping 'cordova-plugin-whitelist' for android
Adding cordova-plugin-whitelist to package.json
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
No scripts found for hook "before_build".
No scripts found for hook "before_prepare".
Checking for saved platforms that haven't been added to the project
Loaded API for android project /app/platforms/android/cordova/Api.js
Checking for saved plugins that haven't been added to the project
Generating platform-specific config.xml from defaults for android at /app/platforms/android/app/src/main/res/xml/config.xml
Merging project's config.xml into platform-specific android config.xml
[Gradle Properties] Preparing Configuration
[Gradle Properties] Appending default configuration properties
[Gradle Properties] Updating Gradle property "android.enableJetifier" with the value of "true"
[Gradle Properties] Appending custom configuration properties
[Gradle Properties] Updating and Saving File
Found "merges/android" folder. Copying its contents into the android project.
Merging and updating files from [www, platforms/android/platform_www, merges/android] to platforms/android/app/src/main/assets/www
  copy  platforms/android/platform_www/cordova.js platforms/android/app/src/main/assets/www/cordova.js (updated file)
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
Wrote out android application name "Ionic-TypeScript-MDHA-Starter" to /app/platforms/android/app/src/main/res/values/cdv_strings.xml
The Android Splash Screen background color was set to: Default
The "AndroidWindowSplashScreenAnimatedIcon" is undefined. Cordova's default will be used.
The "AndroidWindowSplashScreenBrandingImage" is undefined. Cordova's default will be used.
Wrote out Android application SplashScreen Icon Color to /app/platforms/android/app/src/main/res/values/cdv_colors.xml
Wrote out Android application themes to /app/platforms/android/app/src/main/res/values/cdv_themes.xml
[Cordova Gradle Config] Setting "PACKAGE_NAMESPACE" to net.justincredible.sampleapp
[Cordova Gradle Config] Saving File
android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.1.0): 10100
Updating icons at platforms/android/app/src/main/res
This app does not have additional resource files defined
Prepared android project successfully
No scripts found for hook "after_prepare".
No scripts found for hook "before_compile".
Checking Java JDK and Android SDK versions
ANDROID_HOME=/opt/android (recommended setting)
ANDROID_SDK_ROOT=/opt/android (DEPRECATED)
Using Android SDK: /opt/android
Reading build config file: /app/build.json
Using Gradle: 8.14.2

Welcome to Gradle 6.5!

Here are the highlights of this release:
 - Experimental file-system watching
 - Improved version ordering
 - New samples

For more details see https://docs.gradle.org/6.5/release-notes.html

> Task :wrapper

BUILD SUCCESSFUL in 5s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
Running Gradle Build: /app/platforms/android/tools/gradlew cdvBuildDebug
Downloading https://services.gradle.org/distributions/gradle-8.14.2-bin.zip
.............10%.............20%.............30%.............40%.............50%.............60%.............70%.............80%.............90%..............100%

Welcome to Gradle 8.14.2!

Here are the highlights of this release:
 - Java 24 support
 - GraalVM Native Image toolchain selection
 - Enhancements to test reporting
 - Build Authoring improvements

For more details see https://docs.gradle.org/8.14.2/release-notes.html

To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.14.2/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build 

[Incubating] Problems report is available at: file:///app/platforms/android/build/reports/problems/problems-report.html

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'Ionic-TypeScript-MDHA-Starter'.
> Could not resolve all artifacts for configuration 'classpath'.
   > Could not resolve com.android.tools.build:gradle:8.10.1.
     Required by:
         root project :
      > Dependency requires at least JVM runtime version 11. This build uses a Java 8 JVM.

* Try:
> Run this build using a Java 11 or newer JVM.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.14.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
 option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 22s
Command failed with exit code 1: /app/platforms/android/tools/gradlew cdvBuildDebug
Error: Command failed with exit code 1: /app/platforms/android/tools/gradlew cdvBuildDebug
    at makeError (/app/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/app/node_modules/execa/index.js:118:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ProjectBuilder.build (/app/node_modules/cordova-android/lib/builders/ProjectBuilder.js:369:20)

> echo Build failed with Node 20 and JDK 8: Command '['docker', 'run', '--rm', '-v', '/home/ubuntu/storage/cordova_assets/extracted/Justin-Credible-Ionic-TypeScript-MDHA-Starter/Ionic-TypeScript-MDHA-Starter-7ee1d87e6806a16a053bf2a7fbae7587b05d6870:/source:ro', '-v', '/home/ubuntu/BachelorsThesis/scripts/cordova/output/Justin-Credible-Ionic-TypeScript-MDHA-Starter:/output', '-v', '/home/ubuntu/.npm:/root/.npm', 'cordova-android:20-jdk8', 'bash', '-c', 'set -e\n            cp -r /source/. /app\n            cd /app\n            rm -rf platforms plugins node_modules || true\n            rm -rf $GRADLE_USER_HOME || true\n            mkdir -p $GRADLE_USER_HOME\n\n            # unset Gradle options\n            unset JAVA_OPTS\n\n            # install deps\n            if [ -f yarn.lock ]; then\n                yarn install --ignore-scripts\n            else\n                npm install --ignore-scripts\n            fi\n\n            # ensure android platform\n            cordova platform add android\n            cordova prepare android\n\n            # ---- PATCH ROOT GRADLE FILES (CRITICAL FIX) ----\n            for f in platforms/android/build.gradle platforms/android/CordovaLib/build.gradle; do\n                if [ -f "$f" ]; then\n                    # add missing repositories to buildscript + allprojects\n                    sed -i \'/buildscript[[:space:]]*{/a\\\n                repositories {\\\n                    google()\\\n                    mavenCentral()\\\n                    maven { url "https://plugins.gradle.org/m2/" }\\\n                    maven { url "https://maven.aliyun.com/repository/public" }\\\n                    maven { url "https://jcenter.bintray.com/" }\\\n                    maven { url "https://jitpack.io" }\\\n                }\\\n            \' "$f" || true\n\n                    sed -i \'/allprojects[[:space:]]*{/a\\\n                repositories {\\\n                    google()\\\n                    mavenCentral()\\\n                    maven { url "https://plugins.gradle.org/m2/" }\\\n                    maven { url "https://maven.aliyun.com/repository/public" }\\\n                    maven { url "https://jcenter.bintray.com/" }\\\n                    maven { url "https://jitpack.io" }\\\n                }\\\n            \' "$f" || true\n                fi\n            done\n\n            # ---- FIX versioncompare (very common failure) ----\n            grep -RIl \'com.g00fy2:versioncompare:1.3.4\' platforms/android 2>/dev/null | \\\n            xargs -r sed -i \'s/com.g00fy2:versioncompare:1.3.4/io.github.g00fy2:versioncompare:1.5.0/g\' || true\n\n            # ---- fix versioncompare imports (CRITICAL) ----\n            find platforms/android \\( -name "*.gradle" -o -name "*.gradle.kts" \\) -print0 | \\\n            xargs -0 sed -i \'s/import com\\.g00fy2\\.versioncompare\\.Version/import io.github.g00fy2.versioncompare.Version/g\' || true\n\n            # ---- OPTIONAL: remove illegal JVM args ----\n            find platforms/android -type f -exec sed -i \'s/--illegal-access=permit//g\' {} + || true\n\n            # ---- JDK 8 specific patch (minimal, no overwrite!) ----\n            if [ \\"8\\" = "8" ]; then\n                # ensure older sdk usage (do NOT overwrite build.gradle anymore)\n                find platforms/android -name "build.gradle" -exec \\\n                    sed -i \'s/compileSdkVersion [0-9]\\+/compileSdkVersion 30/g\' {} \\; || true\n\n                find platforms/android -name "build.gradle" -exec \\\n                    sed -i \'s/targetSdkVersion [0-9]\\+/targetSdkVersion 30/g\' {} \\; || true\n            fi\n\n            # ---- android sdk path ----\n            echo "sdk.dir=$ANDROID_HOME" > platforms/android/local.properties\n\n            # ---- force APK output (suppress AAB generation) ----\n            echo "android.bundle.enableAll=false" >> platforms/android/gradle.properties\n\n            # ---- enable ABI splits ----\n            if grep -q \'splits\' platforms/android/app/build.gradle 2>/dev/null; then\n                sed -i \'s/enable false/enable true/\' platforms/android/app/build.gradle || true\n            else\n                sed -i \'/^android[[:space:]]*{/a\\    splits {\\n        abi {\\n            reset()\\n            enable true\\n            universalApk false\\n            include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"\\n        }\\n    }\' platforms/android/app/build.gradle || true\n            fi\n\n            # ---- build debug APK ----\n            cordova build android --debug --no-interactive --verbose\n\n            cp platforms/android/app/build/outputs/apk/debug/*.apk /output/\n\n            # ---- copy TPL metadata ----\n            [ -f config.xml ] && cp config.xml /output/ || true\n            [ -f plugins/fetch.json ] && cp plugins/fetch.json /output/ || true\n            [ -f plugins/android.json ] && cp plugins/android.json /output/ || true\n            [ -f platforms/android/app/build.gradle ] && cp platforms/android/app/build.gradle /output/app-build.gradle || true\n            [ -f platforms/android/build.gradle ] && cp platforms/android/build.gradle /output/root-build.gradle || true\n            [ -f platforms/android/settings.gradle ] && cp platforms/android/settings.gradle /output/ || true\n            [ -f package.json ] && cp package.json /output/ || true\n            [ -f package-lock.json ] && cp package-lock.json /output/ || true\n            [ -f yarn.lock ] && cp yarn.lock /output/ || true\n            [ -f pnpm-lock.yaml ] && cp pnpm-lock.yaml /output/ || true\n            mkdir -p /output/plugin_manifests\n            find plugins -name "plugin.xml" 2>/dev/null | while read f; do cp "$f" /output/plugin_manifests/$(echo "$f" | tr \'/\' \'_\') 2>/dev/null; done || true\n            find plugins -name "*.gradle" 2>/dev/null | while read f; do cp "$f" /output/ 2>/dev/null; done || true\n            find platforms/android -name "*.gradle" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/ 2>/dev/null; done || true\n            mkdir -p /output/libs\n            find plugins platforms/android -name "*.jar" -not -name "gradle-wrapper.jar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true\n            find plugins platforms/android -name "*.aar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true\n            find plugins platforms/android -name "*.so" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true\n            ']' returned non-zero exit status 1.
Build failed with Node 20 and JDK 8: Command '['docker', 'run', '--rm', '-v', '/home/ubuntu/storage/cordova_assets/extracted/Justin-Credible-Ionic-TypeScript-MDHA-Starter/Ionic-TypeScript-MDHA-Starter-7ee1d87e6806a16a053bf2a7fbae7587b05d6870:/source:ro', '-v', '/home/ubuntu/BachelorsThesis/scripts/cordova/output/Justin-Credible-Ionic-TypeScript-MDHA-Starter:/output', '-v', '/home/ubuntu/.npm:/root/.npm', 'cordova-android:20-jdk8', 'bash', '-c', 'set -e\n            cp -r /source/. /app\n            cd /app\n            rm -rf platforms plugins node_modules || true\n            rm -rf $GRADLE_USER_HOME || true\n            mkdir -p $GRADLE_USER_HOME\n\n            # unset Gradle options\n            unset JAVA_OPTS\n\n            # install deps\n            if [ -f yarn.lock ]; then\n                yarn install --ignore-scripts\n            else\n                npm install --ignore-scripts\n            fi\n\n            # ensure android platform\n            cordova platform add android\n            cordova prepare android\n\n            # ---- PATCH ROOT GRADLE FILES (CRITICAL FIX) ----\n            for f in platforms/android/build.gradle platforms/android/CordovaLib/build.gradle; do\n                if [ -f "$f" ]; then\n                    # add missing repositories to buildscript + allprojects\n                    sed -i \'/buildscript[[:space:]]*{/a\\\n                repositories {\\\n                    google()\\\n                    mavenCentral()\\\n                    maven { url "https://plugins.gradle.org/m2/" }\\\n                    maven { url "https://maven.aliyun.com/repository/public" }\\\n                    maven { url "https://jcenter.bintray.com/" }\\\n                    maven { url "https://jitpack.io" }\\\n                }\\\n            \' "$f" || true\n\n                    sed -i \'/allprojects[[:space:]]*{/a\\\n                repositories {\\\n                    google()\\\n                    mavenCentral()\\\n                    maven { url "https://plugins.gradle.org/m2/" }\\\n                    maven { url "https://maven.aliyun.com/repository/public" }\\\n                    maven { url "https://jcenter.bintray.com/" }\\\n                    maven { url "https://jitpack.io" }\\\n                }\\\n            \' "$f" || true\n                fi\n            done\n\n            # ---- FIX versioncompare (very common failure) ----\n            grep -RIl \'com.g00fy2:versioncompare:1.3.4\' platforms/android 2>/dev/null | \\\n            xargs -r sed -i \'s/com.g00fy2:versioncompare:1.3.4/io.github.g00fy2:versioncompare:1.5.0/g\' || true\n\n            # ---- fix versioncompare imports (CRITICAL) ----\n            find platforms/android \\( -name "*.gradle" -o -name "*.gradle.kts" \\) -print0 | \\\n            xargs -0 sed -i \'s/import com\\.g00fy2\\.versioncompare\\.Version/import io.github.g00fy2.versioncompare.Version/g\' || true\n\n            # ---- OPTIONAL: remove illegal JVM args ----\n            find platforms/android -type f -exec sed -i \'s/--illegal-access=permit//g\' {} + || true\n\n            # ---- JDK 8 specific patch (minimal, no overwrite!) ----\n            if [ \\"8\\" = "8" ]; then\n                # ensure older sdk usage (do NOT overwrite build.gradle anymore)\n                find platforms/android -name "build.gradle" -exec \\\n                    sed -i \'s/compileSdkVersion [0-9]\\+/compileSdkVersion 30/g\' {} \\; || true\n\n                find platforms/android -name "build.gradle" -exec \\\n                    sed -i \'s/targetSdkVersion [0-9]\\+/targetSdkVersion 30/g\' {} \\; || true\n            fi\n\n            # ---- android sdk path ----\n            echo "sdk.dir=$ANDROID_HOME" > platforms/android/local.properties\n\n            # ---- force APK output (suppress AAB generation) ----\n            echo "android.bundle.enableAll=false" >> platforms/android/gradle.properties\n\n            # ---- enable ABI splits ----\n            if grep -q \'splits\' platforms/android/app/build.gradle 2>/dev/null; then\n                sed -i \'s/enable false/enable true/\' platforms/android/app/build.gradle || true\n            else\n                sed -i \'/^android[[:space:]]*{/a\\    splits {\\n        abi {\\n            reset()\\n            enable true\\n            universalApk false\\n            include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"\\n        }\\n    }\' platforms/android/app/build.gradle || true\n            fi\n\n            # ---- build debug APK ----\n            cordova build android --debug --no-interactive --verbose\n\n            cp platforms/android/app/build/outputs/apk/debug/*.apk /output/\n\n            # ---- copy TPL metadata ----\n            [ -f config.xml ] && cp config.xml /output/ || true\n            [ -f plugins/fetch.json ] && cp plugins/fetch.json /output/ || true\n            [ -f plugins/android.json ] && cp plugins/android.json /output/ || true\n            [ -f platforms/android/app/build.gradle ] && cp platforms/android/app/build.gradle /output/app-build.gradle || true\n            [ -f platforms/android/build.gradle ] && cp platforms/android/build.gradle /output/root-build.gradle || true\n            [ -f platforms/android/settings.gradle ] && cp platforms/android/settings.gradle /output/ || true\n            [ -f package.json ] && cp package.json /output/ || true\n            [ -f package-lock.json ] && cp package-lock.json /output/ || true\n            [ -f yarn.lock ] && cp yarn.lock /output/ || true\n            [ -f pnpm-lock.yaml ] && cp pnpm-lock.yaml /output/ || true\n            mkdir -p /output/plugin_manifests\n            find plugins -name "plugin.xml" 2>/dev/null | while read f; do cp "$f" /output/plugin_manifests/$(echo "$f" | tr \'/\' \'_\') 2>/dev/null; done || true\n            find plugins -name "*.gradle" 2>/dev/null | while read f; do cp "$f" /output/ 2>/dev/null; done || true\n            find platforms/android -name "*.gradle" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/ 2>/dev/null; done || true\n            mkdir -p /output/libs\n            find plugins platforms/android -name "*.jar" -not -name "gradle-wrapper.jar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true\n            find plugins platforms/android -name "*.aar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true\n            find plugins platforms/android -name "*.so" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true\n            ']' returned non-zero exit status 1.

> echo Attempting build for Justin-Credible-Ionic-TypeScript-MDHA-Starter with Node 20 and JDK 11
Attempting build for Justin-Credible-Ionic-TypeScript-MDHA-Starter with Node 20 and JDK 11

> docker run --rm -v /home/ubuntu/storage/cordova_assets/extracted/Justin-Credible-Ionic-TypeScript-MDHA-Starter/Ionic-TypeScript-MDHA-Starter-7ee1d87e6806a16a053bf2a7fbae7587b05d6870:/source:ro -v /home/ubuntu/BachelorsThesis/scripts/cordova/output/Justin-Credible-Ionic-TypeScript-MDHA-Starter:/output -v /home/ubuntu/.npm:/root/.npm cordova-android:20-jdk11 bash -c set -e
            cp -r /source/. /app
            cd /app
            rm -rf platforms plugins node_modules || true
            rm -rf $GRADLE_USER_HOME || true
            mkdir -p $GRADLE_USER_HOME

            # unset Gradle options
            unset JAVA_OPTS

            # install deps
            if [ -f yarn.lock ]; then
                yarn install --ignore-scripts
            else
                npm install --ignore-scripts
            fi

            # ensure android platform
            cordova platform add android
            cordova prepare android

            # ---- PATCH ROOT GRADLE FILES (CRITICAL FIX) ----
            for f in platforms/android/build.gradle platforms/android/CordovaLib/build.gradle; do
                if [ -f "$f" ]; then
                    # add missing repositories to buildscript + allprojects
                    sed -i '/buildscript[[:space:]]*{/a\
                repositories {\
                    google()\
                    mavenCentral()\
                    maven { url "https://plugins.gradle.org/m2/" }\
                    maven { url "https://maven.aliyun.com/repository/public" }\
                    maven { url "https://jcenter.bintray.com/" }\
                    maven { url "https://jitpack.io" }\
                }\
            ' "$f" || true

                    sed -i '/allprojects[[:space:]]*{/a\
                repositories {\
                    google()\
                    mavenCentral()\
                    maven { url "https://plugins.gradle.org/m2/" }\
                    maven { url "https://maven.aliyun.com/repository/public" }\
                    maven { url "https://jcenter.bintray.com/" }\
                    maven { url "https://jitpack.io" }\
                }\
            ' "$f" || true
                fi
            done

            # ---- FIX versioncompare (very common failure) ----
            grep -RIl 'com.g00fy2:versioncompare:1.3.4' platforms/android 2>/dev/null | \
            xargs -r sed -i 's/com.g00fy2:versioncompare:1.3.4/io.github.g00fy2:versioncompare:1.5.0/g' || true

            # ---- fix versioncompare imports (CRITICAL) ----
            find platforms/android \( -name "*.gradle" -o -name "*.gradle.kts" \) -print0 | \
            xargs -0 sed -i 's/import com\.g00fy2\.versioncompare\.Version/import io.github.g00fy2.versioncompare.Version/g' || true

            # ---- OPTIONAL: remove illegal JVM args ----
            find platforms/android -type f -exec sed -i 's/--illegal-access=permit//g' {} + || true

            # ---- JDK 8 specific patch (minimal, no overwrite!) ----
            if [ \"11\" = "8" ]; then
                # ensure older sdk usage (do NOT overwrite build.gradle anymore)
                find platforms/android -name "build.gradle" -exec \
                    sed -i 's/compileSdkVersion [0-9]\+/compileSdkVersion 30/g' {} \; || true

                find platforms/android -name "build.gradle" -exec \
                    sed -i 's/targetSdkVersion [0-9]\+/targetSdkVersion 30/g' {} \; || true
            fi

            # ---- android sdk path ----
            echo "sdk.dir=$ANDROID_HOME" > platforms/android/local.properties

            # ---- force APK output (suppress AAB generation) ----
            echo "android.bundle.enableAll=false" >> platforms/android/gradle.properties

            # ---- enable ABI splits ----
            if grep -q 'splits' platforms/android/app/build.gradle 2>/dev/null; then
                sed -i 's/enable false/enable true/' platforms/android/app/build.gradle || true
            else
                sed -i '/^android[[:space:]]*{/a\    splits {\n        abi {\n            reset()\n            enable true\n            universalApk false\n            include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"\n        }\n    }' platforms/android/app/build.gradle || true
            fi

            # ---- build debug APK ----
            cordova build android --debug --no-interactive --verbose

            cp platforms/android/app/build/outputs/apk/debug/*.apk /output/

            # ---- copy TPL metadata ----
            [ -f config.xml ] && cp config.xml /output/ || true
            [ -f plugins/fetch.json ] && cp plugins/fetch.json /output/ || true
            [ -f plugins/android.json ] && cp plugins/android.json /output/ || true
            [ -f platforms/android/app/build.gradle ] && cp platforms/android/app/build.gradle /output/app-build.gradle || true
            [ -f platforms/android/build.gradle ] && cp platforms/android/build.gradle /output/root-build.gradle || true
            [ -f platforms/android/settings.gradle ] && cp platforms/android/settings.gradle /output/ || true
            [ -f package.json ] && cp package.json /output/ || true
            [ -f package-lock.json ] && cp package-lock.json /output/ || true
            [ -f yarn.lock ] && cp yarn.lock /output/ || true
            [ -f pnpm-lock.yaml ] && cp pnpm-lock.yaml /output/ || true
            mkdir -p /output/plugin_manifests
            find plugins -name "plugin.xml" 2>/dev/null | while read f; do cp "$f" /output/plugin_manifests/$(echo "$f" | tr '/' '_') 2>/dev/null; done || true
            find plugins -name "*.gradle" 2>/dev/null | while read f; do cp "$f" /output/ 2>/dev/null; done || true
            find platforms/android -name "*.gradle" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/ 2>/dev/null; done || true
            mkdir -p /output/libs
            find plugins platforms/android -name "*.jar" -not -name "gradle-wrapper.jar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true
            find plugins platforms/android -name "*.aar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true
            find plugins platforms/android -name "*.so" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true
            
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: 'karma@0.13.19',
npm warn EBADENGINE   required: { node: '0.10 || 0.12 || 4 || 5' },
npm warn EBADENGINE   current: { node: 'v20.20.2', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: 'joi-assert@0.0.3',
npm warn EBADENGINE   required: { node: '>= 0.10.0 <= 0.11.0' },
npm warn EBADENGINE   current: { node: 'v20.20.2', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn deprecated bower@1.6.3: This Bower version has SECURITY BUG THAT ALLOWS TO WRITE TO ARBITRARY FILE ON YOUR COMPUTER when you install malicious package. Please upgrade Bower to at least version 1.8.8 if you don't want to get hacked. More info: https://snyk.io/blog/severe-security-vulnerability-in-bowers-zip-archive-extraction/
npm warn deprecated ionic@1.7.12: The Ionic CLI now uses ✨ @ionic/cli ✨ for its package name! 👉 https://twitter.com/ionicframework/status/1223268498362851330
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.
npm warn deprecated fstream-ignore@1.0.5: This package is no longer supported.
npm warn deprecated osenv@0.1.5: This package is no longer supported.
npm warn deprecated gulp-angular-templatecache@1.8.0: The original owners are no longer maintaining this package. It is usable in its current state but will not be updated. The package will be transferred responsibly to npm.
npm warn deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm warn deprecated uid-number@0.0.5: This package is no longer supported.
npm warn deprecated read-package-json@2.1.2: This package is no longer supported. Please use @npmcli/package-json instead.
npm warn deprecated lodash.template@3.6.2: This package is deprecated. Use https://socket.dev/npm/package/eta instead.
npm warn deprecated gulp-header@1.8.12: Removed event-stream from gulp-header
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm warn deprecated npmlog@4.1.2: This package is no longer supported.
npm warn deprecated osenv@0.0.3: This package is no longer supported.
npm warn deprecated har-validator@5.1.5: this library is no longer supported
npm warn deprecated lodash.template@4.18.1: This package is deprecated. Use https://socket.dev/npm/package/eta instead.
npm warn deprecated osenv@0.1.0: This package is no longer supported.
npm warn deprecated cryptiles@2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated gulp-footer@1.1.2: Security vulnerability surrounding event-stream, do *NOT* use.
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm warn deprecated are-we-there-yet@1.1.7: This package is no longer supported.
npm warn deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm warn deprecated ini@1.1.0: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm warn deprecated topo@1.1.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated json3@3.3.2: Please use the native JSON object instead of JSON 3
npm warn deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated rimraf@2.2.8: Rimraf versions prior to v4 are no longer supported
npm warn deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm warn deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm warn deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm warn deprecated glob@4.5.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@5.0.15: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@4.5.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated glob@4.3.5: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated rimraf@2.2.8: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@4.5.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated glob@6.0.4: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@5.0.15: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm warn deprecated rimraf@2.2.8: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.1.7: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated karma-phantomjs-launcher@0.2.1: PhantomJS development have stopped, use puppeteer or similar
npm warn deprecated xmldom@0.1.19: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm warn deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm warn deprecated q@1.0.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm warn deprecated dep-graph@1.1.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated gulp-util@3.0.6: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm warn deprecated q@0.9.7: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm warn deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated node-uuid@1.3.3: Use uuid module instead
npm warn deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm warn deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated rcloader@0.1.4: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated mkdirp@0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm warn deprecated uuid@2.0.3: uuid@10 and below is no longer supported.  For ESM codebases, update to uuid@latest.  For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).
npm warn deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm warn deprecated uuid@3.4.0: uuid@10 and below is no longer supported.  For ESM codebases, update to uuid@latest.  For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).
npm warn deprecated gauge@2.7.4: This package is no longer supported.
npm warn deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated node-uuid@1.4.8: Use uuid module instead
npm warn deprecated glob@3.1.21: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated mkdirp@0.5.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm warn deprecated har-validator@2.0.6: this library is no longer supported
npm warn deprecated request@2.47.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated request@2.42.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated request@2.42.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated fstream@1.0.12: This package is no longer supported.
npm warn deprecated request@2.51.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated glob@3.2.11: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated npmconf@2.1.3: this package has been reintegrated into npm and is now out of date with respect to npm
npm warn deprecated tough-cookie@0.12.1: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm warn deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated npmconf@2.1.1: this package has been reintegrated into npm and is now out of date with respect to npm
npm warn deprecated request@2.65.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated tar@1.0.2: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated glob@4.0.6: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@4.0.6: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated joi@4.9.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated log4js@0.6.38: 0.x is no longer supported. Please upgrade to 6.x or higher.
npm warn deprecated tsd@0.6.5: TSD is deprecated in favor of Typings (https://github.com/typings/typings) - see https://github.com/DefinitelyTyped/tsd/issues/269 for more information
npm warn deprecated tar@2.2.2: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated bower@1.3.12: This Bower version has SECURITY BUG THAT ALLOWS TO WRITE TO ARBITRARY FILE ON YOUR COMPUTER when you install malicious package. Please upgrade Bower to at least version 1.8.8 if you don't want to get hacked. More info: https://snyk.io/blog/severe-security-vulnerability-in-bowers-zip-archive-extraction/
npm warn deprecated highlight.js@8.9.1: Version no longer supported. Upgrade to @latest
npm warn deprecated node-sass@3.13.1: Node Sass is no longer supported. Please use `sass` or `sass-embedded` instead.
npm warn deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

added 1405 packages, and audited 3364 packages in 1m

52 packages are looking for funding
  run `npm fund` for details

184 vulnerabilities (5 low, 34 moderate, 106 high, 39 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
Using cordova-fetch for cordova-android
Adding android project...
Creating Cordova project for the Android platform:
	Path: platforms/android
	Package: net.justincredible.sampleapp
	Name: Ionic-TypeScript-MDHA-Starter
	Activity: MainActivity
	Android Target SDK: android-36
	Android Compile SDK: 36
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@15.1.0
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
Plugin 'cordova-plugin-whitelist' found in config.xml... Migrating it to package.json
Discovered plugin "cordova-plugin-whitelist". Adding it to the project
Installing "cordova-plugin-whitelist" for android
Plugin doesn't support this project's cordova-android version. cordova-android: 15.1.0, failed version requirement: >=4.0.0 <10.0.0
Skipping 'cordova-plugin-whitelist' for android
Adding cordova-plugin-whitelist to package.json
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
No scripts found for hook "before_build".
No scripts found for hook "before_prepare".
Checking for saved platforms that haven't been added to the project
Loaded API for android project /app/platforms/android/cordova/Api.js
Checking for saved plugins that haven't been added to the project
Generating platform-specific config.xml from defaults for android at /app/platforms/android/app/src/main/res/xml/config.xml
Merging project's config.xml into platform-specific android config.xml
[Gradle Properties] Preparing Configuration
[Gradle Properties] Appending default configuration properties
[Gradle Properties] Updating Gradle property "android.enableJetifier" with the value of "true"
[Gradle Properties] Appending custom configuration properties
[Gradle Properties] Updating and Saving File
Found "merges/android" folder. Copying its contents into the android project.
Merging and updating files from [www, platforms/android/platform_www, merges/android] to platforms/android/app/src/main/assets/www
  copy  platforms/android/platform_www/cordova.js platforms/android/app/src/main/assets/www/cordova.js (updated file)
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
Wrote out android application name "Ionic-TypeScript-MDHA-Starter" to /app/platforms/android/app/src/main/res/values/cdv_strings.xml
The Android Splash Screen background color was set to: Default
The "AndroidWindowSplashScreenAnimatedIcon" is undefined. Cordova's default will be used.
The "AndroidWindowSplashScreenBrandingImage" is undefined. Cordova's default will be used.
Wrote out Android application SplashScreen Icon Color to /app/platforms/android/app/src/main/res/values/cdv_colors.xml
Wrote out Android application themes to /app/platforms/android/app/src/main/res/values/cdv_themes.xml
[Cordova Gradle Config] Setting "PACKAGE_NAMESPACE" to net.justincredible.sampleapp
[Cordova Gradle Config] Saving File
android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.1.0): 10100
Updating icons at platforms/android/app/src/main/res
This app does not have additional resource files defined
Prepared android project successfully
No scripts found for hook "after_prepare".
No scripts found for hook "before_compile".
Checking Java JDK and Android SDK versions
ANDROID_HOME=/opt/android (recommended setting)
ANDROID_SDK_ROOT=/opt/android (DEPRECATED)
Using Android SDK: /opt/android
Reading build config file: /app/build.json
Using Gradle: 8.14.2

Welcome to Gradle 8.5!

Here are the highlights of this release:
 - Support for running on Java 21
 - Faster first use with Kotlin DSL
 - Improved error and warning messages

For more details see https://docs.gradle.org/8.5/release-notes.html

> Task :wrapper

BUILD SUCCESSFUL in 10s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
Running Gradle Build: /app/platforms/android/tools/gradlew cdvBuildDebug
Downloading https://services.gradle.org/distributions/gradle-8.14.2-bin.zip
.............10%.............20%.............30%.............40%.............50%.............60%.............70%.............80%.............90%..............100%

Welcome to Gradle 8.14.2!

Here are the highlights of this release:
 - Java 24 support
 - GraalVM Native Image toolchain selection
 - Enhancements to test reporting
 - Build Authoring improvements

For more details see https://docs.gradle.org/8.14.2/release-notes.html

To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.14.2/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build 

[Incubating] Problems report is available at: file:///app/platforms/android/build/reports/problems/problems-report.html

FAILURE: Build failed with an exception.

* Where:
Build file '/app/platforms/android/app/build.gradle' line: 20

* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.application'.
   > Android Gradle plugin requires Java 17 to run. You are currently using Java 11.
      Your current JDK is located in /usr/lib/jvm/java-11-openjdk-amd64
      You can try some of the following options:
       - changing the IDE settings.
       - changing the JAVA_HOME environment variable.
       - changing `org.gradle.java.home` in `gradle.properties`.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

BUILD FAILED in 55s

For more on this, please refer to https://docs.gradle.org/8.14.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
Command failed with exit code 1: /app/platforms/android/tools/gradlew cdvBuildDebug
Error: Command failed with exit code 1: /app/platforms/android/tools/gradlew cdvBuildDebug
    at makeError (/app/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/app/node_modules/execa/index.js:118:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ProjectBuilder.build (/app/node_modules/cordova-android/lib/builders/ProjectBuilder.js:369:20)

> echo Build failed with Node 20 and JDK 11: Command '['docker', 'run', '--rm', '-v', '/home/ubuntu/storage/cordova_assets/extracted/Justin-Credible-Ionic-TypeScript-MDHA-Starter/Ionic-TypeScript-MDHA-Starter-7ee1d87e6806a16a053bf2a7fbae7587b05d6870:/source:ro', '-v', '/home/ubuntu/BachelorsThesis/scripts/cordova/output/Justin-Credible-Ionic-TypeScript-MDHA-Starter:/output', '-v', '/home/ubuntu/.npm:/root/.npm', 'cordova-android:20-jdk11', 'bash', '-c', 'set -e\n            cp -r /source/. /app\n            cd /app\n            rm -rf platforms plugins node_modules || true\n            rm -rf $GRADLE_USER_HOME || true\n            mkdir -p $GRADLE_USER_HOME\n\n            # unset Gradle options\n            unset JAVA_OPTS\n\n            # install deps\n            if [ -f yarn.lock ]; then\n                yarn install --ignore-scripts\n            else\n                npm install --ignore-scripts\n            fi\n\n            # ensure android platform\n            cordova platform add android\n            cordova prepare android\n\n            # ---- PATCH ROOT GRADLE FILES (CRITICAL FIX) ----\n            for f in platforms/android/build.gradle platforms/android/CordovaLib/build.gradle; do\n                if [ -f "$f" ]; then\n                    # add missing repositories to buildscript + allprojects\n                    sed -i \'/buildscript[[:space:]]*{/a\\\n                repositories {\\\n                    google()\\\n                    mavenCentral()\\\n                    maven { url "https://plugins.gradle.org/m2/" }\\\n                    maven { url "https://maven.aliyun.com/repository/public" }\\\n                    maven { url "https://jcenter.bintray.com/" }\\\n                    maven { url "https://jitpack.io" }\\\n                }\\\n            \' "$f" || true\n\n                    sed -i \'/allprojects[[:space:]]*{/a\\\n                repositories {\\\n                    google()\\\n                    mavenCentral()\\\n                    maven { url "https://plugins.gradle.org/m2/" }\\\n                    maven { url "https://maven.aliyun.com/repository/public" }\\\n                    maven { url "https://jcenter.bintray.com/" }\\\n                    maven { url "https://jitpack.io" }\\\n                }\\\n            \' "$f" || true\n                fi\n            done\n\n            # ---- FIX versioncompare (very common failure) ----\n            grep -RIl \'com.g00fy2:versioncompare:1.3.4\' platforms/android 2>/dev/null | \\\n            xargs -r sed -i \'s/com.g00fy2:versioncompare:1.3.4/io.github.g00fy2:versioncompare:1.5.0/g\' || true\n\n            # ---- fix versioncompare imports (CRITICAL) ----\n            find platforms/android \\( -name "*.gradle" -o -name "*.gradle.kts" \\) -print0 | \\\n            xargs -0 sed -i \'s/import com\\.g00fy2\\.versioncompare\\.Version/import io.github.g00fy2.versioncompare.Version/g\' || true\n\n            # ---- OPTIONAL: remove illegal JVM args ----\n            find platforms/android -type f -exec sed -i \'s/--illegal-access=permit//g\' {} + || true\n\n            # ---- JDK 8 specific patch (minimal, no overwrite!) ----\n            if [ \\"11\\" = "8" ]; then\n                # ensure older sdk usage (do NOT overwrite build.gradle anymore)\n                find platforms/android -name "build.gradle" -exec \\\n                    sed -i \'s/compileSdkVersion [0-9]\\+/compileSdkVersion 30/g\' {} \\; || true\n\n                find platforms/android -name "build.gradle" -exec \\\n                    sed -i \'s/targetSdkVersion [0-9]\\+/targetSdkVersion 30/g\' {} \\; || true\n            fi\n\n            # ---- android sdk path ----\n            echo "sdk.dir=$ANDROID_HOME" > platforms/android/local.properties\n\n            # ---- force APK output (suppress AAB generation) ----\n            echo "android.bundle.enableAll=false" >> platforms/android/gradle.properties\n\n            # ---- enable ABI splits ----\n            if grep -q \'splits\' platforms/android/app/build.gradle 2>/dev/null; then\n                sed -i \'s/enable false/enable true/\' platforms/android/app/build.gradle || true\n            else\n                sed -i \'/^android[[:space:]]*{/a\\    splits {\\n        abi {\\n            reset()\\n            enable true\\n            universalApk false\\n            include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"\\n        }\\n    }\' platforms/android/app/build.gradle || true\n            fi\n\n            # ---- build debug APK ----\n            cordova build android --debug --no-interactive --verbose\n\n            cp platforms/android/app/build/outputs/apk/debug/*.apk /output/\n\n            # ---- copy TPL metadata ----\n            [ -f config.xml ] && cp config.xml /output/ || true\n            [ -f plugins/fetch.json ] && cp plugins/fetch.json /output/ || true\n            [ -f plugins/android.json ] && cp plugins/android.json /output/ || true\n            [ -f platforms/android/app/build.gradle ] && cp platforms/android/app/build.gradle /output/app-build.gradle || true\n            [ -f platforms/android/build.gradle ] && cp platforms/android/build.gradle /output/root-build.gradle || true\n            [ -f platforms/android/settings.gradle ] && cp platforms/android/settings.gradle /output/ || true\n            [ -f package.json ] && cp package.json /output/ || true\n            [ -f package-lock.json ] && cp package-lock.json /output/ || true\n            [ -f yarn.lock ] && cp yarn.lock /output/ || true\n            [ -f pnpm-lock.yaml ] && cp pnpm-lock.yaml /output/ || true\n            mkdir -p /output/plugin_manifests\n            find plugins -name "plugin.xml" 2>/dev/null | while read f; do cp "$f" /output/plugin_manifests/$(echo "$f" | tr \'/\' \'_\') 2>/dev/null; done || true\n            find plugins -name "*.gradle" 2>/dev/null | while read f; do cp "$f" /output/ 2>/dev/null; done || true\n            find platforms/android -name "*.gradle" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/ 2>/dev/null; done || true\n            mkdir -p /output/libs\n            find plugins platforms/android -name "*.jar" -not -name "gradle-wrapper.jar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true\n            find plugins platforms/android -name "*.aar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true\n            find plugins platforms/android -name "*.so" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true\n            ']' returned non-zero exit status 1.
Build failed with Node 20 and JDK 11: Command '['docker', 'run', '--rm', '-v', '/home/ubuntu/storage/cordova_assets/extracted/Justin-Credible-Ionic-TypeScript-MDHA-Starter/Ionic-TypeScript-MDHA-Starter-7ee1d87e6806a16a053bf2a7fbae7587b05d6870:/source:ro', '-v', '/home/ubuntu/BachelorsThesis/scripts/cordova/output/Justin-Credible-Ionic-TypeScript-MDHA-Starter:/output', '-v', '/home/ubuntu/.npm:/root/.npm', 'cordova-android:20-jdk11', 'bash', '-c', 'set -e\n            cp -r /source/. /app\n            cd /app\n            rm -rf platforms plugins node_modules || true\n            rm -rf $GRADLE_USER_HOME || true\n            mkdir -p $GRADLE_USER_HOME\n\n            # unset Gradle options\n            unset JAVA_OPTS\n\n            # install deps\n            if [ -f yarn.lock ]; then\n                yarn install --ignore-scripts\n            else\n                npm install --ignore-scripts\n            fi\n\n            # ensure android platform\n            cordova platform add android\n            cordova prepare android\n\n            # ---- PATCH ROOT GRADLE FILES (CRITICAL FIX) ----\n            for f in platforms/android/build.gradle platforms/android/CordovaLib/build.gradle; do\n                if [ -f "$f" ]; then\n                    # add missing repositories to buildscript + allprojects\n                    sed -i \'/buildscript[[:space:]]*{/a\\\n                repositories {\\\n                    google()\\\n                    mavenCentral()\\\n                    maven { url "https://plugins.gradle.org/m2/" }\\\n                    maven { url "https://maven.aliyun.com/repository/public" }\\\n                    maven { url "https://jcenter.bintray.com/" }\\\n                    maven { url "https://jitpack.io" }\\\n                }\\\n            \' "$f" || true\n\n                    sed -i \'/allprojects[[:space:]]*{/a\\\n                repositories {\\\n                    google()\\\n                    mavenCentral()\\\n                    maven { url "https://plugins.gradle.org/m2/" }\\\n                    maven { url "https://maven.aliyun.com/repository/public" }\\\n                    maven { url "https://jcenter.bintray.com/" }\\\n                    maven { url "https://jitpack.io" }\\\n                }\\\n            \' "$f" || true\n                fi\n            done\n\n            # ---- FIX versioncompare (very common failure) ----\n            grep -RIl \'com.g00fy2:versioncompare:1.3.4\' platforms/android 2>/dev/null | \\\n            xargs -r sed -i \'s/com.g00fy2:versioncompare:1.3.4/io.github.g00fy2:versioncompare:1.5.0/g\' || true\n\n            # ---- fix versioncompare imports (CRITICAL) ----\n            find platforms/android \\( -name "*.gradle" -o -name "*.gradle.kts" \\) -print0 | \\\n            xargs -0 sed -i \'s/import com\\.g00fy2\\.versioncompare\\.Version/import io.github.g00fy2.versioncompare.Version/g\' || true\n\n            # ---- OPTIONAL: remove illegal JVM args ----\n            find platforms/android -type f -exec sed -i \'s/--illegal-access=permit//g\' {} + || true\n\n            # ---- JDK 8 specific patch (minimal, no overwrite!) ----\n            if [ \\"11\\" = "8" ]; then\n                # ensure older sdk usage (do NOT overwrite build.gradle anymore)\n                find platforms/android -name "build.gradle" -exec \\\n                    sed -i \'s/compileSdkVersion [0-9]\\+/compileSdkVersion 30/g\' {} \\; || true\n\n                find platforms/android -name "build.gradle" -exec \\\n                    sed -i \'s/targetSdkVersion [0-9]\\+/targetSdkVersion 30/g\' {} \\; || true\n            fi\n\n            # ---- android sdk path ----\n            echo "sdk.dir=$ANDROID_HOME" > platforms/android/local.properties\n\n            # ---- force APK output (suppress AAB generation) ----\n            echo "android.bundle.enableAll=false" >> platforms/android/gradle.properties\n\n            # ---- enable ABI splits ----\n            if grep -q \'splits\' platforms/android/app/build.gradle 2>/dev/null; then\n                sed -i \'s/enable false/enable true/\' platforms/android/app/build.gradle || true\n            else\n                sed -i \'/^android[[:space:]]*{/a\\    splits {\\n        abi {\\n            reset()\\n            enable true\\n            universalApk false\\n            include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"\\n        }\\n    }\' platforms/android/app/build.gradle || true\n            fi\n\n            # ---- build debug APK ----\n            cordova build android --debug --no-interactive --verbose\n\n            cp platforms/android/app/build/outputs/apk/debug/*.apk /output/\n\n            # ---- copy TPL metadata ----\n            [ -f config.xml ] && cp config.xml /output/ || true\n            [ -f plugins/fetch.json ] && cp plugins/fetch.json /output/ || true\n            [ -f plugins/android.json ] && cp plugins/android.json /output/ || true\n            [ -f platforms/android/app/build.gradle ] && cp platforms/android/app/build.gradle /output/app-build.gradle || true\n            [ -f platforms/android/build.gradle ] && cp platforms/android/build.gradle /output/root-build.gradle || true\n            [ -f platforms/android/settings.gradle ] && cp platforms/android/settings.gradle /output/ || true\n            [ -f package.json ] && cp package.json /output/ || true\n            [ -f package-lock.json ] && cp package-lock.json /output/ || true\n            [ -f yarn.lock ] && cp yarn.lock /output/ || true\n            [ -f pnpm-lock.yaml ] && cp pnpm-lock.yaml /output/ || true\n            mkdir -p /output/plugin_manifests\n            find plugins -name "plugin.xml" 2>/dev/null | while read f; do cp "$f" /output/plugin_manifests/$(echo "$f" | tr \'/\' \'_\') 2>/dev/null; done || true\n            find plugins -name "*.gradle" 2>/dev/null | while read f; do cp "$f" /output/ 2>/dev/null; done || true\n            find platforms/android -name "*.gradle" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/ 2>/dev/null; done || true\n            mkdir -p /output/libs\n            find plugins platforms/android -name "*.jar" -not -name "gradle-wrapper.jar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true\n            find plugins platforms/android -name "*.aar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true\n            find plugins platforms/android -name "*.so" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true\n            ']' returned non-zero exit status 1.

> echo Attempting build for Justin-Credible-Ionic-TypeScript-MDHA-Starter with Node 20 and JDK 17
Attempting build for Justin-Credible-Ionic-TypeScript-MDHA-Starter with Node 20 and JDK 17

> docker run --rm -v /home/ubuntu/storage/cordova_assets/extracted/Justin-Credible-Ionic-TypeScript-MDHA-Starter/Ionic-TypeScript-MDHA-Starter-7ee1d87e6806a16a053bf2a7fbae7587b05d6870:/source:ro -v /home/ubuntu/BachelorsThesis/scripts/cordova/output/Justin-Credible-Ionic-TypeScript-MDHA-Starter:/output -v /home/ubuntu/.npm:/root/.npm cordova-android:20-jdk17 bash -c set -e
            cp -r /source/. /app
            cd /app
            rm -rf platforms plugins node_modules || true
            rm -rf $GRADLE_USER_HOME || true
            mkdir -p $GRADLE_USER_HOME

            # unset Gradle options
            unset JAVA_OPTS

            # install deps
            if [ -f yarn.lock ]; then
                yarn install --ignore-scripts
            else
                npm install --ignore-scripts
            fi

            # ensure android platform
            cordova platform add android
            cordova prepare android

            # ---- PATCH ROOT GRADLE FILES (CRITICAL FIX) ----
            for f in platforms/android/build.gradle platforms/android/CordovaLib/build.gradle; do
                if [ -f "$f" ]; then
                    # add missing repositories to buildscript + allprojects
                    sed -i '/buildscript[[:space:]]*{/a\
                repositories {\
                    google()\
                    mavenCentral()\
                    maven { url "https://plugins.gradle.org/m2/" }\
                    maven { url "https://maven.aliyun.com/repository/public" }\
                    maven { url "https://jcenter.bintray.com/" }\
                    maven { url "https://jitpack.io" }\
                }\
            ' "$f" || true

                    sed -i '/allprojects[[:space:]]*{/a\
                repositories {\
                    google()\
                    mavenCentral()\
                    maven { url "https://plugins.gradle.org/m2/" }\
                    maven { url "https://maven.aliyun.com/repository/public" }\
                    maven { url "https://jcenter.bintray.com/" }\
                    maven { url "https://jitpack.io" }\
                }\
            ' "$f" || true
                fi
            done

            # ---- FIX versioncompare (very common failure) ----
            grep -RIl 'com.g00fy2:versioncompare:1.3.4' platforms/android 2>/dev/null | \
            xargs -r sed -i 's/com.g00fy2:versioncompare:1.3.4/io.github.g00fy2:versioncompare:1.5.0/g' || true

            # ---- fix versioncompare imports (CRITICAL) ----
            find platforms/android \( -name "*.gradle" -o -name "*.gradle.kts" \) -print0 | \
            xargs -0 sed -i 's/import com\.g00fy2\.versioncompare\.Version/import io.github.g00fy2.versioncompare.Version/g' || true

            # ---- OPTIONAL: remove illegal JVM args ----
            find platforms/android -type f -exec sed -i 's/--illegal-access=permit//g' {} + || true

            # ---- JDK 8 specific patch (minimal, no overwrite!) ----
            if [ \"17\" = "8" ]; then
                # ensure older sdk usage (do NOT overwrite build.gradle anymore)
                find platforms/android -name "build.gradle" -exec \
                    sed -i 's/compileSdkVersion [0-9]\+/compileSdkVersion 30/g' {} \; || true

                find platforms/android -name "build.gradle" -exec \
                    sed -i 's/targetSdkVersion [0-9]\+/targetSdkVersion 30/g' {} \; || true
            fi

            # ---- android sdk path ----
            echo "sdk.dir=$ANDROID_HOME" > platforms/android/local.properties

            # ---- force APK output (suppress AAB generation) ----
            echo "android.bundle.enableAll=false" >> platforms/android/gradle.properties

            # ---- enable ABI splits ----
            if grep -q 'splits' platforms/android/app/build.gradle 2>/dev/null; then
                sed -i 's/enable false/enable true/' platforms/android/app/build.gradle || true
            else
                sed -i '/^android[[:space:]]*{/a\    splits {\n        abi {\n            reset()\n            enable true\n            universalApk false\n            include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"\n        }\n    }' platforms/android/app/build.gradle || true
            fi

            # ---- build debug APK ----
            cordova build android --debug --no-interactive --verbose

            cp platforms/android/app/build/outputs/apk/debug/*.apk /output/

            # ---- copy TPL metadata ----
            [ -f config.xml ] && cp config.xml /output/ || true
            [ -f plugins/fetch.json ] && cp plugins/fetch.json /output/ || true
            [ -f plugins/android.json ] && cp plugins/android.json /output/ || true
            [ -f platforms/android/app/build.gradle ] && cp platforms/android/app/build.gradle /output/app-build.gradle || true
            [ -f platforms/android/build.gradle ] && cp platforms/android/build.gradle /output/root-build.gradle || true
            [ -f platforms/android/settings.gradle ] && cp platforms/android/settings.gradle /output/ || true
            [ -f package.json ] && cp package.json /output/ || true
            [ -f package-lock.json ] && cp package-lock.json /output/ || true
            [ -f yarn.lock ] && cp yarn.lock /output/ || true
            [ -f pnpm-lock.yaml ] && cp pnpm-lock.yaml /output/ || true
            mkdir -p /output/plugin_manifests
            find plugins -name "plugin.xml" 2>/dev/null | while read f; do cp "$f" /output/plugin_manifests/$(echo "$f" | tr '/' '_') 2>/dev/null; done || true
            find plugins -name "*.gradle" 2>/dev/null | while read f; do cp "$f" /output/ 2>/dev/null; done || true
            find platforms/android -name "*.gradle" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/ 2>/dev/null; done || true
            mkdir -p /output/libs
            find plugins platforms/android -name "*.jar" -not -name "gradle-wrapper.jar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true
            find plugins platforms/android -name "*.aar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true
            find plugins platforms/android -name "*.so" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/libs/ 2>/dev/null; done || true
            
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: 'karma@0.13.19',
npm warn EBADENGINE   required: { node: '0.10 || 0.12 || 4 || 5' },
npm warn EBADENGINE   current: { node: 'v20.20.2', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: 'joi-assert@0.0.3',
npm warn EBADENGINE   required: { node: '>= 0.10.0 <= 0.11.0' },
npm warn EBADENGINE   current: { node: 'v20.20.2', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn deprecated bower@1.6.3: This Bower version has SECURITY BUG THAT ALLOWS TO WRITE TO ARBITRARY FILE ON YOUR COMPUTER when you install malicious package. Please upgrade Bower to at least version 1.8.8 if you don't want to get hacked. More info: https://snyk.io/blog/severe-security-vulnerability-in-bowers-zip-archive-extraction/
npm warn deprecated ionic@1.7.12: The Ionic CLI now uses ✨ @ionic/cli ✨ for its package name! 👉 https://twitter.com/ionicframework/status/1223268498362851330
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.
npm warn deprecated fstream-ignore@1.0.5: This package is no longer supported.
npm warn deprecated osenv@0.1.5: This package is no longer supported.
npm warn deprecated gulp-angular-templatecache@1.8.0: The original owners are no longer maintaining this package. It is usable in its current state but will not be updated. The package will be transferred responsibly to npm.
npm warn deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm warn deprecated uid-number@0.0.5: This package is no longer supported.
npm warn deprecated read-package-json@2.1.2: This package is no longer supported. Please use @npmcli/package-json instead.
npm warn deprecated lodash.template@3.6.2: This package is deprecated. Use https://socket.dev/npm/package/eta instead.
npm warn deprecated gulp-header@1.8.12: Removed event-stream from gulp-header
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm warn deprecated npmlog@4.1.2: This package is no longer supported.
npm warn deprecated osenv@0.0.3: This package is no longer supported.
npm warn deprecated har-validator@5.1.5: this library is no longer supported
npm warn deprecated lodash.template@4.18.1: This package is deprecated. Use https://socket.dev/npm/package/eta instead.
npm warn deprecated osenv@0.1.0: This package is no longer supported.
npm warn deprecated cryptiles@2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated gulp-footer@1.1.2: Security vulnerability surrounding event-stream, do *NOT* use.
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm warn deprecated are-we-there-yet@1.1.7: This package is no longer supported.
npm warn deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm warn deprecated ini@1.1.0: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm warn deprecated topo@1.1.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated json3@3.3.2: Please use the native JSON object instead of JSON 3
npm warn deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated rimraf@2.2.8: Rimraf versions prior to v4 are no longer supported
npm warn deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm warn deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm warn deprecated glob@4.5.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@5.0.15: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@4.5.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@4.3.5: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@4.5.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated glob@6.0.4: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@5.0.15: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated rimraf@2.2.8: Rimraf versions prior to v4 are no longer supported
npm warn deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm warn deprecated rimraf@2.2.8: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.1.7: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated karma-phantomjs-launcher@0.2.1: PhantomJS development have stopped, use puppeteer or similar
npm warn deprecated xmldom@0.1.19: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm warn deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm warn deprecated dep-graph@1.1.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated gulp-util@3.0.6: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm warn deprecated q@1.0.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm warn deprecated q@0.9.7: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm warn deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated node-uuid@1.3.3: Use uuid module instead
npm warn deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm warn deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated rcloader@0.1.4: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated mkdirp@0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm warn deprecated uuid@2.0.3: uuid@10 and below is no longer supported.  For ESM codebases, update to uuid@latest.  For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).
npm warn deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm warn deprecated uuid@3.4.0: uuid@10 and below is no longer supported.  For ESM codebases, update to uuid@latest.  For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).
npm warn deprecated gauge@2.7.4: This package is no longer supported.
npm warn deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated node-uuid@1.4.8: Use uuid module instead
npm warn deprecated glob@3.1.21: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated mkdirp@0.5.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm warn deprecated har-validator@2.0.6: this library is no longer supported
npm warn deprecated request@2.47.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated request@2.42.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated request@2.42.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated fstream@1.0.12: This package is no longer supported.
npm warn deprecated request@2.51.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated glob@3.2.11: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated tough-cookie@0.12.1: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm warn deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated npmconf@2.1.3: this package has been reintegrated into npm and is now out of date with respect to npm
npm warn deprecated npmconf@2.1.1: this package has been reintegrated into npm and is now out of date with respect to npm
npm warn deprecated request@2.65.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated tar@1.0.2: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated glob@4.0.6: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@4.0.6: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated joi@4.9.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated log4js@0.6.38: 0.x is no longer supported. Please upgrade to 6.x or higher.
npm warn deprecated tsd@0.6.5: TSD is deprecated in favor of Typings (https://github.com/typings/typings) - see https://github.com/DefinitelyTyped/tsd/issues/269 for more information
npm warn deprecated tar@2.2.2: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated bower@1.3.12: This Bower version has SECURITY BUG THAT ALLOWS TO WRITE TO ARBITRARY FILE ON YOUR COMPUTER when you install malicious package. Please upgrade Bower to at least version 1.8.8 if you don't want to get hacked. More info: https://snyk.io/blog/severe-security-vulnerability-in-bowers-zip-archive-extraction/
npm warn deprecated highlight.js@8.9.1: Version no longer supported. Upgrade to @latest
npm warn deprecated node-sass@3.13.1: Node Sass is no longer supported. Please use `sass` or `sass-embedded` instead.
npm warn deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

added 1405 packages, and audited 3364 packages in 1m

52 packages are looking for funding
  run `npm fund` for details

184 vulnerabilities (5 low, 34 moderate, 106 high, 39 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
Using cordova-fetch for cordova-android
Adding android project...
Creating Cordova project for the Android platform:
	Path: platforms/android
	Package: net.justincredible.sampleapp
	Name: Ionic-TypeScript-MDHA-Starter
	Activity: MainActivity
	Android Target SDK: android-36
	Android Compile SDK: 36
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@15.1.0
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
Plugin 'cordova-plugin-whitelist' found in config.xml... Migrating it to package.json
Discovered plugin "cordova-plugin-whitelist". Adding it to the project
Installing "cordova-plugin-whitelist" for android
Plugin doesn't support this project's cordova-android version. cordova-android: 15.1.0, failed version requirement: >=4.0.0 <10.0.0
Skipping 'cordova-plugin-whitelist' for android
Adding cordova-plugin-whitelist to package.json
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
No scripts found for hook "before_build".
No scripts found for hook "before_prepare".
Checking for saved platforms that haven't been added to the project
Loaded API for android project /app/platforms/android/cordova/Api.js
Checking for saved plugins that haven't been added to the project
Generating platform-specific config.xml from defaults for android at /app/platforms/android/app/src/main/res/xml/config.xml
Merging project's config.xml into platform-specific android config.xml
[Gradle Properties] Preparing Configuration
[Gradle Properties] Appending default configuration properties
[Gradle Properties] Updating Gradle property "android.enableJetifier" with the value of "true"
[Gradle Properties] Appending custom configuration properties
[Gradle Properties] Updating and Saving File
Found "merges/android" folder. Copying its contents into the android project.
Merging and updating files from [www, platforms/android/platform_www, merges/android] to platforms/android/app/src/main/assets/www
  copy  platforms/android/platform_www/cordova.js platforms/android/app/src/main/assets/www/cordova.js (updated file)
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
Wrote out android application name "Ionic-TypeScript-MDHA-Starter" to /app/platforms/android/app/src/main/res/values/cdv_strings.xml
The Android Splash Screen background color was set to: Default
The "AndroidWindowSplashScreenAnimatedIcon" is undefined. Cordova's default will be used.
The "AndroidWindowSplashScreenBrandingImage" is undefined. Cordova's default will be used.
Wrote out Android application SplashScreen Icon Color to /app/platforms/android/app/src/main/res/values/cdv_colors.xml
Wrote out Android application themes to /app/platforms/android/app/src/main/res/values/cdv_themes.xml
[Cordova Gradle Config] Setting "PACKAGE_NAMESPACE" to net.justincredible.sampleapp
[Cordova Gradle Config] Saving File
android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.1.0): 10100
Updating icons at platforms/android/app/src/main/res
This app does not have additional resource files defined
Prepared android project successfully
No scripts found for hook "after_prepare".
No scripts found for hook "before_compile".
Checking Java JDK and Android SDK versions
ANDROID_HOME=/opt/android (recommended setting)
ANDROID_SDK_ROOT=/opt/android (DEPRECATED)
Using Android SDK: /opt/android
Reading build config file: /app/build.json
Using Gradle: 8.14.2

Welcome to Gradle 8.5!

Here are the highlights of this release:
 - Support for running on Java 21
 - Faster first use with Kotlin DSL
 - Improved error and warning messages

For more details see https://docs.gradle.org/8.5/release-notes.html

> Task :wrapper

BUILD SUCCESSFUL in 9s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
Running Gradle Build: /app/platforms/android/tools/gradlew cdvBuildDebug
Downloading https://services.gradle.org/distributions/gradle-8.14.2-bin.zip
.............10%.............20%.............30%.............40%.............50%.............60%.............70%.............80%.............90%..............100%

Welcome to Gradle 8.14.2!

Here are the highlights of this release:
 - Java 24 support
 - GraalVM Native Image toolchain selection
 - Enhancements to test reporting
 - Build Authoring improvements

For more details see https://docs.gradle.org/8.14.2/release-notes.html

To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.14.2/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build 
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
> Task :app:generateDebugBuildConfig
> Task :CordovaLib:preBuild UP-TO-DATE
> Task :CordovaLib:preDebugBuild UP-TO-DATE
> Task :app:javaPreCompileDebug
> Task :CordovaLib:writeDebugAarMetadata
> Task :app:generateDebugResValues
> Task :CordovaLib:generateDebugResValues
> Task :CordovaLib:generateDebugResources
> Task :app:checkDebugAarMetadata
> Task :CordovaLib:packageDebugResources
> Task :app:mapDebugSourceSetPaths
> Task :app:generateDebugResources
> Task :app:packageDebugResources
> Task :app:mergeDebugResources
> Task :app:createDebugCompatibleScreenManifests
> Task :app:extractDeepLinksDebug
> Task :CordovaLib:extractDeepLinksDebug
> Task :app:parseDebugLocalResources
> Task :CordovaLib:processDebugManifest
> Task :CordovaLib:compileDebugLibraryResources
> Task :app:processDebugMainManifest
> Task :app:processDebugManifest
> Task :CordovaLib:javaPreCompileDebug
> Task :CordovaLib:parseDebugLocalResources
> Task :app:mergeDebugShaders
> Task :app:compileDebugShaders NO-SOURCE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :CordovaLib:mergeDebugShaders
> Task :CordovaLib:compileDebugShaders NO-SOURCE
> Task :CordovaLib:generateDebugAssets UP-TO-DATE
> Task :CordovaLib:mergeDebugAssets
> Task :CordovaLib:generateDebugRFile
> Task :app:mergeDebugAssets

> Task :CordovaLib:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :app:processDebugJavaRes NO-SOURCE
> Task :CordovaLib:bundleLibCompileToJarDebug
> Task :app:compressDebugAssets
> Task :CordovaLib:processDebugJavaRes
> Task :app:desugarDebugFileDependencies
> Task :app:checkDebugDuplicateClasses
> Task :app:mergeDebugJniLibFolders
> Task :CordovaLib:bundleLibRuntimeToDirDebug
> Task :app:mergeDebugJavaResource
> Task :app:processDebugManifestForPackage
> Task :CordovaLib:mergeDebugJniLibFolders
> Task :CordovaLib:mergeDebugNativeLibs NO-SOURCE
> Task :CordovaLib:copyDebugJniLibsProjectOnly
> Task :app:mergeLibDexDebug
> Task :app:validateSigningDebug
> Task :app:mergeDebugNativeLibs NO-SOURCE
> Task :app:stripDebugDebugSymbols NO-SOURCE
> Task :app:writeDebugAppMetadata
> Task :app:writeDebugSigningConfigVersions
> Task :app:mergeExtDexDebug
> Task :app:processDebugResources
> Task :app:compileDebugJavaWithJavac
> Task :app:dexBuilderDebug
> Task :app:mergeProjectDexDebug
> Task :app:packageDebug
> Task :app:createDebugApkListingFileRedirect
> Task :app:assembleDebug
> Task :app:cdvBuildDebug

[Incubating] Problems report is available at: file:///app/platforms/android/build/reports/problems/problems-report.html

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.14.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 1m 59s
50 actionable tasks: 50 executed
Built the following apk(s): 
	/app/platforms/android/app/build/outputs/apk/debug/app-x86-debug.apk
	/app/platforms/android/app/build/outputs/apk/debug/app-x86_64-debug.apk
	/app/platforms/android/app/build/outputs/apk/debug/app-arm64-v8a-debug.apk
	/app/platforms/android/app/build/outputs/apk/debug/app-armeabi-v7a-debug.apk
No scripts found for hook "after_compile".
No scripts found for hook "after_build".

> docker run --rm -v /home/ubuntu/storage/cordova_assets/extracted/Justin-Credible-Ionic-TypeScript-MDHA-Starter/Ionic-TypeScript-MDHA-Starter-7ee1d87e6806a16a053bf2a7fbae7587b05d6870:/source:ro -v /home/ubuntu/BachelorsThesis/scripts/cordova/output/Justin-Credible-Ionic-TypeScript-MDHA-Starter:/output -v /home/ubuntu/.npm:/root/.npm cordova-android:20-jdk17 bash -c set -e
            cp -r /source/. /app
            cd /app
            rm -rf platforms plugins node_modules || true
            rm -rf $GRADLE_USER_HOME || true
            mkdir -p $GRADLE_USER_HOME

            # unset Gradle options
            unset JAVA_OPTS

            # install deps
            if [ -f yarn.lock ]; then
                yarn install --ignore-scripts
            else
                npm install --ignore-scripts
            fi

            # ensure android platform
            cordova platform add android
            cordova prepare android

            # ---- PATCH ROOT GRADLE FILES (CRITICAL FIX) ----
            for f in platforms/android/build.gradle platforms/android/CordovaLib/build.gradle; do
                if [ -f "$f" ]; then
                    sed -i '/buildscript[[:space:]]*{/a\
                repositories {\
                    google()\
                    mavenCentral()\
                    maven { url "https://plugins.gradle.org/m2/" }\
                    maven { url "https://maven.aliyun.com/repository/public" }\
                    maven { url "https://jcenter.bintray.com/" }\
                    maven { url "https://jitpack.io" }\
                }\
            ' "$f" || true

                    sed -i '/allprojects[[:space:]]*{/a\
                repositories {\
                    google()\
                    mavenCentral()\
                    maven { url "https://plugins.gradle.org/m2/" }\
                    maven { url "https://maven.aliyun.com/repository/public" }\
                    maven { url "https://jcenter.bintray.com/" }\
                    maven { url "https://jitpack.io" }\
                }\
            ' "$f" || true
                fi
            done

            # ---- FIX versioncompare (very common failure) ----
            grep -RIl 'com.g00fy2:versioncompare:1.3.4' platforms/android 2>/dev/null | \
            xargs -r sed -i 's/com.g00fy2:versioncompare:1.3.4/io.github.g00fy2:versioncompare:1.5.0/g' || true

            # ---- fix versioncompare imports (CRITICAL) ----
            find platforms/android \( -name "*.gradle" -o -name "*.gradle.kts" \) -print0 | \
            xargs -0 sed -i 's/import com\.g00fy2\.versioncompare\.Version/import io.github.g00fy2.versioncompare.Version/g' || true

            # ---- OPTIONAL: remove illegal JVM args ----
            find platforms/android -type f -exec sed -i 's/--illegal-access=permit//g' {} + || true

            # ---- JDK 8 specific patch ----
            if [ \"17\" = "8" ]; then
                find platforms/android -name "build.gradle" -exec \
                    sed -i 's/compileSdkVersion [0-9]\+/compileSdkVersion 30/g' {} \; || true

                find platforms/android -name "build.gradle" -exec \
                    sed -i 's/targetSdkVersion [0-9]\+/targetSdkVersion 30/g' {} \; || true
            fi

            # ---- android sdk path ----
            echo "sdk.dir=$ANDROID_HOME" > platforms/android/local.properties

            # ---- force APK output (suppress AAB generation) ----
            echo "android.bundle.enableAll=false" >> platforms/android/gradle.properties

            # ---- enable ABI splits ----
            if grep -q 'splits' platforms/android/app/build.gradle 2>/dev/null; then
                sed -i 's/enable false/enable true/' platforms/android/app/build.gradle || true
            else
                sed -i '/^android[[:space:]]*{/a\    splits {\n        abi {\n            reset()\n            enable true\n            universalApk false\n            include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"\n        }\n    }' platforms/android/app/build.gradle || true
            fi

            # ---- enable R8 / minification ----
            sed -i 's/minifyEnabled false/minifyEnabled true/' platforms/android/app/build.gradle || true

            # ---- sign release with debug key ----
            sed -i '/buildTypes/,/}/s/release {/release {\n            signingConfig signingConfigs.debug/' platforms/android/app/build.gradle || true

            # ---- build release APK ----
            cordova build android --release --no-interactive --verbose

            cp platforms/android/app/build/outputs/apk/release/*.apk /output/r8/

            # ---- copy TPL metadata ----
            [ -f config.xml ] && cp config.xml /output/r8/ || true
            [ -f plugins/fetch.json ] && cp plugins/fetch.json /output/r8/ || true
            [ -f plugins/android.json ] && cp plugins/android.json /output/r8/ || true
            [ -f platforms/android/app/build.gradle ] && cp platforms/android/app/build.gradle /output/r8/app-build.gradle || true
            [ -f platforms/android/build.gradle ] && cp platforms/android/build.gradle /output/r8/root-build.gradle || true
            [ -f platforms/android/settings.gradle ] && cp platforms/android/settings.gradle /output/r8/ || true
            [ -f package.json ] && cp package.json /output/r8/ || true
            [ -f package-lock.json ] && cp package-lock.json /output/r8/ || true
            [ -f yarn.lock ] && cp yarn.lock /output/r8/ || true
            [ -f pnpm-lock.yaml ] && cp pnpm-lock.yaml /output/r8/ || true
            mkdir -p /output/r8/plugin_manifests
            find plugins -name "plugin.xml" 2>/dev/null | while read f; do cp "$f" /output/r8/plugin_manifests/$(echo "$f" | tr '/' '_') 2>/dev/null; done || true
            find plugins -name "*.gradle" 2>/dev/null | while read f; do cp "$f" /output/r8/ 2>/dev/null; done || true
            find platforms/android -name "*.gradle" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/r8/ 2>/dev/null; done || true
            mkdir -p /output/r8/libs
            find plugins platforms/android -name "*.jar" -not -name "gradle-wrapper.jar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/r8/libs/ 2>/dev/null; done || true
            find plugins platforms/android -name "*.aar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/r8/libs/ 2>/dev/null; done || true
            find plugins platforms/android -name "*.so" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/r8/libs/ 2>/dev/null; done || true
            
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: 'karma@0.13.19',
npm warn EBADENGINE   required: { node: '0.10 || 0.12 || 4 || 5' },
npm warn EBADENGINE   current: { node: 'v20.20.2', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: 'joi-assert@0.0.3',
npm warn EBADENGINE   required: { node: '>= 0.10.0 <= 0.11.0' },
npm warn EBADENGINE   current: { node: 'v20.20.2', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn deprecated bower@1.6.3: This Bower version has SECURITY BUG THAT ALLOWS TO WRITE TO ARBITRARY FILE ON YOUR COMPUTER when you install malicious package. Please upgrade Bower to at least version 1.8.8 if you don't want to get hacked. More info: https://snyk.io/blog/severe-security-vulnerability-in-bowers-zip-archive-extraction/
npm warn deprecated ionic@1.7.12: The Ionic CLI now uses ✨ @ionic/cli ✨ for its package name! 👉 https://twitter.com/ionicframework/status/1223268498362851330
npm warn deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated fstream-ignore@1.0.5: This package is no longer supported.
npm warn deprecated osenv@0.1.5: This package is no longer supported.
npm warn deprecated gulp-angular-templatecache@1.8.0: The original owners are no longer maintaining this package. It is usable in its current state but will not be updated. The package will be transferred responsibly to npm.
npm warn deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm warn deprecated uid-number@0.0.5: This package is no longer supported.
npm warn deprecated read-package-json@2.1.2: This package is no longer supported. Please use @npmcli/package-json instead.
npm warn deprecated lodash.template@3.6.2: This package is deprecated. Use https://socket.dev/npm/package/eta instead.
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated gulp-header@1.8.12: Removed event-stream from gulp-header
npm warn deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm warn deprecated npmlog@4.1.2: This package is no longer supported.
npm warn deprecated osenv@0.0.3: This package is no longer supported.
npm warn deprecated har-validator@5.1.5: this library is no longer supported
npm warn deprecated lodash.template@4.18.1: This package is deprecated. Use https://socket.dev/npm/package/eta instead.
npm warn deprecated osenv@0.1.0: This package is no longer supported.
npm warn deprecated cryptiles@2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated gulp-footer@1.1.2: Security vulnerability surrounding event-stream, do *NOT* use.
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm warn deprecated are-we-there-yet@1.1.7: This package is no longer supported.
npm warn deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm warn deprecated ini@1.1.0: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm warn deprecated topo@1.1.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated json3@3.3.2: Please use the native JSON object instead of JSON 3
npm warn deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm warn deprecated rimraf@2.2.8: Rimraf versions prior to v4 are no longer supported
npm warn deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm warn deprecated glob@4.5.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@5.0.15: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@4.5.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated glob@4.5.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@4.3.5: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated rimraf@2.2.8: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@6.0.4: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@5.0.15: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated rimraf@2.2.8: Rimraf versions prior to v4 are no longer supported
npm warn deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm warn deprecated glob@7.1.7: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated karma-phantomjs-launcher@0.2.1: PhantomJS development have stopped, use puppeteer or similar
npm warn deprecated xmldom@0.1.19: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm warn deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm warn deprecated q@1.0.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm warn deprecated dep-graph@1.1.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated q@0.9.7: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm warn deprecated gulp-util@3.0.6: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm warn deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated node-uuid@1.3.3: Use uuid module instead
npm warn deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm warn deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated rcloader@0.1.4: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated mkdirp@0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm warn deprecated uuid@2.0.3: uuid@10 and below is no longer supported.  For ESM codebases, update to uuid@latest.  For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).
npm warn deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm warn deprecated uuid@3.4.0: uuid@10 and below is no longer supported.  For ESM codebases, update to uuid@latest.  For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).
npm warn deprecated gauge@2.7.4: This package is no longer supported.
npm warn deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated node-uuid@1.4.8: Use uuid module instead
npm warn deprecated glob@3.1.21: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated mkdirp@0.5.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm warn deprecated har-validator@2.0.6: this library is no longer supported
npm warn deprecated request@2.47.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated request@2.42.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated request@2.42.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated fstream@1.0.12: This package is no longer supported.
npm warn deprecated request@2.51.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated glob@3.2.11: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated tough-cookie@0.12.1: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm warn deprecated npmconf@2.1.3: this package has been reintegrated into npm and is now out of date with respect to npm
npm warn deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated npmconf@2.1.1: this package has been reintegrated into npm and is now out of date with respect to npm
npm warn deprecated request@2.65.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated tar@1.0.2: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated hawk@1.1.1: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm warn deprecated glob@4.0.6: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@4.0.6: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated joi@4.9.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm warn deprecated log4js@0.6.38: 0.x is no longer supported. Please upgrade to 6.x or higher.
npm warn deprecated tsd@0.6.5: TSD is deprecated in favor of Typings (https://github.com/typings/typings) - see https://github.com/DefinitelyTyped/tsd/issues/269 for more information
npm warn deprecated tar@2.2.2: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated bower@1.3.12: This Bower version has SECURITY BUG THAT ALLOWS TO WRITE TO ARBITRARY FILE ON YOUR COMPUTER when you install malicious package. Please upgrade Bower to at least version 1.8.8 if you don't want to get hacked. More info: https://snyk.io/blog/severe-security-vulnerability-in-bowers-zip-archive-extraction/
npm warn deprecated highlight.js@8.9.1: Version no longer supported. Upgrade to @latest
npm warn deprecated node-sass@3.13.1: Node Sass is no longer supported. Please use `sass` or `sass-embedded` instead.
npm warn deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

added 1405 packages, and audited 3364 packages in 1m

52 packages are looking for funding
  run `npm fund` for details

184 vulnerabilities (5 low, 34 moderate, 106 high, 39 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
Using cordova-fetch for cordova-android
Adding android project...
Creating Cordova project for the Android platform:
	Path: platforms/android
	Package: net.justincredible.sampleapp
	Name: Ionic-TypeScript-MDHA-Starter
	Activity: MainActivity
	Android Target SDK: android-36
	Android Compile SDK: 36
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@15.1.0
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
Plugin 'cordova-plugin-whitelist' found in config.xml... Migrating it to package.json
Discovered plugin "cordova-plugin-whitelist". Adding it to the project
Installing "cordova-plugin-whitelist" for android
Plugin doesn't support this project's cordova-android version. cordova-android: 15.1.0, failed version requirement: >=4.0.0 <10.0.0
Skipping 'cordova-plugin-whitelist' for android
Adding cordova-plugin-whitelist to package.json
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
No scripts found for hook "before_build".
No scripts found for hook "before_prepare".
Checking for saved platforms that haven't been added to the project
Loaded API for android project /app/platforms/android/cordova/Api.js
Checking for saved plugins that haven't been added to the project
Generating platform-specific config.xml from defaults for android at /app/platforms/android/app/src/main/res/xml/config.xml
Merging project's config.xml into platform-specific android config.xml
[Gradle Properties] Preparing Configuration
[Gradle Properties] Appending default configuration properties
[Gradle Properties] Updating Gradle property "android.enableJetifier" with the value of "true"
[Gradle Properties] Appending custom configuration properties
[Gradle Properties] Updating and Saving File
Found "merges/android" folder. Copying its contents into the android project.
Merging and updating files from [www, platforms/android/platform_www, merges/android] to platforms/android/app/src/main/assets/www
  copy  platforms/android/platform_www/cordova.js platforms/android/app/src/main/assets/www/cordova.js (updated file)
The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
Wrote out android application name "Ionic-TypeScript-MDHA-Starter" to /app/platforms/android/app/src/main/res/values/cdv_strings.xml
The Android Splash Screen background color was set to: Default
The "AndroidWindowSplashScreenAnimatedIcon" is undefined. Cordova's default will be used.
The "AndroidWindowSplashScreenBrandingImage" is undefined. Cordova's default will be used.
Wrote out Android application SplashScreen Icon Color to /app/platforms/android/app/src/main/res/values/cdv_colors.xml
Wrote out Android application themes to /app/platforms/android/app/src/main/res/values/cdv_themes.xml
[Cordova Gradle Config] Setting "PACKAGE_NAMESPACE" to net.justincredible.sampleapp
[Cordova Gradle Config] Saving File
android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.1.0): 10100
Updating icons at platforms/android/app/src/main/res
This app does not have additional resource files defined
Prepared android project successfully
No scripts found for hook "after_prepare".
No scripts found for hook "before_compile".
Checking Java JDK and Android SDK versions
ANDROID_HOME=/opt/android (recommended setting)
ANDROID_SDK_ROOT=/opt/android (DEPRECATED)
Using Android SDK: /opt/android
Reading build config file: /app/build.json
'keystore' and 'alias' need to be specified to generate a signed archive.
Using Gradle: 8.14.2

Welcome to Gradle 8.5!

Here are the highlights of this release:
 - Support for running on Java 21
 - Faster first use with Kotlin DSL
 - Improved error and warning messages

For more details see https://docs.gradle.org/8.5/release-notes.html

> Task :wrapper

BUILD SUCCESSFUL in 9s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
Running Gradle Build: /app/platforms/android/tools/gradlew :app:bundleRelease
Downloading https://services.gradle.org/distributions/gradle-8.14.2-bin.zip
.............10%.............20%.............30%.............40%.............50%.............60%.............70%.............80%.............90%..............100%

Welcome to Gradle 8.14.2!

Here are the highlights of this release:
 - Java 24 support
 - GraalVM Native Image toolchain selection
 - Enhancements to test reporting
 - Build Authoring improvements

For more details see https://docs.gradle.org/8.14.2/release-notes.html

To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.14.2/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build 
> Task :app:preBuild UP-TO-DATE
> Task :app:preReleaseBuild UP-TO-DATE
> Task :app:generateReleaseResValues
> Task :CordovaLib:preBuild UP-TO-DATE
> Task :CordovaLib:preReleaseBuild UP-TO-DATE
> Task :CordovaLib:generateReleaseResValues
> Task :CordovaLib:generateReleaseResources
> Task :CordovaLib:packageReleaseResources
> Task :app:mapReleaseSourceSetPaths
> Task :app:generateReleaseResources
> Task :app:createReleaseCompatibleScreenManifests
> Task :app:extractDeepLinksRelease
> Task :CordovaLib:extractDeepLinksRelease
> Task :CordovaLib:writeReleaseAarMetadata
> Task :app:packageReleaseResources
> Task :CordovaLib:processReleaseManifest
> Task :app:mergeReleaseResources
> Task :app:checkReleaseAarMetadata
> Task :app:processReleaseMainManifest
> Task :app:processReleaseManifest
> Task :app:processApplicationManifestReleaseForBundle
> Task :CordovaLib:compileReleaseLibraryResources
> Task :CordovaLib:parseReleaseLocalResources
> Task :app:parseReleaseLocalResources
> Task :app:extractReleaseVersionControlInfo
> Task :CordovaLib:javaPreCompileRelease
> Task :CordovaLib:generateReleaseRFile
> Task :app:checkReleaseDuplicateClasses

> Task :CordovaLib:compileReleaseJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :app:generateReleaseBuildConfig
> Task :app:javaPreCompileRelease
> Task :app:processReleaseManifestForPackage
> Task :CordovaLib:bundleLibRuntimeToDirRelease
> Task :app:desugarReleaseFileDependencies
> Task :app:mergeReleaseStartupProfile
> Task :CordovaLib:bundleLibCompileToJarRelease
> Task :app:processReleaseResources
> Task :app:bundleReleaseResources
> Task :app:compileReleaseJavaWithJavac
> Task :app:dexBuilderRelease
> Task :app:mergeReleaseShaders
> Task :app:compileReleaseShaders NO-SOURCE
> Task :app:generateReleaseAssets UP-TO-DATE
> Task :CordovaLib:mergeReleaseShaders
> Task :CordovaLib:compileReleaseShaders NO-SOURCE
> Task :CordovaLib:generateReleaseAssets UP-TO-DATE
> Task :CordovaLib:mergeReleaseAssets
> Task :app:mergeReleaseAssets
> Task :app:processReleaseJavaRes NO-SOURCE
> Task :CordovaLib:bundleLibRuntimeToJarRelease
> Task :CordovaLib:processReleaseJavaRes
> Task :app:mergeReleaseJniLibFolders
> Task :CordovaLib:mergeReleaseJniLibFolders
> Task :CordovaLib:mergeReleaseNativeLibs NO-SOURCE
> Task :CordovaLib:copyReleaseJniLibsProjectOnly
> Task :app:writeReleaseAppMetadata
> Task :app:mergeReleaseNativeLibs NO-SOURCE
> Task :app:stripReleaseDebugSymbols NO-SOURCE
> Task :CordovaLib:prepareReleaseArtProfile
> Task :app:mergeReleaseArtProfile
> Task :app:mergeExtDexRelease
> Task :app:mergeReleaseGlobalSynthetics
> Task :app:collectReleaseDependencies
> Task :app:configureReleaseDependencies
> Task :app:extractReleaseNativeSymbolTables NO-SOURCE
> Task :app:extractProguardFiles
> Task :CordovaLib:createFullJarRelease
> Task :CordovaLib:extractProguardFiles
> Task :app:mergeReleaseJavaResource
> Task :CordovaLib:generateReleaseLintModel
> Task :CordovaLib:prepareLintJarForPublish
> Task :CordovaLib:stripReleaseDebugSymbols NO-SOURCE
> Task :CordovaLib:copyReleaseJniLibsProjectAndLocalJars
> Task :app:generateReleaseLintVitalReportModel
> Task :CordovaLib:extractDeepLinksForAarRelease
> Task :app:mergeDexRelease
> Task :CordovaLib:extractReleaseAnnotations
> Task :app:buildReleasePreBundle
> Task :CordovaLib:mergeReleaseGeneratedProguardFiles
> Task :CordovaLib:mergeReleaseConsumerProguardFiles
> Task :CordovaLib:mergeReleaseJavaResource
> Task :CordovaLib:syncReleaseLibJars
> Task :CordovaLib:bundleReleaseLocalLintAar
> Task :CordovaLib:writeReleaseLintModelMetadata
> Task :CordovaLib:generateReleaseLintVitalModel
> Task :app:compileReleaseArtProfile
> Task :app:parseReleaseIntegrityConfig
> Task :CordovaLib:lintVitalAnalyzeRelease
> Task :app:lintVitalAnalyzeRelease
> Task :app:lintVitalReportRelease
> Task :app:lintVitalRelease
> Task :app:packageReleaseBundle
> Task :app:signReleaseBundle
> Task :app:produceReleaseBundleIdeListingFile
> Task :app:createReleaseBundleListingFileRedirect
> Task :app:bundleRelease

[Incubating] Problems report is available at: file:///app/platforms/android/build/reports/problems/problems-report.html

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.14.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 2m 21s
81 actionable tasks: 81 executed
Built the following bundle(s): 
	/app/platforms/android/app/build/outputs/bundle/release/app-release.aab
No scripts found for hook "after_compile".
No scripts found for hook "after_build".
cp: cannot stat 'platforms/android/app/build/outputs/apk/release/*.apk': No such file or directory

> echo Build failed with Node 20 and JDK 17: Command '['docker', 'run', '--rm', '-v', '/home/ubuntu/storage/cordova_assets/extracted/Justin-Credible-Ionic-TypeScript-MDHA-Starter/Ionic-TypeScript-MDHA-Starter-7ee1d87e6806a16a053bf2a7fbae7587b05d6870:/source:ro', '-v', '/home/ubuntu/BachelorsThesis/scripts/cordova/output/Justin-Credible-Ionic-TypeScript-MDHA-Starter:/output', '-v', '/home/ubuntu/.npm:/root/.npm', 'cordova-android:20-jdk17', 'bash', '-c', 'set -e\n            cp -r /source/. /app\n            cd /app\n            rm -rf platforms plugins node_modules || true\n            rm -rf $GRADLE_USER_HOME || true\n            mkdir -p $GRADLE_USER_HOME\n\n            # unset Gradle options\n            unset JAVA_OPTS\n\n            # install deps\n            if [ -f yarn.lock ]; then\n                yarn install --ignore-scripts\n            else\n                npm install --ignore-scripts\n            fi\n\n            # ensure android platform\n            cordova platform add android\n            cordova prepare android\n\n            # ---- PATCH ROOT GRADLE FILES (CRITICAL FIX) ----\n            for f in platforms/android/build.gradle platforms/android/CordovaLib/build.gradle; do\n                if [ -f "$f" ]; then\n                    sed -i \'/buildscript[[:space:]]*{/a\\\n                repositories {\\\n                    google()\\\n                    mavenCentral()\\\n                    maven { url "https://plugins.gradle.org/m2/" }\\\n                    maven { url "https://maven.aliyun.com/repository/public" }\\\n                    maven { url "https://jcenter.bintray.com/" }\\\n                    maven { url "https://jitpack.io" }\\\n                }\\\n            \' "$f" || true\n\n                    sed -i \'/allprojects[[:space:]]*{/a\\\n                repositories {\\\n                    google()\\\n                    mavenCentral()\\\n                    maven { url "https://plugins.gradle.org/m2/" }\\\n                    maven { url "https://maven.aliyun.com/repository/public" }\\\n                    maven { url "https://jcenter.bintray.com/" }\\\n                    maven { url "https://jitpack.io" }\\\n                }\\\n            \' "$f" || true\n                fi\n            done\n\n            # ---- FIX versioncompare (very common failure) ----\n            grep -RIl \'com.g00fy2:versioncompare:1.3.4\' platforms/android 2>/dev/null | \\\n            xargs -r sed -i \'s/com.g00fy2:versioncompare:1.3.4/io.github.g00fy2:versioncompare:1.5.0/g\' || true\n\n            # ---- fix versioncompare imports (CRITICAL) ----\n            find platforms/android \\( -name "*.gradle" -o -name "*.gradle.kts" \\) -print0 | \\\n            xargs -0 sed -i \'s/import com\\.g00fy2\\.versioncompare\\.Version/import io.github.g00fy2.versioncompare.Version/g\' || true\n\n            # ---- OPTIONAL: remove illegal JVM args ----\n            find platforms/android -type f -exec sed -i \'s/--illegal-access=permit//g\' {} + || true\n\n            # ---- JDK 8 specific patch ----\n            if [ \\"17\\" = "8" ]; then\n                find platforms/android -name "build.gradle" -exec \\\n                    sed -i \'s/compileSdkVersion [0-9]\\+/compileSdkVersion 30/g\' {} \\; || true\n\n                find platforms/android -name "build.gradle" -exec \\\n                    sed -i \'s/targetSdkVersion [0-9]\\+/targetSdkVersion 30/g\' {} \\; || true\n            fi\n\n            # ---- android sdk path ----\n            echo "sdk.dir=$ANDROID_HOME" > platforms/android/local.properties\n\n            # ---- force APK output (suppress AAB generation) ----\n            echo "android.bundle.enableAll=false" >> platforms/android/gradle.properties\n\n            # ---- enable ABI splits ----\n            if grep -q \'splits\' platforms/android/app/build.gradle 2>/dev/null; then\n                sed -i \'s/enable false/enable true/\' platforms/android/app/build.gradle || true\n            else\n                sed -i \'/^android[[:space:]]*{/a\\    splits {\\n        abi {\\n            reset()\\n            enable true\\n            universalApk false\\n            include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"\\n        }\\n    }\' platforms/android/app/build.gradle || true\n            fi\n\n            # ---- enable R8 / minification ----\n            sed -i \'s/minifyEnabled false/minifyEnabled true/\' platforms/android/app/build.gradle || true\n\n            # ---- sign release with debug key ----\n            sed -i \'/buildTypes/,/}/s/release {/release {\\n            signingConfig signingConfigs.debug/\' platforms/android/app/build.gradle || true\n\n            # ---- build release APK ----\n            cordova build android --release --no-interactive --verbose\n\n            cp platforms/android/app/build/outputs/apk/release/*.apk /output/r8/\n\n            # ---- copy TPL metadata ----\n            [ -f config.xml ] && cp config.xml /output/r8/ || true\n            [ -f plugins/fetch.json ] && cp plugins/fetch.json /output/r8/ || true\n            [ -f plugins/android.json ] && cp plugins/android.json /output/r8/ || true\n            [ -f platforms/android/app/build.gradle ] && cp platforms/android/app/build.gradle /output/r8/app-build.gradle || true\n            [ -f platforms/android/build.gradle ] && cp platforms/android/build.gradle /output/r8/root-build.gradle || true\n            [ -f platforms/android/settings.gradle ] && cp platforms/android/settings.gradle /output/r8/ || true\n            [ -f package.json ] && cp package.json /output/r8/ || true\n            [ -f package-lock.json ] && cp package-lock.json /output/r8/ || true\n            [ -f yarn.lock ] && cp yarn.lock /output/r8/ || true\n            [ -f pnpm-lock.yaml ] && cp pnpm-lock.yaml /output/r8/ || true\n            mkdir -p /output/r8/plugin_manifests\n            find plugins -name "plugin.xml" 2>/dev/null | while read f; do cp "$f" /output/r8/plugin_manifests/$(echo "$f" | tr \'/\' \'_\') 2>/dev/null; done || true\n            find plugins -name "*.gradle" 2>/dev/null | while read f; do cp "$f" /output/r8/ 2>/dev/null; done || true\n            find platforms/android -name "*.gradle" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/r8/ 2>/dev/null; done || true\n            mkdir -p /output/r8/libs\n            find plugins platforms/android -name "*.jar" -not -name "gradle-wrapper.jar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/r8/libs/ 2>/dev/null; done || true\n            find plugins platforms/android -name "*.aar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/r8/libs/ 2>/dev/null; done || true\n            find plugins platforms/android -name "*.so" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/r8/libs/ 2>/dev/null; done || true\n            ']' returned non-zero exit status 1.
Build failed with Node 20 and JDK 17: Command '['docker', 'run', '--rm', '-v', '/home/ubuntu/storage/cordova_assets/extracted/Justin-Credible-Ionic-TypeScript-MDHA-Starter/Ionic-TypeScript-MDHA-Starter-7ee1d87e6806a16a053bf2a7fbae7587b05d6870:/source:ro', '-v', '/home/ubuntu/BachelorsThesis/scripts/cordova/output/Justin-Credible-Ionic-TypeScript-MDHA-Starter:/output', '-v', '/home/ubuntu/.npm:/root/.npm', 'cordova-android:20-jdk17', 'bash', '-c', 'set -e\n            cp -r /source/. /app\n            cd /app\n            rm -rf platforms plugins node_modules || true\n            rm -rf $GRADLE_USER_HOME || true\n            mkdir -p $GRADLE_USER_HOME\n\n            # unset Gradle options\n            unset JAVA_OPTS\n\n            # install deps\n            if [ -f yarn.lock ]; then\n                yarn install --ignore-scripts\n            else\n                npm install --ignore-scripts\n            fi\n\n            # ensure android platform\n            cordova platform add android\n            cordova prepare android\n\n            # ---- PATCH ROOT GRADLE FILES (CRITICAL FIX) ----\n            for f in platforms/android/build.gradle platforms/android/CordovaLib/build.gradle; do\n                if [ -f "$f" ]; then\n                    sed -i \'/buildscript[[:space:]]*{/a\\\n                repositories {\\\n                    google()\\\n                    mavenCentral()\\\n                    maven { url "https://plugins.gradle.org/m2/" }\\\n                    maven { url "https://maven.aliyun.com/repository/public" }\\\n                    maven { url "https://jcenter.bintray.com/" }\\\n                    maven { url "https://jitpack.io" }\\\n                }\\\n            \' "$f" || true\n\n                    sed -i \'/allprojects[[:space:]]*{/a\\\n                repositories {\\\n                    google()\\\n                    mavenCentral()\\\n                    maven { url "https://plugins.gradle.org/m2/" }\\\n                    maven { url "https://maven.aliyun.com/repository/public" }\\\n                    maven { url "https://jcenter.bintray.com/" }\\\n                    maven { url "https://jitpack.io" }\\\n                }\\\n            \' "$f" || true\n                fi\n            done\n\n            # ---- FIX versioncompare (very common failure) ----\n            grep -RIl \'com.g00fy2:versioncompare:1.3.4\' platforms/android 2>/dev/null | \\\n            xargs -r sed -i \'s/com.g00fy2:versioncompare:1.3.4/io.github.g00fy2:versioncompare:1.5.0/g\' || true\n\n            # ---- fix versioncompare imports (CRITICAL) ----\n            find platforms/android \\( -name "*.gradle" -o -name "*.gradle.kts" \\) -print0 | \\\n            xargs -0 sed -i \'s/import com\\.g00fy2\\.versioncompare\\.Version/import io.github.g00fy2.versioncompare.Version/g\' || true\n\n            # ---- OPTIONAL: remove illegal JVM args ----\n            find platforms/android -type f -exec sed -i \'s/--illegal-access=permit//g\' {} + || true\n\n            # ---- JDK 8 specific patch ----\n            if [ \\"17\\" = "8" ]; then\n                find platforms/android -name "build.gradle" -exec \\\n                    sed -i \'s/compileSdkVersion [0-9]\\+/compileSdkVersion 30/g\' {} \\; || true\n\n                find platforms/android -name "build.gradle" -exec \\\n                    sed -i \'s/targetSdkVersion [0-9]\\+/targetSdkVersion 30/g\' {} \\; || true\n            fi\n\n            # ---- android sdk path ----\n            echo "sdk.dir=$ANDROID_HOME" > platforms/android/local.properties\n\n            # ---- force APK output (suppress AAB generation) ----\n            echo "android.bundle.enableAll=false" >> platforms/android/gradle.properties\n\n            # ---- enable ABI splits ----\n            if grep -q \'splits\' platforms/android/app/build.gradle 2>/dev/null; then\n                sed -i \'s/enable false/enable true/\' platforms/android/app/build.gradle || true\n            else\n                sed -i \'/^android[[:space:]]*{/a\\    splits {\\n        abi {\\n            reset()\\n            enable true\\n            universalApk false\\n            include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"\\n        }\\n    }\' platforms/android/app/build.gradle || true\n            fi\n\n            # ---- enable R8 / minification ----\n            sed -i \'s/minifyEnabled false/minifyEnabled true/\' platforms/android/app/build.gradle || true\n\n            # ---- sign release with debug key ----\n            sed -i \'/buildTypes/,/}/s/release {/release {\\n            signingConfig signingConfigs.debug/\' platforms/android/app/build.gradle || true\n\n            # ---- build release APK ----\n            cordova build android --release --no-interactive --verbose\n\n            cp platforms/android/app/build/outputs/apk/release/*.apk /output/r8/\n\n            # ---- copy TPL metadata ----\n            [ -f config.xml ] && cp config.xml /output/r8/ || true\n            [ -f plugins/fetch.json ] && cp plugins/fetch.json /output/r8/ || true\n            [ -f plugins/android.json ] && cp plugins/android.json /output/r8/ || true\n            [ -f platforms/android/app/build.gradle ] && cp platforms/android/app/build.gradle /output/r8/app-build.gradle || true\n            [ -f platforms/android/build.gradle ] && cp platforms/android/build.gradle /output/r8/root-build.gradle || true\n            [ -f platforms/android/settings.gradle ] && cp platforms/android/settings.gradle /output/r8/ || true\n            [ -f package.json ] && cp package.json /output/r8/ || true\n            [ -f package-lock.json ] && cp package-lock.json /output/r8/ || true\n            [ -f yarn.lock ] && cp yarn.lock /output/r8/ || true\n            [ -f pnpm-lock.yaml ] && cp pnpm-lock.yaml /output/r8/ || true\n            mkdir -p /output/r8/plugin_manifests\n            find plugins -name "plugin.xml" 2>/dev/null | while read f; do cp "$f" /output/r8/plugin_manifests/$(echo "$f" | tr \'/\' \'_\') 2>/dev/null; done || true\n            find plugins -name "*.gradle" 2>/dev/null | while read f; do cp "$f" /output/r8/ 2>/dev/null; done || true\n            find platforms/android -name "*.gradle" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/r8/ 2>/dev/null; done || true\n            mkdir -p /output/r8/libs\n            find plugins platforms/android -name "*.jar" -not -name "gradle-wrapper.jar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/r8/libs/ 2>/dev/null; done || true\n            find plugins platforms/android -name "*.aar" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/r8/libs/ 2>/dev/null; done || true\n            find plugins platforms/android -name "*.so" 2>/dev/null | grep -v "/build/" | while read f; do cp "$f" /output/r8/libs/ 2>/dev/null; done || true\n            ']' returned non-zero exit status 1.
