Skip to content

Compile against API level 37 and upgrade to AGP 9.4.1 - #14

Merged
ivnbogdan merged 1 commit into
mainfrom
fix/compile-sdk-37
Oct 10, 2026
Merged

ivnbogdan merged 1 commit into
mainfrom
fix/compile-sdk-37

Conversation

@ivnbogdan

Copy link
Copy Markdown
Contributor

Summary

  • Compile the library (and example app) against API level 37 / Android 17
  • Upgrade the toolchain to AGP 9.4.1 and Gradle 9.6.1, using AGP's built-in Kotlin support (Kotlin stdlib 2.2). API 37.0 requires at least AGP 9.1.1, so no AGP 8.x release can do this.
  • Build files stay in Groovy to keep the diff reviewable
  • Remove library targetSdk / versionCode / versionName (no longer allowed on library modules in AGP 9) and the now-unused aptabase/gradle.properties
  • Declare singleVariant('release') publishing with a sources JAR (required by AGP 9 for components.release)
  • Pin aarMetadata.minCompileSdk = 16: AGP 9 defaults it to compileSdk, which would force every consumer onto compileSdk 37. Version 0.0.9 had no such constraint and the library uses no APIs above minSdk. Drop this block if forcing consumers to 37 is preferred.
  • Fix Groovy space-assignment syntax that Gradle 10 removes
  • Bump version to 0.1.0 and document compatibility in README and llms.txt

Consumer impact

  • minSdk 16 still supported, consumers do not need to raise their own compileSdk
  • Transitive Kotlin stdlib goes from 1.9.22 to 2.2.10; classes carry Kotlin metadata 2.0, readable by Kotlin 1.9+

Testing

  • ./gradlew clean build publishToMavenLocal --warning-mode all passes on JDK 17 and on Android Studio's bundled JDK 25; lint and unit tests pass, no deprecation warnings from project scripts
  • Published AAR verified: minCompileSdk=16, POM dependencies unchanged apart from the stdlib version

🤖 Generated with Claude Code

API 37.0 (Android 17) is only supported from AGP 9.1.1, so this bumps
the build toolchain to AGP 9.4.1 and Gradle 9.6.1 and switches to AGP's
built-in Kotlin support (Kotlin stdlib 2.2). Build files stay in Groovy.

- compileSdk 37 in the library and example; targetSdk 37 in the example
- Remove library targetSdk/versionCode/versionName (not allowed by AGP 9)
  and the now-unused aptabase/gradle.properties
- Declare singleVariant('release') publishing with a sources JAR
- Pin aarMetadata.minCompileSdk to 16 so consumers are not forced onto
  compileSdk 37 (0.0.9 had no constraint; the library uses no newer APIs)
- Fix Groovy space-assignment syntax deprecated for Gradle 10
- Bump version to 0.1.0 and document compatibility in README/llms.txt

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ivnbogdan
ivnbogdan merged commit 5696f5c into main Oct 10, 2026
3 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