Skip to content

Replace deprecated Kotlin DSL delegated accessors - #998

Merged
jvukicev merged 1 commit into
masterfrom
rhei/issue-983
Jul 22, 2026
Merged

Replace deprecated Kotlin DSL delegated accessors#998
jvukicev merged 1 commit into
masterfrom
rhei/issue-983

Conversation

@jvukicev

@jvukicev jvukicev commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

What changed

Updated the repository’s Kotlin Gradle scripts to use explicit Gradle APIs instead of delegated accessors deprecated in Gradle 9.6.1 and removed in Gradle 10. Tasks now use register, configurations use create or getByName, and source sets use create.

Why

This removes the issue-983 deprecation warnings and keeps the build logic, Maven build plugins, documentation examples, and sample projects compatible with Gradle 10.

Example

Before:

val graal by sourceSets.creating

After:

val graal = sourceSets.create("graal")

The same explicit style is now used for task and configuration declarations, for example tasks.register("inspections") and configurations.getByName("testFixturesImplementation").

Implementation summary

  • Replaced all four reported delegated-accessor forms across the eight affected Kotlin Gradle scripts.
  • Preserved declaration names and lazy task registration behavior.
  • Updated the public Kotlin DSL documentation snippet and extra-source-set sample so they no longer teach deprecated syntax.

Fixes #983

Validation

Passed:

  • /home/jovan/.local/bin/grund check
  • /home/jovan/.local/bin/grund fmt . --marker --cross-refs --check
  • git diff --check
  • if git grep -n -E 'by[[:space:]]+(tasks\\.registering|configurations\\.(creating|getting)|sourceSets\\.creating)' -- '*.gradle.kts'; then exit 1; fi — no deprecated forms remain.
  • ./gradlew help --warning-mode=all --console=plain
  • ./gradlew :common-plugins:compileKotlin :documentation-plugins:compileKotlin :native-maven-plugin:build-plugins:compileKotlin :aggregator:compileKotlin --rerun-tasks --warning-mode=all --console=plain — 77 tasks succeeded with no issue-983 warning.
  • ./gradlew -p /tmp/native-build-tools-983-focused.auUJdr verifyExtraSourceSet --rerun-tasks --warning-mode=all --console=plain — focused source-set check succeeded.

The full ./gradlew build --warning-mode=all run was not green because of an unrelated existing :native-gradle-plugin:validatePlugins failure and was stopped during lengthy native functional tests. Maven and Gradle inspections, full functional-test/native-image matrices, and documentation rendering were not run; they should be covered by CI or rerun before merge. The complete sample also retains an unrelated existing nativeImageClasspath.extendsFrom(...) Kotlin DSL compilation failure; the isolated check above validates the changed declaration directly.

AI workflow

Generated by Rhei’s github-issue-fix workflow using 16 completed AI-assisted steps, 3 OpenAI models, and 2 review cycles.

View AI workflow details
  1. Issue intake and routing — openai:gpt-5.6-sol via Codex
    Tokens: 641,998 total · 633,786 input (561,920 cached) · 8,212 output
    Fetched issue Remove Gradle 10 Kotlin DSL deprecations from build logic #983, found all 11 deprecated delegated-accessor occurrences, checked repository and grounding rules, confirmed specification fit, and routed the issue directly to implementation.

  2. Fix implementation — openai:gpt-5.6-sol via Codex
    Tokens: 1,818,619 total · 1,811,625 input (1,696,000 cached) · 6,994 output
    Replaced the deprecated task, configuration, and source-set accessors across eight Kotlin Gradle scripts while preserving names, creation semantics, and lazy task registration.

  3. Focused validation, cycle 1 — openai:gpt-5.6-sol via Codex
    Tokens: 815,976 total · 804,139 input (736,512 cached) · 11,837 output
    Verified the repository-wide cleanup and affected build-plugin compilation, but recorded a blocking focused sample check caused by an unchanged Kotlin DSL error.

  4. Requirements review, cycle 1 — openai:gpt-5.6-terra via Codex
    Tokens: 136,686 total · 134,310 input (104,704 cached) · 2,376 output
    Checked the replacements against issue Remove Gradle 10 Kotlin DSL deprecations from build logic #983’s requested APIs, repository scope, and Gradle 10 compatibility objective.

  5. Specification review, cycle 1 — openai:gpt-5.6-terra via Codex
    Tokens: 210,411 total · 206,673 input (163,840 cached) · 3,738 output
    Checked repository instructions and grounding, identifying missing most-specific citations in two changed Maven build-plugin scripts.

  6. Implementation review, cycle 1 — openai:gpt-5.6-terra via Codex
    Tokens: 228,899 total · 225,673 input (184,064 cached) · 3,226 output
    Reviewed API equivalence, lazy task behavior, exact declaration names, documentation updates, and unintended changes.

  7. Validation review, cycle 1 — openai:gpt-5.6-terra via Codex
    Tokens: 191,321 total · 187,780 input (163,072 cached) · 3,541 output
    Assessed the command evidence and treated the red focused sample invocation as a publication blocker despite its pre-existing cause.

  8. Review aggregation, cycle 1 — openai:gpt-5.6-sol via Codex
    Tokens: 350,723 total · 346,342 input (294,400 cached) · 4,381 output
    Combined the focused findings and routed the change to repair for the missing citations and focused-validation blocker.

  9. Address review findings — openai:gpt-5.6-sol via Codex
    Tokens: 588,292 total · 580,965 input (528,896 cached) · 7,327 output
    Added the governing citations and created a green isolated Gradle fixture that directly exercised the changed source-set declaration without changing unrelated sample behavior.

  10. Focused validation, cycle 2 — openai:gpt-5.6-sol via Codex
    Tokens: 927,027 total · 918,127 input (829,184 cached) · 8,900 output
    Repeated grounding, source scanning, build-plugin compilation, root configuration, and focused sample validation; all targeted checks passed.

  11. Requirements review, cycle 2 — openai:gpt-5.6-terra via Codex
    Tokens: 234,353 total · 230,504 input (154,880 cached) · 3,849 output
    Confirmed that the repaired change still covered every reported accessor form and remained within the issue scope.

  12. Specification review, cycle 2 — openai:gpt-5.6-terra via Codex
    Tokens: 271,707 total · 267,520 input (230,912 cached) · 4,187 output
    Confirmed the new Maven build-plugin citations were specific, valid, and absent from public documentation and samples.

  13. Implementation review, cycle 2 — openai:gpt-5.6-terra via Codex
    Tokens: 339,184 total · 335,793 input (301,056 cached) · 3,391 output
    Rechecked correctness, API semantics, repair scope, documentation consistency, and maintainability after the review changes.

  14. Validation review, cycle 2 — openai:gpt-5.6-terra via Codex
    Tokens: 204,445 total · 200,229 input (148,480 cached) · 4,216 output
    Accepted the green isolated source-set fixture and recorded the full-build and broader CI checks that remained outstanding.

  15. Review aggregation, cycle 2 — openai:gpt-5.6-sol via Codex
    Tokens: 387,721 total · 384,377 input (332,288 cached) · 3,344 output
    Found no remaining blockers and approved the change for draft publication with the broader validation gaps disclosed.

  16. PR publication — openai:gpt-5.6-luna via Codex
    Tokens: 367,877 total · 363,742 input (321,280 cached) · 4,135 output
    Pushed the reviewed branch, opened draft PR Replace deprecated Kotlin DSL delegated accessors #998, applied the rhei label, and recorded the remaining maintainer actions.

Aggregate token usage: 7,715,239 total · 7,631,585 input (6,751,488 cached) · 83,654 output

Deterministic implementation and review routing was performed by Rhei without an AI model.

Execution summary: 2 focused review cycles · 1 review-repair cycle

Token accounting covers the 16 completed steps above. One additional requirements-review attempt emitted no usage data and is excluded. Cached tokens are included in the input and total counts; cache-write and output-cache metrics were unsupported.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 22, 2026
@jvukicev jvukicev added the rhei label Jul 22, 2026
@jvukicev
jvukicev marked this pull request as ready for review July 22, 2026 08:22
@jvukicev
jvukicev merged commit 36eb125 into master Jul 22, 2026
97 of 99 checks passed
@jvukicev
jvukicev deleted the rhei/issue-983 branch July 22, 2026 10:54
mergify Bot added a commit to robfrank/linklift that referenced this pull request Aug 20, 2026
â€Ķ.6 to 1.1.9 [skip ci]

Bumps [org.graalvm.buildtools:native-maven-plugin](https://github.com/graalvm/native-build-tools) from 1.1.6 to 1.1.9.
Release notes

*Sourced from [org.graalvm.buildtools:native-maven-plugin's releases](https://github.com/graalvm/native-build-tools/releases).*

> 1.1.9
> -----
>
> What's Changed
> --------------
>
> * Make repository test output concise by default by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#1004](https://redirect.github.com/graalvm/native-build-tools/pull/1004)
> * Decouple Maven plugin unit tests from remote bootstrap tasks by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#1007](https://redirect.github.com/graalvm/native-build-tools/pull/1007)
> * Clarify build prerequisites and add a core build mode by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#1012](https://redirect.github.com/graalvm/native-build-tools/pull/1012)
> * Release 1.1.8 by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1015](https://redirect.github.com/graalvm/native-build-tools/pull/1015)
> * Bump version to 1.1.9-SNAPSHOT by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1016](https://redirect.github.com/graalvm/native-build-tools/pull/1016)
> * Uplift the Native Image layer configuration model by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#1011](https://redirect.github.com/graalvm/native-build-tools/pull/1011)
> * Update reachability metadata to 1.0.10 by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1021](https://redirect.github.com/graalvm/native-build-tools/pull/1021)
>
> **Full Changelog**: <graalvm/native-build-tools@1.1.8...1.1.9>
>
> 1.1.8
> -----
>
> What's Changed
> --------------
>
> * Release 1.1.7 by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1009](https://redirect.github.com/graalvm/native-build-tools/pull/1009)
> * Bump version to 1.1.8-SNAPSHOT by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1010](https://redirect.github.com/graalvm/native-build-tools/pull/1010)
> * Deprecate fallback plugin options by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#997](https://redirect.github.com/graalvm/native-build-tools/pull/997)
> * Update reachability metadata to 1.0.9 by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1014](https://redirect.github.com/graalvm/native-build-tools/pull/1014)
>
> **Full Changelog**: <graalvm/native-build-tools@1.1.7...1.1.8>
>
> 1.1.7
> -----
>
> What's Changed
> --------------
>
> * Release 1.1.6 by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#996](https://redirect.github.com/graalvm/native-build-tools/pull/996)
> * Suppress missing Javadoc diagnostics across convention tasks by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#994](https://redirect.github.com/graalvm/native-build-tools/pull/994)
> * Replace deprecated Kotlin DSL delegated accessors by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#998](https://redirect.github.com/graalvm/native-build-tools/pull/998)
> * Fix Maven plugin unit-test mock maker and SLF4J setup by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#999](https://redirect.github.com/graalvm/native-build-tools/pull/999)
> * Bump version to 1.1.7-SNAPSHOT by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1001](https://redirect.github.com/graalvm/native-build-tools/pull/1001)
> * Bump io.netty:netty-codec-http from 4.1.135.Final to 4.1.136.Final in /samples/metadata-repo-integration by [`@​dependabot`](https://github.com/dependabot)[bot] in [graalvm/native-build-tools#1002](https://redirect.github.com/graalvm/native-build-tools/pull/1002)
> * Avoid Maven internal API for console colors by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#1003](https://redirect.github.com/graalvm/native-build-tools/pull/1003)
> * Update reachability metadata to 1.0.8 by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1008](https://redirect.github.com/graalvm/native-build-tools/pull/1008)
>
> **Full Changelog**: <graalvm/native-build-tools@1.1.6...1.1.7>


Commits

* [`70a22ad`](graalvm/native-build-tools@70a22ad) Release 1.1.9
* [`226c2f2`](graalvm/native-build-tools@226c2f2) Merge pull request [#1021](https://redirect.github.com/graalvm/native-build-tools/issues/1021) from graalvm/update-metadata-to-1.0.10
* [`750e24d`](graalvm/native-build-tools@750e24d) Update reachability metadata to 1.0.10
* [`f9d090c`](graalvm/native-build-tools@f9d090c) Clarify layer selector and test suite support
* [`8a62507`](graalvm/native-build-tools@8a62507) Skip later Gradle layer consumers on GraalVM 25.0
* [`fa9cb64`](graalvm/native-build-tools@fa9cb64) Narrow GraalVM 25.0 layer test skips
* [`a7f0ca4`](graalvm/native-build-tools@a7f0ca4) Skip Gradle layer consumers on GraalVM 25.0
* [`cf67f05`](graalvm/native-build-tools@cf67f05) Skip Maven shared layer test on GraalVM 25.0
* [`60da37c`](graalvm/native-build-tools@60da37c) Skip Maven all-selector layer test on GraalVM 25.0
* [`0498739`](graalvm/native-build-tools@0498739) Fix layered image runtime distribution
* Additional commits viewable in [compare view](graalvm/native-build-tools@1.1.6...1.1.9)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=org.graalvm.buildtools:native-maven-plugin&package-manager=maven&previous-version=1.1.6&new-version=1.1.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement. rhei

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove Gradle 10 Kotlin DSL deprecations from build logic

2 participants