Skip to content

[EXTERNAL] Migrate deprecated kotlinOptions to compilerOptions (#3219) contributed by @AlexanderTalledo#3223

Merged
tonidero merged 1 commit into
mainfrom
external/AlexanderTalledo/migrate-kotlin-options-to-compiler-options
Mar 12, 2026
Merged

[EXTERNAL] Migrate deprecated kotlinOptions to compilerOptions (#3219) contributed by @AlexanderTalledo#3223
tonidero merged 1 commit into
mainfrom
external/AlexanderTalledo/migrate-kotlin-options-to-compiler-options

Conversation

@tonidero

@tonidero tonidero commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • If applicable, unit tests
  • If applicable, create follow-up issues for purchases-ios and hybrids

Motivation

The old kotlinOptions used standard internal types that were evaluated immediately while the new compilerOptions DSL uses Gradle Properties.

  • Performance: This allows for Lazy Evaluation, meaning the compiler settings are only calculated when actually needed, speeding up the configuration phase of your build.
  • Interoperability: It works seamlessly with other Gradle features like Configuration Caching, which significantly reduces subsequent build times.

Description

Migrate deprecated kotlinOptions to compilerOptions

Changes

  • Replaced deprecated kotlinOptions by compilerOptions

Testing

  • Verified that all modules successfully build after migration.

contributed by @AlexanderTalledo in #3219


Note

Low Risk
Low risk build configuration change that only affects how the Kotlin JVM target is configured; potential impact is limited to Gradle/Kotlin plugin compatibility.

Overview
Switches build-logic/convention/build.gradle.kts from deprecated kotlinOptions to the newer compilerOptions DSL for KotlinCompile, setting jvmTarget via JvmTarget.JVM_17 (property-based configuration) while preserving Java/Kotlin targeting at 17.

Written by Cursor Bugbot for commit c14bbdb. This will update automatically on new commits. Configure here.

<!-- Thank you for contributing to Purchases! Before pressing the
"Create Pull Request" button, please provide the following: -->

### Checklist
- [x] If applicable, unit tests
- [x] If applicable, create follow-up issues for `purchases-ios` and
hybrids

### Motivation
The old `kotlinOptions` used standard internal types that were evaluated
immediately while the new `compilerOptions` DSL uses Gradle Properties.

- **Performance**: This allows for Lazy Evaluation, meaning the compiler
settings are only calculated when actually needed, speeding up the
configuration phase of your build.
- **Interoperability**: It works seamlessly with other Gradle features
like Configuration Caching, which significantly reduces subsequent build
times.
<!-- Why is this change required? What problem does it solve? -->
<!-- Please link to issues following this format: Resolves #999999 -->

### Description
Migrate deprecated kotlinOptions to compilerOptions

#### Changes
- Replaced deprecated `kotlinOptions` by `compilerOptions`

#### Testing
- Verified that all modules successfully build after migration.
<!-- Describe your changes in detail -->
<!-- Please describe in detail how you tested your changes -->

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk build-logic DSL update that keeps the same JVM target (17)
but switches to the newer lazy `compilerOptions` API; impact is limited
to build configuration.
> 
> **Overview**
> Updates `build-logic/convention/build.gradle.kts` to replace
deprecated `kotlinOptions` with the new `compilerOptions` DSL for
`KotlinCompile`, setting `jvmTarget` via `JvmTarget.JVM_17` (instead of
an eager string value). This modernizes the build logic to better
support Gradle property-based configuration (e.g., configuration cache)
without changing the target JVM version.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
c16ed2d. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@tonidero tonidero requested a review from a team as a code owner March 12, 2026 08:21
@tonidero tonidero enabled auto-merge March 12, 2026 08:38
@tonidero tonidero added this pull request to the merge queue Mar 12, 2026
@codecov

codecov Bot commented Mar 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.19%. Comparing base (ee2b390) to head (c14bbdb).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3223   +/-   ##
=======================================
  Coverage   79.19%   79.19%           
=======================================
  Files         356      356           
  Lines       14272    14272           
  Branches     1945     1945           
=======================================
  Hits        11302    11302           
  Misses       2165     2165           
  Partials      805      805           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Merged via the queue into main with commit 55d9c75 Mar 12, 2026
30 checks passed
@tonidero tonidero deleted the external/AlexanderTalledo/migrate-kotlin-options-to-compiler-options branch March 12, 2026 09:04
github-merge-queue Bot pushed a commit that referenced this pull request Mar 12, 2026
**This is an automatic release.**

## RevenueCat SDK
### ✨ New Features
* Expose trackCustomPaywallImpression as experimental public API (#3199)
via Rick (@rickvdl)

### 🔄 Other Changes
* [EXTERNAL] Migrate deprecated kotlinOptions to compilerOptions (#3219)
contributed by @AlexanderTalledo (#3223) via Toni Rico (@tonidero)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk release bookkeeping: bumps version strings and updates
docs/changelogs and CI docs deploy paths, without changing runtime logic
beyond version reporting.
> 
> **Overview**
> Publishes the `9.25.0` release by removing `-SNAPSHOT` across the repo
(Gradle `VERSION_NAME`, internal `Config.frameworkVersion`, and
sample/test app dependency version catalogs).
> 
> Updates release documentation metadata: adds `9.25.0` to
`CHANGELOG.md`, refreshes `CHANGELOG.latest.md`, points
`docs/index.html` to `9.25.0`, and changes CircleCI `docs-deploy` to
sync docs to the `9.25.0` S3 path.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e8615d4. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants