Skip to content

Conflict between NewRelic Agent and Guardsquare plugin #560

Description

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

  1. Add both, newrelic and guardsquare plugin on build.gradle.kts plugins block.
  2. 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

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions