Skip to content

fix(android): include AGP 9 built-in Kotlin classes in metadata generation - #10

Merged
farfromrefug merged 1 commit into
mainfrom
fix/metadata-agp9-builtin-kotlin-classes
Oct 21, 2026
Merged

farfromrefug merged 1 commit into
mainfrom
fix/metadata-agp9-builtin-kotlin-classes

Conversation

@farfromrefug

Copy link
Copy Markdown
Collaborator

Summary

  • buildMetadata now also collects classes from intermediates/built_in_kotlinc/<buildType>/compile<BuildType>Kotlin/classes, as task input and in the class list given to the metadata generator.
  • AGP 9 built-in Kotlin no longer writes to tmp/kotlin-classes, so the app's own Kotlin classes were missing from the metadata and resolved to undefined in JS (e.g. com.akylas.weather.WeatherIconProviderRegistry).
  • On AGP 8 / Gradle 8 the new directory does not exist, so the added blocks are no-ops and the tmp/kotlin-classes path is unchanged.

Testing

  • oss-weather, Gradle 9.7.1 + AGP 9.4.1: :app:buildMetadata -Prelease exits 0. mdg-java-out.txt now lists WeatherIconProviderRegistry, GadgetbridgeService and AnimatableIconView, and the generated metadata contains listInstalledProviders.
  • Not run on Gradle 8 / AGP 8: no such project available locally. The new code uses only APIs already used elsewhere in the file.
  • Not run on a device yet.

Related: ossappscollective/oss-weather#570

🤖 Generated with Claude Code

…ation

AGP 9 compiles Kotlin into intermediates/built_in_kotlinc/<type>/compile<Type>Kotlin/classes
instead of tmp/kotlin-classes, so buildMetadata never saw the app's Kotlin classes. They were
missing from the metadata and resolved to undefined in JS (e.g.
com.akylas.weather.WeatherIconProviderRegistry).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@farfromrefug
farfromrefug marked this pull request as ready for review October 21, 2026 15:22
@farfromrefug
farfromrefug merged commit a8f188f into main Oct 21, 2026
7 of 11 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