Skip to content

Make downloadListFile public for Gradle 9 compatibility#200

Merged
ikhoon merged 1 commit into
line:mainfrom
otheng03:gradle9-downloadlistfile-public
Jun 16, 2026
Merged

Make downloadListFile public for Gradle 9 compatibility#200
ikhoon merged 1 commit into
line:mainfrom
otheng03:gradle9-downloadlistfile-public

Conversation

@otheng03

@otheng03 otheng03 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

In Gradle 9 (Groovy 4), as you know, closures can no longer access private members of a class when the runtime instance is a subclass — which is always the case for decorated task types such asDownloadJavadocPackageListTask. Calling a private method from a closure in such a class fails with:

Could not find method downloadListFile() for arguments [...] on task ':...' of type DownloadJavadocPackageListTask

See: Gradle 9 upgrade guide — Private properties and methods may be inaccessible in closures

downloadListFile is currently only called from plain method bodies(addOfflineLink), so nothing is broken today — this is a defensive change so that a future call from a closure does not fail at runtime.

How to re-produce the problem:

Please see:

@CLAassistant

CLAassistant commented Jun 12, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@otheng03 otheng03 marked this pull request as draft June 12, 2026 06:34
@otheng03 otheng03 marked this pull request as ready for review June 12, 2026 06:37
@imasahiro

Copy link
Copy Markdown
Member

@minwoox @ikhoon Hi, would you mind to take a look at this if you have time? We've required small modification during Gradle 9 upgrade. We are now trying to backport the change to here.

@minwoox minwoox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👍 👍

@jrhee17 jrhee17 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍

@ikhoon ikhoon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ikhoon ikhoon merged commit 0b74d94 into line:main Jun 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants