Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Migrate to new AGP DSL and remove android.newDsl=false opt-out

Aperta
#5,781 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
android, kotlin

Direzione di ricerca

Inizia dal file root build.gradle.kts intorno alle righe 174-180 e ispeziona la configurazione del modulo della libreria usando BaseExtension. Poi esamina sentry-samples/sentry-samples-android/build.gradle.kts per il relativo import interno di VariantImpl, rimuovi android.newDsl=false da gradle.properties e verifica che la build abbia esito positivo con la nuova DSL di AGP.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Platform: Android Platform: Java Task

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 legacy com.android.build.gradle.BaseExtension inside plugins.withId("com.android.library") { ... }. This is what depends on the old DSL.
  • Runtime modules already use the new androidComponents Variant API (beforeVariants/onVariants); the old libraryVariants/applicationVariants/BaseVariant API is not used anywhere. Good starting position.
  • Fragility to address: sentry-samples/sentry-samples-android/build.gradle.kts imports the internal com.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 VariantImpl usage in the Android sample.
  • Remove android.newDsl=false from gradle.properties and 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.

Lingua principale
Kotlin
Stelle
1.4k
Fork
478
Merge medio
2g 20h
PR unite (30g)
71

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/sentry-java

Tutte le issue di getsentry/sentry-java

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.