Skip to content

Conversation

@thebehera
Copy link
Contributor

@thebehera thebehera commented Dec 19, 2025

Summary

  • Lower Android minSdk from 21 to 19, expanding device compatibility
  • Add automatic GitHub release creation after successful Maven Central publish
  • Fix critical version resolution bug that caused incorrect artifact names

Changes

Android minSdk

  • build.gradle.kts: Change minSdk from 21 to 19
  • AndroidManifest.xml (test): Add tools:overrideLibrary for test dependencies that require API 21+
  • android_integration.yaml: Update emulator matrix to test on API 19 instead of 21

Auto-release on merge

  • merged.yaml: After successful publish to Maven Central, automatically:
    • Get the version from Gradle (./gradlew -q nextVersion)
    • Create and push a git tag (v{version})
    • Create a GitHub release with PR title and link to PR
    • Added permissions: contents: write to allow tag creation and release publishing

Fix version resolution bug

  • build.gradle.kts: Fixed critical bug where project.extra.get("getNextVersion") was returning the function signature instead of invoking the function
  • This caused Maven artifacts to be published with names like com.ditchoom-buffer-fun Setup_gradle.getNextVersion... instead of com.ditchoom-buffer-1.4.4
  • Now properly casts and invokes the function: (project.extra["getNextVersion"] as (Boolean) -> Any)(!isRunningOnGithub)

Test plan

  • Verify API 19 emulator tests pass in CI
  • Verify API 29 emulator tests still pass
  • Verify project assembles correctly
  • Verify ./gradlew -q nextVersion outputs correct version (1.4.4)
  • Verify auto-release works after merge (will be tested on first merge)

- merged.yaml: Run tests (check) before publishing to Maven Central
- released.yaml: Skip release creation if tag already exists
- review.yaml: Remove redundant Gradle tasks (assemble, check already in build)
- Split review.yaml: Ubuntu for JVM/JS/WASM, macOS for Apple targets only
- Add Konan cache to avoid re-downloading Kotlin/Native toolchains
- Use macos-14 (M1) runners for faster Apple builds
- Enable Gradle parallel builds and caching
- Remove redundant gradle/actions/setup-gradle (setup-java cache is sufficient)
- Remove setup-chrome from merged.yaml (not needed for publishing)
- Remove publishToMavenLocal from review (not needed for PR testing)
- Add --no-build-cache for clean CI builds
Remove gradle/actions/setup-gradle which hangs during build scan upload
Add cleanup step to kill crashpad_handler processes that prevent
the emulator from shutting down cleanly. This is a known issue
with reactivecircus/android-emulator-runner (see issue #385).
- Change minSdk from 21 to 19 in build.gradle.kts
- Add tools:overrideLibrary to test manifest for test dependencies
  that require API 21+ (tests still run on API 21+ devices)
- Update CI to test on API 19 emulator
After successfully publishing to Maven Central, automatically:
- Get the version from Gradle
- Create and push a git tag (v{version})
- Create a GitHub release using the PR title and body
After successfully publishing to Maven Central, automatically:
- Get the version from Gradle
- Create and push a git tag (v{version})
- Create a GitHub release with PR title and link to PR for details
The getNextVersion function stored in project.extra was not being
invoked, only converted to string which gave the function signature
instead of the actual version number.

This caused Maven artifacts to be published with incorrect names like:
com.ditchoom-buffer-fun Setup_gradle.getNextVersion...

Now properly casts and invokes the function to get the version.
@thebehera thebehera merged commit 6c48634 into main Dec 19, 2025
3 of 4 checks passed
@thebehera thebehera deleted the lower-min-sdk-to-19 branch December 19, 2025 22:58
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.

2 participants