Skip to content

0.23.1: dist-apk takes a generated Java root as an action input - #57

Merged
Sunrisepeak merged 1 commit into
mainfrom
fix/apk-generated-java-roots
Nov 18, 2026
Merged

Sunrisepeak merged 1 commit into
mainfrom
fix/apk-generated-java-roots

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

A build program that generates Java sources under its output directory (HuxerUI's build rules generate an Android application shell there) got a warning on every build: rerun_if_changed_glob("target/.../java/**/*.java") can never re-run it. root_in_project now answers a root inside mcpp::out_dir(), target/, .mcpp/ or .git/ as outside the project, so it is an input of the javac action and declares no glob; the build program that writes it already runs on every build.

  • dist/apk.cppm: the rule and its reason.
  • tests/apk-consumer: level 1 generates a third Java root under mcpp::out_dir(); check-apk-features.sh (e) asserts GeneratedHelper in classes.dex and no "can never re-run it" in the build and pack output.
  • Version 0.23.1 in mcpp.toml, src/plugins.cppm, README and plugin-development; docs/dist-apk.md names the change.

Measured locally on Linux (x86_64-linux-android): level-1 build and pack succeed, dexdump lists MainActivity, ExternalHelper and GeneratedHelper, and neither log contains the warning.

A Java or Kotlin root inside the build's output, which a build program
generated, declared a re-run glob the engine's walk never enters, and every
build warned that it could never re-run. Such a root is now an input of the
javac action only. The level-1 fixture generates a third root and the
feature check asserts its class and the absence of the warning.
@Sunrisepeak
Sunrisepeak merged commit 68382d2 into main Nov 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant