Comments (3)
Thanks for filing the issue, but I'm not sure what you're asking me to do here.
from dependency-analysis-gradle-plugin.
Sorry if this wasn't clear.
- To prevent long-term transitive dependency conflicts, explicitly select versions that are pulled in by transitive dependencies, by adding something like this to the root build.gradle.kts of the project:
configurations.all {
resolutionStrategy {
failOnVersionConflict()
}
}
- This produces errors:
......
* What went wrong:
Could not determine the dependencies of task ':compileGroovy'.
> Could not resolve all dependencies for configuration ':compileClasspath'.
> Conflicts found for the following modules:
- org.jetbrains.kotlin:kotlin-stdlib between versions 1.9.20, 1.9.10 and 1.4.20
- org.jetbrains.kotlin:kotlin-reflect between versions 1.9.20, 1.9.10 and 1.7.0
- org.jetbrains.kotlin:kotlin-stdlib-jdk8 between versions 1.9.10, 1.7.0, 1.7.20 and 1.8.0
- org.jetbrains.kotlin:kotlin-stdlib-jdk7 between versions 1.9.10 and 1.8.0
- org.checkerframework:checker-qual between versions 3.21.4 and 3.12.0
- com.google.errorprone:error_prone_annotations between versions 2.13.1 and 2.11.0
- org.jetbrains.kotlin:kotlin-stdlib-common between versions 1.9.20, 1.9.10 and 1.4.20
- Fix said errors
Please note: This is merely one option you have. Other details can be found here:
https://docs.gradle.org/current/userguide/dependency_capability_conflict.html
https://docs.gradle.org/current/javadoc/org/gradle/api/artifacts/ResolutionStrategy.html#capabilitiesResolution
from dependency-analysis-gradle-plugin.
After further investigation, it turned out that the original issue was what I'll call a 'skill gap' haha.
Your library doesn't introduce transitive dependencies on the classpath, this was due to the way I was implementing it. For future reference, see working example here: https://github.com/NoPhaseNoKill/monorepo/tree/08e26fda3751aa7f101fdb0af208f80475dc6fd5
Resulting output is:
> Task :modules:applications:app:dependencies
------------------------------------------------------------
Project ':modules:applications:app'
------------------------------------------------------------
annotationProcessor - Annotation processors and their dependencies for source set 'main'.
No dependencies
api - API dependencies for null/main (n)
No dependencies
apiDependenciesMetadata
No dependencies
apiElements - API elements for the 'main' feature. (n)
No dependencies
apiElements-published (n)
No dependencies
compileClasspath - Compile classpath for null/main.
+--- project :modules:libraries:utilities
| +--- project :modules:libraries:list
| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20
| | \--- org.jetbrains:annotations:13.0
| \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (*)
+--- project :modules:libraries:list (*)
+--- org.apache.commons:commons-text:1.10.0
| \--- org.apache.commons:commons-lang3:3.12.0
\--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (*)
compileOnly - Compile only dependencies for null/main. (n)
No dependencies
compileOnlyDependenciesMetadata
No dependencies
default - Configuration for default artifacts. (n)
No dependencies
implementation - Implementation only dependencies for null/main. (n)
+--- project utilities (n)
+--- project list (n)
+--- org.apache.commons:commons-text:1.10.0 (n)
\--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (n)
implementationDependenciesMetadata
+--- project :modules:libraries:utilities
| +--- project :modules:libraries:list
| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20
| \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20
+--- project :modules:libraries:list (*)
+--- org.apache.commons:commons-text:1.10.0
| \--- org.apache.commons:commons-lang3:3.12.0
\--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20
intransitiveDependenciesMetadata
No dependencies
kotlinBuildToolsApiClasspath
\--- org.jetbrains.kotlin:kotlin-build-tools-impl:1.9.20
+--- org.jetbrains.kotlin:kotlin-build-tools-api:1.9.20
+--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20
| \--- org.jetbrains:annotations:13.0
+--- org.jetbrains.kotlin:kotlin-compiler-embeddable:1.9.20
| +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (*)
| +--- org.jetbrains.kotlin:kotlin-script-runtime:1.9.20
| +--- org.jetbrains.kotlin:kotlin-reflect:1.6.10
| +--- org.jetbrains.kotlin:kotlin-daemon-embeddable:1.9.20
| \--- org.jetbrains.intellij.deps:trove4j:1.0.20200330
\--- org.jetbrains.kotlin:kotlin-compiler-runner:1.9.20
+--- org.jetbrains.kotlin:kotlin-build-common:1.9.20
+--- org.jetbrains.kotlin:kotlin-daemon-client:1.9.20
+--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0
\--- org.jetbrains.kotlin:kotlin-compiler-embeddable:1.9.20 (*)
kotlinCompilerClasspath
\--- org.jetbrains.kotlin:kotlin-compiler-embeddable:1.9.20
+--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20
| \--- org.jetbrains:annotations:13.0
+--- org.jetbrains.kotlin:kotlin-script-runtime:1.9.20
+--- org.jetbrains.kotlin:kotlin-reflect:1.6.10
+--- org.jetbrains.kotlin:kotlin-daemon-embeddable:1.9.20
\--- org.jetbrains.intellij.deps:trove4j:1.0.20200330
kotlinCompilerPluginClasspath
No dependencies
kotlinCompilerPluginClasspathMain - Kotlin compiler plugins for compilation
\--- org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.9.20
+--- org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.9.20
| +--- org.jetbrains.kotlin:kotlin-scripting-common:1.9.20
| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20
| | \--- org.jetbrains:annotations:13.0
| +--- org.jetbrains.kotlin:kotlin-scripting-jvm:1.9.20
| | +--- org.jetbrains.kotlin:kotlin-script-runtime:1.9.20
| | +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (*)
| | \--- org.jetbrains.kotlin:kotlin-scripting-common:1.9.20 (*)
| \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (*)
\--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (*)
kotlinCompilerPluginClasspathTest - Kotlin compiler plugins for compilation
\--- org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.9.20
+--- org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.9.20
| +--- org.jetbrains.kotlin:kotlin-scripting-common:1.9.20
| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20
| | \--- org.jetbrains:annotations:13.0
| +--- org.jetbrains.kotlin:kotlin-scripting-jvm:1.9.20
| | +--- org.jetbrains.kotlin:kotlin-script-runtime:1.9.20
| | +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (*)
| | \--- org.jetbrains.kotlin:kotlin-scripting-common:1.9.20 (*)
| \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (*)
\--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (*)
kotlinKlibCommonizerClasspath
\--- org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:1.9.20
+--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20
| \--- org.jetbrains:annotations:13.0
\--- org.jetbrains.kotlin:kotlin-compiler-embeddable:1.9.20
+--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (*)
+--- org.jetbrains.kotlin:kotlin-script-runtime:1.9.20
+--- org.jetbrains.kotlin:kotlin-reflect:1.6.10
+--- org.jetbrains.kotlin:kotlin-daemon-embeddable:1.9.20
\--- org.jetbrains.intellij.deps:trove4j:1.0.20200330
kotlinNativeCompilerPluginClasspath
No dependencies
kotlinScriptDef - Script filename extensions discovery classpath configuration
No dependencies
kotlinScriptDefExtensions
No dependencies
mainSourceElements - List of source directories contained in the Main SourceSet. (n)
No dependencies
runtimeClasspath - Runtime classpath of null/main.
+--- project :modules:libraries:utilities
| +--- project :modules:libraries:list
| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20
| | \--- org.jetbrains:annotations:13.0
| \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (*)
+--- project :modules:libraries:list (*)
+--- org.apache.commons:commons-text:1.10.0
| \--- org.apache.commons:commons-lang3:3.12.0
\--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (*)
runtimeElements - Runtime elements for the 'main' feature. (n)
No dependencies
runtimeElements-published (n)
No dependencies
runtimeOnly - Runtime only dependencies for null/main. (n)
No dependencies
testAnnotationProcessor - Annotation processors and their dependencies for source set 'test'.
No dependencies
testApi - API dependencies for null/test (n)
No dependencies
testApiDependenciesMetadata
No dependencies
testCompileClasspath - Compile classpath for null/test.
+--- project :modules:libraries:utilities
| +--- project :modules:libraries:list
| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20
| | \--- org.jetbrains:annotations:13.0
| \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (*)
+--- project :modules:libraries:list (*)
+--- org.apache.commons:commons-text:1.10.0
| \--- org.apache.commons:commons-lang3:3.12.0
+--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (*)
\--- org.junit.jupiter:junit-jupiter-api:5.10.1
+--- org.junit:junit-bom:5.10.1
| +--- org.junit.jupiter:junit-jupiter-api:5.10.1 (c)
| \--- org.junit.platform:junit-platform-commons:1.10.1 (c)
+--- org.opentest4j:opentest4j:1.3.0
+--- org.junit.platform:junit-platform-commons:1.10.1
| +--- org.junit:junit-bom:5.10.1 (*)
| \--- org.apiguardian:apiguardian-api:1.1.2
\--- org.apiguardian:apiguardian-api:1.1.2
testCompileOnly - Compile only dependencies for null/test. (n)
No dependencies
testCompileOnlyDependenciesMetadata
No dependencies
testImplementation - Implementation only dependencies for null/test. (n)
\--- org.junit.jupiter:junit-jupiter-api:5.10.1 (n)
testImplementationDependenciesMetadata
+--- project :modules:libraries:utilities
| +--- project :modules:libraries:list
| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20
| \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20
+--- project :modules:libraries:list (*)
+--- org.apache.commons:commons-text:1.10.0
| \--- org.apache.commons:commons-lang3:3.12.0
+--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20
\--- org.junit.jupiter:junit-jupiter-api:5.10.1
+--- org.junit:junit-bom:5.10.1
| +--- org.junit.jupiter:junit-jupiter-api:5.10.1 (c)
| \--- org.junit.platform:junit-platform-commons:1.10.1 (c)
+--- org.opentest4j:opentest4j:1.3.0
+--- org.junit.platform:junit-platform-commons:1.10.1
| +--- org.junit:junit-bom:5.10.1 (*)
| \--- org.apiguardian:apiguardian-api:1.1.2
\--- org.apiguardian:apiguardian-api:1.1.2
testIntransitiveDependenciesMetadata
No dependencies
testKotlinScriptDef - Script filename extensions discovery classpath configuration
No dependencies
testKotlinScriptDefExtensions
No dependencies
testRuntimeClasspath - Runtime classpath of null/test.
+--- project :modules:libraries:utilities
| +--- project :modules:libraries:list
| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20
| | \--- org.jetbrains:annotations:13.0
| \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (*)
+--- project :modules:libraries:list (*)
+--- org.apache.commons:commons-text:1.10.0
| \--- org.apache.commons:commons-lang3:3.12.0
+--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (*)
+--- org.junit.jupiter:junit-jupiter-api:5.10.1
| +--- org.junit:junit-bom:5.10.1
| | +--- org.junit.jupiter:junit-jupiter-api:5.10.1 (c)
| | +--- org.junit.jupiter:junit-jupiter-engine:5.10.1 (c)
| | +--- org.junit.platform:junit-platform-commons:1.10.1 (c)
| | \--- org.junit.platform:junit-platform-engine:1.10.1 (c)
| +--- org.opentest4j:opentest4j:1.3.0
| \--- org.junit.platform:junit-platform-commons:1.10.1
| \--- org.junit:junit-bom:5.10.1 (*)
\--- org.junit.jupiter:junit-jupiter-engine -> 5.10.1
+--- org.junit:junit-bom:5.10.1 (*)
+--- org.junit.platform:junit-platform-engine:1.10.1
| +--- org.junit:junit-bom:5.10.1 (*)
| +--- org.opentest4j:opentest4j:1.3.0
| \--- org.junit.platform:junit-platform-commons:1.10.1 (*)
\--- org.junit.jupiter:junit-jupiter-api:5.10.1 (*)
However, the secondary issue around transitive dependency conflicts for your library still exist. I'll leave this up to you decide whether you want to leave this open and put it in the backlog - or whether you don't care and are happy to run the risk of having multiple transitive dependency versions which may or may not conflict with each other.
Thanks once again for your time and effort surrounding the plugin. Apologies for the original issue being misleading.
from dependency-analysis-gradle-plugin.
Related Issues (20)
- Adviced to add transitive which is exposed as Kotlin default value in used lib function HOT 1
- `reason` task only shows used classes if there are no exposed classes HOT 3
- Support coreLibraryDesugaring configuration HOT 1
- Incorrect module structure advice HOT 1
- Add flag to silent the console output for the ProjectHealthTask HOT 2
- Provide modularization advice based on dependency information HOT 1
- JPMS HOT 7
- Annotations used to annotate and things (enum constants, class literals, ...) used for annotation member values should not count to ABI HOT 1
- explodeXmlSourceDebugandroidTest task fails with `Premature end of file` exception when androidTest sources include an xml file with no content HOT 3
- How to change buildHealth task's dependencies HOT 1
- How can I ignore specific flavor & build type? HOT 1
- Unable to load class 'org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunnerKt'
- CompileOnly false positive with annotations used at runtime HOT 3
- Bug: caching issues for included builds HOT 1
- Kotlin plugin must be loaded in same (or parent) classloader to DAGP: add check and print actionable error message HOT 4
- Lots of false positive under "Unused dependencies" : project doesn't compile anymore when removed HOT 1
- Please add support for TYPESAFE_PROJECT_ACCESSORS HOT 1
- Allow bundles to be configured in DependencyAnalysisSubExtension HOT 1
- Kotlin 2: bug when using associateWith: redeclaring dependencies on child configurations, leading to erroneous advice to remove or change dependencies that don't exist in build scripts HOT 11
- java.lang.NoSuchMethodError: 'com.google.common.collect.ImmutableSet com.google.common.graph.Graphs.reachableNodes(com.google.common.graph.Graph, java.lang.Object)' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dependency-analysis-gradle-plugin.