Repository navigation
0.24.0: dist-apk packs on Windows and macOS hosts as on Linux - #58
Merged
Merged
Conversation
The member ran its tools through POSIX launchers and four /bin/sh helpers, which a Windows host cannot start. d8, apksigner, bundletool, the Kotlin compiler and coursier now run from their jars on the JDK's java, with the command each tool's own launcher runs; aapt2, zipalign and the JDK tools are named with the host's executable suffix; a class path is joined with the host's separator; and the four helpers are one Java source file, DistApk.java, which that java runs as a single-file program. One command line on every host, so the Linux fixtures exercise what a Windows host runs. CI packs tests/apk-consumer at level 0 and level 1 on the macOS and Windows rows, checking the signature, the archive's entries, aapt2's reading of it and the activity in the dex.
…xe on a Windows host Its generator action was gen.sh, a shell script a Windows host cannot start as an action's program; there the same copy is cmd.exe's copy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dist-apkcould not pack on a Windows host: it namedaapt2/zipalignwithout.exe, ranapksigner/d8through the POSIX wrappersxim:android-build-toolswrites underbin/, and ran four#!/bin/shhelpers as action programs, which CreateProcess cannot start. HuxerUI's conformance suite packs an APK with mcpp on a Windows host and stopped ataapt2 was not found at …\aapt2. The Windows NDK's missing libc++ module sources, the reason this collection's CI gave for having no Windows Android row, were supplied by openxlings/xim-pkgindex#1188.dist/apk.cppmd8,apksigner, bundletool, the Kotlin compiler and coursier run from their jars on the JDK'sjava, with the command and default heap each tool's own launcher uses (build-tools 37.0.0'sd8andapksigner,java -jarfor bundletool and coursier as their xim launchers do, and JetBrains'kotlinc/bin/kotlincfor the JVM compiler). A.batlauncher would need cmd.exe, and mcpp refuses one as an action program when an argument carries a cmd.exe metacharacter.aapt2,zipalign,java,javac,jarandjarsignercarry the host's executable suffix, and a class path is joined with the host's separator.copy-then-jar.sh,run-and-stamp.sh,run-d8.shandmake-module.share replaced by one Java source file,DistApk.java, written at plan time and run by thatjavaas a single-file program (JEP 330). Its commands do what the scripts did;run-d8's operands are now<d8 command>... --inputs <input>... --options <option>..., because the d8 command is several tokens..github/workflows/ci.yml: the macOS and Windows rows packtests/apk-consumerat level 0 and level 1 and check the debug signature, the archive's entries,aapt2 dump badging, andMainActivityandGeneratedHelperin the dex. This replaces the comment that explained why those rows had no Android step.docs/dist-apk.md: the build-host paragraph and the 0.24.0 entry. The version is 0.24.0 inmcpp.toml,src/plugins.cppm, the README and plugin-development.Measured locally on Linux (x86_64-linux-android), with mcpp 2026.11.17.1:
tests/apk-consumer: the level-0 checks of the Linux job pass, and so doescheck-apk-features.sh, all criteria.tests/apk-consumer-sharedcheck-apk-closure.shandtests/apk-consumer-graphcheck-apk-graph.shpass.tests/apk-consumer-librariescheck-apk-libraries.shpasses criteria 1–4: Kotlin and Java, unsigned, App Bundle, and the library refusal. Criterion 5, the Maven update, could not reachmaven.google.comfrom this machine (ConnectException: Connection timed out, also when coursier runs by hand), so it is left to CI.The macOS and Windows rows have not run anywhere yet; this PR's CI is their first run.