Migrate to new AGP DSL and remove android.newDsl=false opt-out
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- android, kotlin
- 領域
- build-system, mobile
調査の方向性
root build.gradle.kts の174~180行付近から始め、BaseExtension を使用しているライブラリモジュールの設定を確認します。次に sentry-samples/sentry-samples-android/build.gradle.kts の内部 VariantImpl import を確認し、gradle.properties から android.newDsl=false を削除して、新しい AGP DSL でビルドが成功することを確認します。
索引モデルが issue の本文から書いたものです。
説明
Follow-up to the AGP 8.13.1 → 9.2.1 bump (getsentry/sentry-java#5777). To land AGP 9 without a large refactor, the bump 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.newDsl=false
Why this matters: android.newDsl=false opts out of AGP 9's new DSL. If Google removes this flag in a future AGP release, we will be unable to upgrade until the migration is done.
Current state:
- The root
build.gradle.kts(around lines 174-180) still configures library modules via the legacycom.android.build.gradle.BaseExtensioninsideplugins.withId("com.android.library") { ... }. This is what depends on the old DSL. - Runtime modules already use the new
androidComponentsVariant API (beforeVariants/onVariants); the oldlibraryVariants/applicationVariants/BaseVariantAPI is not used anywhere. Good starting position. - Fragility to address:
sentry-samples/sentry-samples-android/build.gradle.ktsimports the internalcom.android.build.api.variant.impl.VariantImpl(a non-stable.impl.class), a likely future break point.
Scope:
- Replace the
BaseExtension-based configuration in the root build with the new DSL. - Remove the internal
VariantImplusage in the Android sample. - Remove
android.newDsl=falsefromgradle.propertiesand confirm the build passes.
Done when: android.newDsl=false is removed and the build works on the new AGP DSL.
Should be picked up after the AGP bump PRs merge.
- 主要言語
- Kotlin
- スター
- 1.4k
- フォーク
- 478
- 平均マージ
- 2日 20時間
- マージ済み PR(30日)
- 71
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/sentry-java のほかの issue
-
Improvement Java Platform: Android Platform: Java
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
getsentry/sentry-java#6145 · コメント 1 件 · 担当者 1 名 ·
-
Bug Java Platform: Android Platform: Java
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
getsentry/sentry-java#6138 · コメント 1 件 ·
-
Feature Java Platform: Java Spans
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
getsentry/sentry-java#5984 · コメント 1 件 ·
-
Android Task Traces
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
getsentry/sentry-java#5376 · コメント 1 件 ·
-
Android Docs Errors
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
getsentry/sentry-java#5375 · コメント 1 件 ·
getsentry/sentry-java の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
AAswordman/Operit#1265 · コメント 3 件 ·
-
Source is down
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
keiyoushi/extensions-source#19317 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
acristescu/OnlineGo#216 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
libre-tube/LibreTube#8803 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100