Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consider constraints when copy configuration to determine exclusions
Closes gh-340
- Loading branch information
1 parent
1a869a8
commit 5be22d6
Showing
3 changed files
with
51 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...endencymanagement/DMPIT/exclusionsAreAppliedToDependenciesVersionedWithConstraints.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
plugins { | ||
id "io.spring.dependency-management" | ||
id "java" | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { | ||
url file("maven-repo") | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation 'test:transitive-exclude' | ||
constraints { | ||
implementation 'test:transitive-exclude:1.0' | ||
} | ||
} | ||
|
||
task resolve { | ||
doFirst { | ||
def files = project.configurations.compileClasspath.resolve() | ||
def output = new File("${buildDir}/resolved.txt") | ||
output.parentFile.mkdirs() | ||
files.collect { it.name }.each { output << "${it}\n" } | ||
} | ||
} |