0.11.0: dist-apk takes Kotlin, libraries, archives and a Maven graph; dist-apple takes Info.plist entries and an iOS device - #26
Merged
Conversation
This was referenced Sep 15, 2026
Merged
Sunrisepeak
force-pushed
the
feat/0.11.0-android-kotlin-maven-apple-device
branch
from
September 15, 2026 12:43
7026d36 to
a11c63e
Compare
… dist-apple takes Info.plist entries and an iOS device
dist-apk
- options::kotlin_sources: kotlinc from xim:kotlin (feature dist-apk-kotlin)
compiles the Kotlin with the Java as reference sources, before javac; the
Kotlin stdlib is dexed.
- R classes: aapt2 link --java, with --extra-packages for every library.
- options::libraries (Android libraries from source), options::aars and
options::jars, and options::maven through a lock file resolved by
xim:coursier (feature dist-apk-maven). MCPP_DIST_APK_MAVEN=update and
=fetch are the only packs that reach the network; an ordinary pack checks
each cached artifact against the lock's sha256.
- A stated subset of the manifest merger: tools:node remove/replace,
tools:replace, ${applicationId}, a conflicting element refused by name.
- options::sign = false writes the aligned package unsigned.
dist-apple
- options::info_plist: a project's entries join the Info.plist; a key the
member derives is refused by name, and one it only defaults is replaced.
- options::provisioning_profile, on the iOS device row: embedded as
embedded.mobileprovision, its entitlements sign the bundle, and its
application identifier must cover the bundle's.
- The device row's runner named app is devicectl-run, from
xim:apple-device-tools.
mcpp::plugins::xml is the XML reader and writer the two members share.
With no new option set, both members plan what 0.10.1 planned.
The three xim recipes are openxlings/xim-pkgindex#844's, in the published
index since ccc6e12. The Android fixtures build on Linux: mcpp 2026.9.14.2 does
not link an Android row on a macOS host (mcpp-community/mcpp#647, E3).
Sunrisepeak
force-pushed
the
feat/0.11.0-android-kotlin-maven-apple-device
branch
from
September 15, 2026 15:58
a11c63e to
e2aa934
Compare
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.
An Android application whose developers write Kotlin, read resources through
R, or use a library got nothing fromdist-apk0.10.1 but Java sources and oneres/. An iOS application could not state a usage description, and could not be signed for a device or run on one. Gradle and Xcode give a project these, so a project that builds with mcpp as well had to leave them out or keep them in another build system.Every addition is an explicit option. With none set, both members plan exactly what 0.10.1 planned:
check-apk-features.sh(a) still compares the level-0 manifest byte-for-byte, and a macOS Info.plist with noinfo_plistis byte-identical to 0.10.1's.dist-apkkotlin_sourceskotlinccompiles the Kotlin first (-jvm-target 17), with the Java as reference sources;javacthen compiles the Java against it, andd8dexes both withkotlin-stdlib.jar. The compiler isxim:kotlin2.4.20, declared by the new featuredist-apk-kotlinaapt2 link --java, with--extra-packagesfor every library package, compiled with the sourceslibrariespackage,resources,manifest,assets, Java and Kotlin roots). An earlier library wins a resource both define; the application wins over all of themaars,jarsres/, manifest,jni/<abi>(only the ABIs the package carries) andassets/maven,maven_repositories,maven_lock,maven_cachexim:coursier2.1.24, declared by the new featuredist-apk-mavensignfalsewrites the aligned package unsigned (APK and AAB); refused together withkeystoreNo ordinary build reaches the network.
MCPP_DIST_APK_MAVEN=updateresolves and writes the lock, andMCPP_DIST_APK_MAVEN=fetchdownloads exactly the locked artifacts. Without either, a pack reads the cache and checks each artifact's sha256 against the lock. It refuses when there is no lock, when the lock was resolved for other coordinates, or when an artifact is missing, and names the mode that fixes it. The repositories are recorded in the lock but not required, so a mirror serving the same bytes is accepted.The manifest merge is a stated subset of the Android Gradle plugin's merger, documented in the README and in
merge_manifests:<manifest>and<application>children are added by kind andandroid:name, and<queries>are unioned;tools:node="replace"or"remove"; a differing<application>attribute is refused unless it is listed intools:replace;minSdkVersionis refused;${applicationId}is substituted, and any other placeholder is refused;tools:attributes are stripped from the result.The two features are separate from
dist-apkbecause provisioning runs before the build program says what it compiles. Declared bydist-apkitself, the 90 MB compiler would be installed for every Android consumer.dist-appleinfo_plist: a plist whose top-level entries join the bundle's Info.plist. A key the member derives (CFBundleIdentifier, the version keys,MinimumOSVersion, ...) is refused by name, and a key it only defaults (UIDeviceFamily,LSRequiresIPhoneOS,NSHighResolutionCapable) takes the project's value.provisioning_profile: only on the device row (aarch64-ios), and only withidentity. The profile is embedded asembedded.mobileprovision, and itsEntitlementssign the bundle unlessentitlementsnames a file; a wildcard application identifier is stated as the bundle's own. The profile's identifier must cover the bundle identifier. It is read from the profile's bytes, so the plan checks it on any host. A profile on the simulator row, one without an identity, or one for another identifier is refused.devicectl-run, fromxim:apple-device-tools0.1.0, is the device row's runner namedapp(when = "run", on that row only).mcpp run --target aarch64-ios --format appinstalls the bundle and launches it with the console attached. The simulator row keepssimctl-run.mcpp::plugins::xmlin the lib root is the reader and writer both members use. It handles elements, attributes and text; comments, the declaration and a DOCTYPE are dropped.Tests
tests/apk-consumer-libraries(new), on Linux:tools:), and the AAR's library for x86_64 only.sign = false: aligned, andapksignerdoes not verify it.bundletool validateaccepts.update; a cached pack; a cached pack with unreachable repositories; an empty cache refused;fetch; a stale lock refused.check-apk-features.sh: (i) Kotlin sources withoutdist-apk-kotlinare refused naming it; (j)sign = falsetogether with a keystore is refused.check-ios-plan.sh:devicectl-run, and the simulator row does not;UIDeviceFamilyreplaced, and a derived key refused;plutilaccepts and that launches;mcpp runruns (exit 7).all-rules-compilenames the two new features. Its CI check counts members by family name (rules-*,tools-*,dist-*), becausedist-apkis now implied by another feature and still a member.check-apk-features.sh(a)–(j),check-apk-closure.sh,check-apk-libraries.sh(Maven through a mirror),check-ios-plan.sh,check-apple-plan.shandall-rules-compilepass. A consumer ofdist-apkalone packs with the three new recipes absent from the index, offline.Not on a macOS host: Android. The first run of this PR packed
apk-consumeronmacos-15as well, where every payload publishes a table.mcpp build --target x86_64-linux-androidfailed at the application's own link withld64.lld: error: unknown argument '-soname', before any dist-apk step ran. mcpp 2026.9.14.2 composes a macOS host's link line in a branch that states the target triple only for an Apple row, so-fuse-ld=lldpicks the Mach-O flavour. That is an engine defect, filed as E3 of mcpp-community/mcpp#647. The macOS dist-apk steps are out of the workflow until a release links that row, and the README says the build host is Linux.Not measured: a device. No runner here has an iOS device, so the signed device bundle, the install, and whether
devicectlreturns the program's exit status are unmeasured;devicectl-runsays so when it runs.Dependencies
xim:kotlin2.4.20,xim:coursier2.1.24 andxim:apple-device-tools0.1.0 come from openxlings/xim-pkgindex#844 (with gitcode CN mirrors), which is merged and in the published index sincexim-index-ccc6e12. A client sync through the CN mirror resolves all three. The temporary CI bridge that wrote the reviewed recipes into the synced index is gone.Version 0.11.0; the engine floor is unchanged (2026.9.14.2).