Skip to content

Commit 7814dc6

Browse files
ci(governance): allow Java in android/**/src/**/*.java (platform-required JVM shims) (#340)
Branch with 1 commit ahead of main; no PR previously opened. Filed during 2026-06-02 estate orphan-branch sweep. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c98915a commit 7814dc6

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/governance-reusable.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,16 @@ jobs:
342342
| grep -v venv | grep -v __pycache__ || true)
343343
MAKE_FILES=$(git ls-files 'Makefile' 'Makefile.*' '*.mk' \
344344
| grep -v '\.github/' || true)
345-
JAVA_FILES=$(git ls-files '*.java' '*.kt' '*.kts' || true)
345+
# Platform-required JVM shims carve-out 2026-06-02:
346+
# Java is permitted only in Android source trees
347+
# (android/**/src/**/*.java) because Android instantiates
348+
# Service/BroadcastReceiver/AppWidgetProvider/Activity classes by
349+
# name at platform boundaries — Rust/Zig cannot provide JVM
350+
# bytecode for these. Each Android Java shim must be a minimal
351+
# delegating wrapper (typically <10 LoC) that JNIs into Rust/Zig
352+
# immediately. Kotlin (*.kt, *.kts) remains banned outright.
353+
JAVA_FILES=$(git ls-files '*.java' '*.kt' '*.kts' \
354+
| grep -vE '(^|/)android/.*/src/.*\.java$' || true)
346355
SWIFT_FILES=$(git ls-files '*.swift' || true)
347356
DART_FILES=$(git ls-files '*.dart' 'pubspec.yaml' || true)
348357
# V-lang detected by manifest (v.mod / vpkg.json); the .v extension

0 commit comments

Comments
 (0)