Skip to content

fix(android): allow older Kotlin compilers with ads SDK 25.4 - #866

Open
floze-the-genius wants to merge 1 commit into
invertase:mainfrom
floze-the-genius:fix/android-kotlin-metadata-compatibility
Open

fix(android): allow older Kotlin compilers with ads SDK 25.4#866
floze-the-genius wants to merge 1 commit into
invertase:mainfrom
floze-the-genius:fix/android-kotlin-metadata-compatibility

Conversation

@floze-the-genius

Copy link
Copy Markdown

Description

Google Mobile Ads 25.3+ embeds Kotlin 2.3 metadata even though this module only consumes its public Java API. That makes the library fail to compile in Expo and React Native projects still using Kotlin 2.1.x.

Configure only this library's KotlinCompile tasks to skip the dependency metadata version check. This preserves the Android AgeRestrictedTreatment API added with the newer SDK without forcing every consumer module to upgrade to Kotlin 2.3.

Related issues

Fixes #863

Release Summary

Allow Android projects using Kotlin 2.1.x to compile with Google Mobile Ads SDK 25.4.0.

Checklist

  • I read the Contributor Guide and followed the submission process.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in __tests__e2e__
    • jest tests added or updated in __tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan

  • Reproduced the failure in a focused Gradle harness using Kotlin 2.1.0 and the exact play-services-ads:25.4.0 AAR classes.
  • Verified the same harness compiles after applying the scoped -Xskip-metadata-version-check configuration in Groovy.
  • yarn tests:jest --runInBand (7 suites passed, 79 tests passed)
  • yarn tsc:compile
  • yarn lint

A full Android example assemble was not run locally because this machine has no accepted Android SDK installation; the repository Android CI remains the end-to-end build check.

🔥

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


air seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants