Skip to content

Gradle 8.11+ support #132

Closed
Closed
@Gazuru

Description

@Gazuru

I upgraded a project of mine to the latest Gradle version (8.14), but it seems like there have been some changes in internal Gradle methods which made the plugin's latest version incompatible with anything above version 8.11.

Below are the constructor signatures, which caused the issues:

DefaultExecAction

Changed since 8.12: gradle/gradle@c8f7d0c#diff-b61405d48b6d7d70351c315bf64588c3764f292a28867985629277ee456a9c97R38-R39
Usage:

/*// if gradleVersion < 4.5
DefaultExecAction action = new DefaultExecAction( fileResolver );
//// elif gradleVersion < 4.8
DefaultExecAction action = new DefaultExecAction( fileResolver, new DefaultExecutorFactory().create( "exec setup" ) );
*/// else
DefaultExecAction action = new DefaultExecAction( fileResolver, new DefaultExecutorFactory().create( "exec setup" ), new DefaultBuildCancellationToken());
//// endif

CopyActionExecuter

Changed since 8.13: gradle/gradle@48cc188#diff-eccae6c26b94bcd3798fd7ea0d099764e9876afce89d2f906d9b761ffb041ddeR32
Usage:

/*// if gradleVersion < 3.4
CopyActionExecuter copyActionExecuter = new CopyActionExecuter( getInstantiator(), getFileSystem() );
//// elif gradleVersion < 7.2
CopyActionExecuter copyActionExecuter = new CopyActionExecuter( getInstantiator(), getFileSystem(), true );
*/// else
CopyActionExecuter copyActionExecuter = new CopyActionExecuter( getInstantiator(), getObjectFactory(), getFileSystem(), true, getDocumentationRegistry() );
//// endif


I also recall issues with java.net.URL type properties being marked with the @Input annotation, there are two of those in the codebase (although these only cause a warning, not an error):

@Input
public URL getWxsTemplateURL() throws MalformedURLException {

@Input
public URL getMultiInstanceScript() throws MalformedURLException {


I suggest to include additional checks for the Gradle versions where the changed constructor signatures should be used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions