
> echo Attempting build for ReydVires-phaser3-cordova-0 with Node 20 and JDK 8
Attempting build for ReydVires-phaser3-cordova-0 with Node 20 and JDK 8

> docker run --rm -v /home/ubuntu/storage/cordova_assets/extracted/ReydVires-phaser3-cordova/phaser3-cordova-6313be343ebbccd7286c9892fe48ca6e23c62125:/source:ro -v /home/ubuntu/BachelorsThesis/scripts/cordova/output/ReydVires-phaser3-cordova-0:/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 old lockfile
npm warn old lockfile The package-lock.json file was created with an old version of npm,
npm warn old lockfile so supplemental metadata must be fetched from the registry.
npm warn old lockfile
npm warn old lockfile This is a one-time fix-up, please be patient...
npm warn old lockfile
npm warn deprecated osenv@0.1.5: This package is no longer supported.
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 glob@7.1.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 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 xmldom@0.1.27: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm warn deprecated cordova-plugin-whitelist@1.3.4: See https://github.com/apache/cordova-plugin-whitelist#deprecation-notice for details.

added 74 packages, and audited 75 packages in 3s

11 vulnerabilities (2 moderate, 5 high, 4 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@^8.0.0
Adding android project...
(node:22) [DEP0128] DeprecationWarning: Invalid 'main' field in '/app/node_modules/objectorarray/package.json' of 'dist/index.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)
Creating Cordova project for the Android platform:
	Path: platforms/android
	Package: com.example.phaserApp
	Name: PhaserApp
	Activity: MainActivity
	Android target: android-28
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@8.0.0
Discovered plugin "cordova-plugin-whitelist". Adding it to the project
Installing "cordova-plugin-whitelist" for android
Adding cordova-plugin-whitelist to package.json
Discovered plugin "cordova-plugin-insomnia". Adding it to the project
Installing "cordova-plugin-insomnia" for android
Adding cordova-plugin-insomnia to package.json
(node:184) [DEP0128] DeprecationWarning: Invalid 'main' field in '/app/node_modules/objectorarray/package.json' of 'dist/index.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)
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] Detected Gradle property "android.useDeprecatedNdk" with the value of "trueandroid.bundle.enableAll=false", Cordova's recommended value is "true"
[Gradle Properties] Appending custom configuration properties
[Gradle Properties] Updating and Saving File
Merging and updating files from [www, platforms/android/platform_www] to platforms/android/app/src/main/assets/www
  copy  platforms/android/platform_www/cordova-js-src/android/nativeapiprovider.js platforms/android/app/src/main/assets/www/cordova-js-src/android/nativeapiprovider.js (updated file)
  copy  platforms/android/platform_www/cordova-js-src/android/promptbasednativeapi.js platforms/android/app/src/main/assets/www/cordova-js-src/android/promptbasednativeapi.js (updated file)
  copy  platforms/android/platform_www/cordova-js-src/exec.js platforms/android/app/src/main/assets/www/cordova-js-src/exec.js (updated file)
  copy  platforms/android/platform_www/cordova-js-src/platform.js platforms/android/app/src/main/assets/www/cordova-js-src/platform.js (updated file)
  copy  platforms/android/platform_www/cordova-js-src/plugin/android/app.js platforms/android/app/src/main/assets/www/cordova-js-src/plugin/android/app.js (updated file)
  copy  platforms/android/platform_www/cordova.js platforms/android/app/src/main/assets/www/cordova.js (updated file)
  copy  platforms/android/platform_www/cordova_plugins.js platforms/android/app/src/main/assets/www/cordova_plugins.js (updated file)
  copy  platforms/android/platform_www/plugins/cordova-plugin-insomnia/www/Insomnia.js platforms/android/app/src/main/assets/www/plugins/cordova-plugin-insomnia/www/Insomnia.js (updated file)
(node:204) [DEP0128] DeprecationWarning: Invalid 'main' field in '/app/node_modules/objectorarray/package.json' of 'dist/index.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)
Wrote out android application name "PhaserApp" to /app/platforms/android/app/src/main/res/values/strings.xml
android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.0.0): 10000
Wrote out Android package name "com.example.phaserApp" to /app/platforms/android/app/src/main/java/com/example/phaserApp/MainActivity.java
This app does not have launcher icons defined
This app does not have splash screens defined
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_SDK_ROOT=/opt/android (recommended setting)
ANDROID_HOME=/opt/android (DEPRECATED)
Running command: /root/.sdkman/candidates/gradle/6.5/bin/gradle -p /app/platforms/android wrapper -b /app/platforms/android/wrapper.gradle

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

To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/6.5/userguide/gradle_daemon.html.
Daemon will be stopped at the end of the build stopping after processing
> Task :wrapper

BUILD SUCCESSFUL in 7s
1 actionable task: 1 executed
Command finished with error code 0: /root/.sdkman/candidates/gradle/6.5/bin/gradle -p,/app/platforms/android,wrapper,-b,/app/platforms/android/wrapper.gradle
Subproject Path: CordovaLib
Subproject Path: app
Running command: /app/platforms/android/gradlew cdvBuildDebug -b /app/platforms/android/build.gradle
Downloading https://services.gradle.org/distributions/gradle-4.10.3-all.zip
...........10%...........20%...........30%...........40%............50%...........60%...........70%...........80%...........90%............100%

Welcome to Gradle 4.10.3!

Here are the highlights of this release:
 - Incremental Java compilation by default
 - Periodic Gradle caches cleanup
 - Gradle Kotlin DSL 1.0-RC6
 - Nested included builds
 - SNAPSHOT plugin versions in the `plugins {}` block

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


> Configure project :app
File /root/.android/repositories.cfg could not be loaded.
Checking the license for package Android SDK Platform 28 in /opt/android/licenses
License for package Android SDK Platform 28 accepted.
Preparing "Install Android SDK Platform 28 (revision: 6)".
"Install Android SDK Platform 28 (revision: 6)" ready.
Installing Android SDK Platform 28 in /opt/android/platforms/android-28
"Install Android SDK Platform 28 (revision: 6)" complete.
"Install Android SDK Platform 28 (revision: 6)" finished.

> Task :app:preBuild UP-TO-DATE
> Task :CordovaLib:preBuild UP-TO-DATE
> Task :CordovaLib:preDebugBuild UP-TO-DATE
> Task :CordovaLib:checkDebugManifest
> Task :CordovaLib:processDebugManifest
> Task :app:preDebugBuild
> Task :CordovaLib:compileDebugAidl NO-SOURCE
> Task :app:compileDebugAidl NO-SOURCE
> Task :CordovaLib:packageDebugRenderscript NO-SOURCE
> Task :app:compileDebugRenderscript
> Task :app:checkDebugManifest
> Task :app:generateDebugBuildConfig
> Task :app:prepareLintJar
> Task :app:generateDebugSources
> Task :CordovaLib:compileDebugRenderscript
> Task :CordovaLib:generateDebugBuildConfig
> Task :CordovaLib:generateDebugResValues
> Task :CordovaLib:generateDebugResources
> Task :CordovaLib:packageDebugResources
> Task :CordovaLib:generateDebugRFile
> Task :CordovaLib:prepareLintJar
> Task :CordovaLib:generateDebugSources
> Task :CordovaLib:javaPreCompileDebug

> Task :CordovaLib:compileDebugJavaWithJavac
Note: /app/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemCookieManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :CordovaLib:processDebugJavaRes NO-SOURCE
> Task :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
> Task :app:javaPreCompileDebug
> Task :app:mainApkListPersistenceDebug
> Task :app:generateDebugResValues
> Task :app:generateDebugResources
> Task :app:mergeDebugResources
> Task :app:createDebugCompatibleScreenManifests
> Task :app:processDebugManifest
> Task :app:processDebugResources
> Task :app:compileDebugJavaWithJavac
> Task :app:compileDebugNdk NO-SOURCE
> Task :app:compileDebugSources
> Task :app:mergeDebugShaders
> Task :app:compileDebugShaders
> Task :app:generateDebugAssets
> Task :CordovaLib:mergeDebugShaders
> Task :CordovaLib:compileDebugShaders
> Task :CordovaLib:generateDebugAssets
> Task :CordovaLib:packageDebugAssets
> Task :app:mergeDebugAssets
> Task :app:validateSigningDebug
> Task :app:signingConfigWriterDebug
> Task :app:transformClassesWithDexBuilderForDebug
> Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug
> Task :app:transformDexArchiveWithDexMergerForDebug
> Task :app:mergeDebugJniLibFolders
> Task :CordovaLib:compileDebugNdk NO-SOURCE
> Task :CordovaLib:mergeDebugJniLibFolders
> Task :CordovaLib:transformNativeLibsWithMergeJniLibsForDebug
> Task :CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug
> Task :app:transformNativeLibsWithMergeJniLibsForDebug
> Task :app:processDebugJavaRes NO-SOURCE
> Task :app:transformResourcesWithMergeJavaResForDebug
> Task :app:packageDebug
> Task :app:assembleDebug
> Task :app:cdvBuildDebug

BUILD SUCCESSFUL in 1m 2s
42 actionable tasks: 42 executed
Command finished with error code 0: /app/platforms/android/gradlew cdvBuildDebug,-b,/app/platforms/android/build.gradle
Built the following apk(s): 
	/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
	/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
No scripts found for hook "after_compile".
No scripts found for hook "after_build".

> docker run --rm -v /home/ubuntu/storage/cordova_assets/extracted/ReydVires-phaser3-cordova/phaser3-cordova-6313be343ebbccd7286c9892fe48ca6e23c62125:/source:ro -v /home/ubuntu/BachelorsThesis/scripts/cordova/output/ReydVires-phaser3-cordova-0:/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
                    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 [ \"8\" = "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 old lockfile
npm warn old lockfile The package-lock.json file was created with an old version of npm,
npm warn old lockfile so supplemental metadata must be fetched from the registry.
npm warn old lockfile
npm warn old lockfile This is a one-time fix-up, please be patient...
npm warn old lockfile
npm warn deprecated osenv@0.1.5: This package is no longer supported.
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 glob@7.1.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 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 xmldom@0.1.27: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm warn deprecated cordova-plugin-whitelist@1.3.4: See https://github.com/apache/cordova-plugin-whitelist#deprecation-notice for details.

added 74 packages, and audited 75 packages in 3s

11 vulnerabilities (2 moderate, 5 high, 4 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@^8.0.0
Adding android project...
(node:23) [DEP0128] DeprecationWarning: Invalid 'main' field in '/app/node_modules/objectorarray/package.json' of 'dist/index.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)
Creating Cordova project for the Android platform:
	Path: platforms/android
	Package: com.example.phaserApp
	Name: PhaserApp
	Activity: MainActivity
	Android target: android-28
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@8.0.0
Discovered plugin "cordova-plugin-whitelist". Adding it to the project
Installing "cordova-plugin-whitelist" for android
Adding cordova-plugin-whitelist to package.json
Discovered plugin "cordova-plugin-insomnia". Adding it to the project
Installing "cordova-plugin-insomnia" for android
Adding cordova-plugin-insomnia to package.json
(node:185) [DEP0128] DeprecationWarning: Invalid 'main' field in '/app/node_modules/objectorarray/package.json' of 'dist/index.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)
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] Detected Gradle property "android.useDeprecatedNdk" with the value of "trueandroid.bundle.enableAll=false", Cordova's recommended value is "true"
[Gradle Properties] Appending custom configuration properties
[Gradle Properties] Updating and Saving File
Merging and updating files from [www, platforms/android/platform_www] to platforms/android/app/src/main/assets/www
  copy  platforms/android/platform_www/cordova-js-src/android/nativeapiprovider.js platforms/android/app/src/main/assets/www/cordova-js-src/android/nativeapiprovider.js (updated file)
  copy  platforms/android/platform_www/cordova-js-src/android/promptbasednativeapi.js platforms/android/app/src/main/assets/www/cordova-js-src/android/promptbasednativeapi.js (updated file)
  copy  platforms/android/platform_www/cordova-js-src/exec.js platforms/android/app/src/main/assets/www/cordova-js-src/exec.js (updated file)
  copy  platforms/android/platform_www/cordova-js-src/platform.js platforms/android/app/src/main/assets/www/cordova-js-src/platform.js (updated file)
  copy  platforms/android/platform_www/cordova-js-src/plugin/android/app.js platforms/android/app/src/main/assets/www/cordova-js-src/plugin/android/app.js (updated file)
  copy  platforms/android/platform_www/cordova.js platforms/android/app/src/main/assets/www/cordova.js (updated file)
  copy  platforms/android/platform_www/cordova_plugins.js platforms/android/app/src/main/assets/www/cordova_plugins.js (updated file)
  copy  platforms/android/platform_www/plugins/cordova-plugin-insomnia/www/Insomnia.js platforms/android/app/src/main/assets/www/plugins/cordova-plugin-insomnia/www/Insomnia.js (updated file)
(node:207) [DEP0128] DeprecationWarning: Invalid 'main' field in '/app/node_modules/objectorarray/package.json' of 'dist/index.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)
Wrote out android application name "PhaserApp" to /app/platforms/android/app/src/main/res/values/strings.xml
android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.0.0): 10000
Wrote out Android package name "com.example.phaserApp" to /app/platforms/android/app/src/main/java/com/example/phaserApp/MainActivity.java
This app does not have launcher icons defined
This app does not have splash screens defined
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_SDK_ROOT=/opt/android (recommended setting)
ANDROID_HOME=/opt/android (DEPRECATED)
Running command: /root/.sdkman/candidates/gradle/6.5/bin/gradle -p /app/platforms/android wrapper -b /app/platforms/android/wrapper.gradle

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

To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/6.5/userguide/gradle_daemon.html.
Daemon will be stopped at the end of the build stopping after processing
> Task :wrapper

BUILD SUCCESSFUL in 6s
1 actionable task: 1 executed
Command finished with error code 0: /root/.sdkman/candidates/gradle/6.5/bin/gradle -p,/app/platforms/android,wrapper,-b,/app/platforms/android/wrapper.gradle
Subproject Path: CordovaLib
Subproject Path: app
Running command: /app/platforms/android/gradlew cdvBuildRelease -b /app/platforms/android/build.gradle
Downloading https://services.gradle.org/distributions/gradle-4.10.3-all.zip
...........10%...........20%...........30%...........40%............50%...........60%...........70%...........80%...........90%............100%

Welcome to Gradle 4.10.3!

Here are the highlights of this release:
 - Incremental Java compilation by default
 - Periodic Gradle caches cleanup
 - Gradle Kotlin DSL 1.0-RC6
 - Nested included builds
 - SNAPSHOT plugin versions in the `plugins {}` block

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


> Configure project :app
File /root/.android/repositories.cfg could not be loaded.
Checking the license for package Android SDK Platform 28 in /opt/android/licenses
License for package Android SDK Platform 28 accepted.
Preparing "Install Android SDK Platform 28 (revision: 6)".
"Install Android SDK Platform 28 (revision: 6)" ready.
Installing Android SDK Platform 28 in /opt/android/platforms/android-28
"Install Android SDK Platform 28 (revision: 6)" complete.
"Install Android SDK Platform 28 (revision: 6)" finished.

> Task :app:preBuild UP-TO-DATE
> Task :CordovaLib:preBuild UP-TO-DATE
> Task :CordovaLib:preReleaseBuild UP-TO-DATE
> Task :CordovaLib:checkReleaseManifest
> Task :CordovaLib:processReleaseManifest
> Task :app:preReleaseBuild
> Task :CordovaLib:compileReleaseAidl NO-SOURCE
> Task :app:compileReleaseAidl NO-SOURCE
> Task :CordovaLib:packageReleaseRenderscript NO-SOURCE
> Task :app:compileReleaseRenderscript
> Task :app:checkReleaseManifest
> Task :app:generateReleaseBuildConfig
> Task :app:prepareLintJar
> Task :app:generateReleaseSources
> Task :CordovaLib:compileReleaseRenderscript
> Task :CordovaLib:generateReleaseBuildConfig
> Task :CordovaLib:generateReleaseResValues
> Task :CordovaLib:generateReleaseResources
> Task :CordovaLib:packageReleaseResources
> Task :CordovaLib:generateReleaseRFile
> Task :CordovaLib:prepareLintJar
> Task :CordovaLib:generateReleaseSources
> Task :CordovaLib:javaPreCompileRelease

> Task :CordovaLib:compileReleaseJavaWithJavac
Note: /app/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemCookieManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :CordovaLib:processReleaseJavaRes NO-SOURCE
> Task :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease
> Task :app:javaPreCompileRelease
> Task :app:mainApkListPersistenceRelease
> Task :app:generateReleaseResValues
> Task :app:generateReleaseResources
> Task :app:mergeReleaseResources
> Task :app:createReleaseCompatibleScreenManifests
> Task :app:processReleaseManifest
> Task :app:processReleaseResources
> Task :app:compileReleaseJavaWithJavac
> Task :app:compileReleaseNdk NO-SOURCE
> Task :app:compileReleaseSources

> Task :app:lintVitalRelease
Calling mockable JAR artifact transform to create file: /tmp/gradle/caches/transforms-1/files-1.1/android.jar/7616df5eface7b43791a446a28fb171e/android.jar with input /opt/android/platforms/android-28/android.jar
/app/platforms/android/app/src/main/res/drawable-land-hdpi/screen.png: Error: The drawable "screen" in drawable-land-hdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
/app/platforms/android/app/src/main/res/drawable-land-ldpi/screen.png: Error: The drawable "screen" in drawable-land-ldpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
/app/platforms/android/app/src/main/res/drawable-land-mdpi/screen.png: Error: The drawable "screen" in drawable-land-mdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
/app/platforms/android/app/src/main/res/drawable-land-xhdpi/screen.png: Error: The drawable "screen" in drawable-land-xhdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
/app/platforms/android/app/src/main/res/drawable-land-xxhdpi/screen.png: Error: The drawable "screen" in drawable-land-xxhdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
/app/platforms/android/app/src/main/res/drawable-land-xxxhdpi/screen.png: Error: The drawable "screen" in drawable-land-xxxhdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
/app/platforms/android/app/src/main/res/drawable-port-hdpi/screen.png: Error: The drawable "screen" in drawable-port-hdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
/app/platforms/android/app/src/main/res/drawable-port-ldpi/screen.png: Error: The drawable "screen" in drawable-port-ldpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
/app/platforms/android/app/src/main/res/drawable-port-mdpi/screen.png: Error: The drawable "screen" in drawable-port-mdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
/app/platforms/android/app/src/main/res/drawable-port-xhdpi/screen.png: Error: The drawable "screen" in drawable-port-xhdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
/app/platforms/android/app/src/main/res/drawable-port-xxhdpi/screen.png: Error: The drawable "screen" in drawable-port-xxhdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
/app/platforms/android/app/src/main/res/drawable-port-xxxhdpi/screen.png: Error: The drawable "screen" in drawable-port-xxxhdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]

   Explanation for issues of type "MissingDefaultResource":
   If a resource is only defined in folders with qualifiers like -land or -en,
   and there is no default declaration in the base folder (layout or values
   etc), then the app will crash if that resource is accessed on a device
   where the device is in a configuration missing the given qualifier.

   As a special case, drawables do not have to be specified in the base
   folder; if there is a match in a density folder (such as drawable-mdpi)
   that image will be used and scaled. Note however that if you  only specify
   a drawable in a folder like drawable-en-hdpi, the app will crash in
   non-English locales.

   There may be scenarios where you have a resource, such as a -fr drawable,
   which is only referenced from some other resource with the same qualifiers
   (such as a -fr style), which itself has safe fallbacks. However, this still
   makes it possible for somebody to accidentally reference the drawable and
   crash, so it is safer to create a default dummy fallback in the base
   folder. Alternatively, you can suppress the issue by adding
   tools:ignore="MissingDefaultResource" on the element.

   (This scenario frequently happens with string translations, where you might
   delete code and the corresponding resources, but forget to delete a
   translation. There is a dedicated issue id for that scenario, with the id
   ExtraTranslation.)

12 errors, 0 warnings

> Task :app:mergeReleaseShaders
> Task :app:compileReleaseShaders
> Task :app:generateReleaseAssets
> Task :CordovaLib:mergeReleaseShaders
> Task :CordovaLib:compileReleaseShaders
> Task :CordovaLib:generateReleaseAssets
> Task :CordovaLib:packageReleaseAssets
> Task :app:mergeReleaseAssets
> Task :app:signingConfigWriterRelease
> Task :app:transformClassesWithDexBuilderForRelease
> Task :app:transformDexArchiveWithExternalLibsDexMergerForRelease
> Task :app:transformDexArchiveWithDexMergerForRelease
> Task :app:mergeReleaseJniLibFolders
> Task :CordovaLib:compileReleaseNdk NO-SOURCE
> Task :CordovaLib:mergeReleaseJniLibFolders
> Task :CordovaLib:transformNativeLibsWithMergeJniLibsForRelease
> Task :CordovaLib:transformNativeLibsWithIntermediateJniLibsForRelease
> Task :app:transformNativeLibsWithMergeJniLibsForRelease
> Task :app:processReleaseJavaRes NO-SOURCE
> Task :app:transformResourcesWithMergeJavaResForRelease
> Task :app:packageRelease
> Task :app:assembleRelease
> Task :app:cdvBuildRelease

BUILD SUCCESSFUL in 1m 8s
42 actionable tasks: 42 executed
Command finished with error code 0: /app/platforms/android/gradlew cdvBuildRelease,-b,/app/platforms/android/build.gradle
Built the following apk(s): 
	/app/platforms/android/app/build/outputs/apk/release/app-arm64-v8a-release-unsigned.apk
	/app/platforms/android/app/build/outputs/apk/release/app-armeabi-v7a-release-unsigned.apk
	/app/platforms/android/app/build/outputs/apk/release/app-x86-release-unsigned.apk
	/app/platforms/android/app/build/outputs/apk/release/app-x86_64-release-unsigned.apk
No scripts found for hook "after_compile".
No scripts found for hook "after_build".

> echo Build succeeded with Node 20 and JDK 8
Build succeeded with Node 20 and JDK 8
