Skip to content

OSS License plugin is not compatible with Gradle 9 #309

@ganadist

Description

@ganadist

Describe the bug
oss-license-plugin 0.10.6 (and git head of main branch) is not compatible with Gradle 9.0.0

To Reproduce
Steps to reproduce the behavior:

$ git clone https://github.com/ganadist/minimal-reproducible-example -b gradle9_oss_license_plugin
$ cd minimal-reproducible-example
$ ./gradlew :app:productionReleaseOssLicensesTask

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:productionReleaseOssLicensesTask'.
> groovy/util/XmlSlurper

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 10.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/9.0.0-20250617012933+0000/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 3s
7 actionable tasks: 3 executed, 4 up-to-date
Configuration cache entry discarded with 1 problem.

Expected behavior

  • Build successfully.

Screenshots

Desktop (please complete the following information):

  • Gradle version: Gradle 9.0.0 (latest snapshot)
  • Android Studio version [e.g. 3.1 (stable)]: Any
  • Plugin name and version [e.g. OSS Licenses 16.0.0]: both of 0.10.6 and git head

Additional context
Since Gradle 9.0, Groovy version was upgraded to 4.0

So, groovy.util.XmlSlurper class is not accessible.

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