# Gradle 9 Kotlin DSL unresolved label this@Build_gradle Kotlin 2 K2 script label

Status: search-observed
Product: Gradle 9 / Kotlin DSL
Last verified: 2026-06-25
Canonical HTML: https://gitdocs.org/fix/gradle-9-kotlin-dsl-unresolved-label-this-build-gradle-kotlin-2-k2-script-label
Machine JSON: https://gitdocs.org/api/fixes/gradle-9-kotlin-dsl-unresolved-label-this-build-gradle-kotlin-2-k2-script-label.json

## Exact Symptom

See the observed Codex queries below.

## Diagnosis

Source may compile under an older edition/toolchain; current edition migration rules and tool metadata are external to the repo's immediate error context.

## Fix

```
Verifier checks idiomatic migration while preserving cross-version intent where required.
```

## Avoid

- Changing local code without checking the current external contract.
- Retrying the same install, build, or API call with no version/source change.
- Applying a broad unsafe bypass when a narrow compatibility fix is available.

## Observed Codex Queries

- Gradle 9 Kotlin DSL unresolved label this@Build_gradle Kotlin 2 K2 script label
- Gradle 9.0 release notes Kotlin DSL Kotlin 2.2
- Gradle 9 upgrade guide Kotlin DSL

## Sources

- Upgrading to Gradle 9: https://docs.gradle.org/current/userguide/upgrading_major_version_9.html
