getsentry / getsentry/sentry-java
Investigate AGP built-in Kotlin and remove android.builtInKotlin=false opt-out
- 主要語言
- Kotlin
- 星號
- 1.4k
- 分支
- 478
- 平均合併
- 3 天 4 小時
- 30 天內合併 PR
- 72
描述
Follow-up to the AGP 8.13.1 → 9.2.1 bump (getsentry/sentry-java#5777). AGP 9 bundles its own ("built-in") Kotlin. To land the bump without a large refactor, we added a temporary opt-out in `gradle.properties`:
```
# AGP 9+ migration opt-outs until we remove kotlin-android plugin and adopt built-in Kotlin.
android.builtInKotlin=false
```
**Why this matters:** `android.builtInKotlin=false` keeps us on the standalone `org.jetbrains.kotlin.android` plugin (Kotlin 2.3.21). If Google removes this opt-out in a future AGP release, we would be forced onto built-in Kotlin — and given our current project structure, that may block us from upgrading at all.
**What to investigate:**
* Whether AGP's built-in Kotlin version can be controlled/pinned, and whether it is compatible with our multi-module setup.
* What breaks if we remove `android.builtInKotlin=false` today.
**What's involved:**
* `org.jetbrains.kotlin.android` is applied in ~15 modules (sentry-android, sentry-android-core, sentry-android-replay, sentry-compose, etc.). Adopting built-in Kotlin means removing that plugin from all of them.
* Interacts with `kotlin.stdlib.default.dependency=false` (stdlib management) and the pinned `kotlinStdLibVersionAndroid = "1.9.24"` (`buildSrc/src/main/java/Config.kt:5`).
**Done when:** we understand the constraints, have a documented path forward, and (ideally) can remove `android.builtInKotlin=false`.
Should be picked up after the AGP bump PRs merge.
貢獻指南
研究方向
從 gradle.properties 和 buildSrc/src/main/java/Config.kt:5 開始,接著檢查約 15 個套用 org.jetbrains.kotlin.android 的模組,包括 sentry-android 和 sentry-android-core。在試驗設定中移除 android.builtInKotlin=false,並記錄相容性、Kotlin 版本控制、stdlib 行為以及多模組破壞情況。當限制條件和文件化的遷移路徑都已明確時即視為完成,理想情況下還應移除 opt-out。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- kotlin
- 領域
- build-system, mobile
- Issue 類型
- 重構
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100