Description
There is a build classpath dependency conflict between the New Relic Android Agent Gradle Plugin (v7.7.6) and the Guardsquare Gradle Plugin when both are declared together in the root build.gradle.kts file.
When the New Relic plugin is applied, executing any Guardsquare Gradle task (such as ./gradlew guardsquareDownloadCli) fails with a NoSuchMethodError / Unable to find method exception.
Steps to Reproduce
A sample app with the error can be found on: https://github.com/fillipeoliveira-hotmart/dexguard-newrelic-sample
- Add both, newrelic and guardsquare plugin on
build.gradle.kts plugins block.
- run
./gradlew guardsquareDownloadCli gradle command
Expected Behavior
The Gradle build should complete successfully without any classpath collision or NoSuchMethodError. The New Relic Gradle plugin should not force or downgrade commons-io (or other shared utility libraries) on the root buildscript classpath in a way that breaks other applied plugins.
Relevant Logs / Console output
Unable to find method ''java.nio.file.attribute.FileTime org.apache.commons.io.file.attribute.FileTimes.fromUnixTime(long)''
'java.nio.file.attribute.FileTime org.apache.commons.io.file.attribute.FileTimes.fromUnixTime(long)'
Your Environment
• New Relic Android Agent Gradle Plugin Version: 7.7.6
• Guardsquare Gradle Plugin Version: +
• Gradle Version: 9.4.1
• Android Gradle Plugin (AGP) Version: 9.2.1
• Kotlin Version: 2.2.10
• Operating System: macOS
Description
There is a build classpath dependency conflict between the New Relic Android Agent Gradle Plugin (v7.7.6) and the Guardsquare Gradle Plugin when both are declared together in the root
build.gradle.ktsfile.When the New Relic plugin is applied, executing any Guardsquare Gradle task (such as
./gradlew guardsquareDownloadCli) fails with aNoSuchMethodError/Unable to find methodexception.Steps to Reproduce
A sample app with the error can be found on: https://github.com/fillipeoliveira-hotmart/dexguard-newrelic-sample
build.gradle.ktspluginsblock../gradlew guardsquareDownloadCligradle commandExpected Behavior
The Gradle build should complete successfully without any classpath collision or NoSuchMethodError. The New Relic Gradle plugin should not force or downgrade commons-io (or other shared utility libraries) on the root buildscript classpath in a way that breaks other applied plugins.
Relevant Logs / Console output
Your Environment
• New Relic Android Agent Gradle Plugin Version: 7.7.6
• Guardsquare Gradle Plugin Version: +
• Gradle Version: 9.4.1
• Android Gradle Plugin (AGP) Version: 9.2.1
• Kotlin Version: 2.2.10
• Operating System: macOS