This plugin scans dependencies during gradle build. Throws an error if there is a possible dependency conflict. In the current version, the plugin relies on major versions of artifacts. This may happen when Uses the default Gradle dependency resolution strategy because it uses artifact with the highest version.
On your build.gradle
add:
plugins {
id "io.github.solneo.dependency-conflict-analyzer" version "1.0.2"
}
On your build.gradle
add:
apply plugin: 'io.github.solneo.dependency-conflict-analyzer'
In order to use this plugin, you will also need to add the following to your buildscript classpath:
classpath 'io.github.solneo:dependency-conflict-analyzer:1.0.2'
On your build.gradle.kts
add:
plugins {
id("io.github.solneo.dependency-conflict-analyzer") version "1.0.2"
}
On your build.gradle.kts
add:
apply(plugin = "io.github.solneo.dependency-conflict-analyzer")
In order to use this plugin, you will also need to add the following to your buildscript classpath:
classpath("io.github.solneo:dependency-conflict-analyzer:1.0.2")
You can use failOnConflict
extension for enable error in sync gradle:
dependencyConflictAnalyzer {
failOnConflict = false
}
dependencyConflictAnalyzer {
failOnConflict.set(false)
}
Also you can exclude artifact group or concrete library:
dependencyConflictAnalyzer {
excludeCheckingLibrariesGroup = Arrays.asList("com.example.code.group")
excludeCheckingLibraries = Arrays.asList("com.example.code.group:artifact")
}
dependencyConflictAnalyzer {
excludeCheckingLibrariesGroup.set(listOf("com.example.code.group"))
excludeCheckingLibrariesset(listOf("com.example.code.group:artifact"))
}
This displays a report to the console.
Text Report
--------- Warning! ---------
Danger conflict with com.google.code.gson:gson between:
- version 1.7.1 from --- project :app
- version 2.8.9 from --- redis.clients:jedis:4.1.0
Note: dependencies used only fo log example