-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix accidental exclusion of a platform's dependencies
Closes gh-368
- Loading branch information
1 parent
f8c80a1
commit aa1f91d
Showing
5 changed files
with
114 additions
and
36 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
24 changes: 24 additions & 0 deletions
24
...pendencymanagement/DMPIT/dependenciesDeclaredInAPlatformAreNotAccidentallyExcluded.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,24 @@ | ||
plugins { | ||
id "java" | ||
id "io.spring.dependency-management" | ||
} | ||
|
||
repositories { | ||
maven { | ||
url file("maven-repo") | ||
} | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation(platform("test:platform-with-dependencies:1.0")) | ||
} | ||
|
||
tasks.register("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" } | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
...rces/maven-repo/test/platform-with-dependencies/1.0/platform-with-dependencies-1.0.module
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,50 @@ | ||
{ | ||
"formatVersion": "1.1", | ||
"component": { | ||
"group": "test", | ||
"module": "platform-with-dependencies", | ||
"version": "1.0", | ||
"attributes": { | ||
"org.gradle.status": "release" | ||
} | ||
}, | ||
"createdBy": { | ||
"gradle": { | ||
"version": "8.1.1" | ||
} | ||
}, | ||
"variants": [ | ||
{ | ||
"name": "apiElements", | ||
"attributes": { | ||
"org.gradle.category": "platform", | ||
"org.gradle.usage": "java-api" | ||
}, | ||
"dependencies": [ | ||
{ | ||
"group": "org.springframework", | ||
"module": "spring-core", | ||
"version": { | ||
"requires": "5.3.27" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "runtimeElements", | ||
"attributes": { | ||
"org.gradle.category": "platform", | ||
"org.gradle.usage": "java-runtime" | ||
}, | ||
"dependencies": [ | ||
{ | ||
"group": "org.springframework", | ||
"module": "spring-core", | ||
"version": { | ||
"requires": "6.0.12" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
22 changes: 22 additions & 0 deletions
22
...sources/maven-repo/test/platform-with-dependencies/1.0/platform-with-dependencies-1.0.pom
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,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<!-- This module was also published with a richer model, Gradle metadata, --> | ||
<!-- which should be used instead. Do not delete the following line which --> | ||
<!-- is to indicate to Gradle or any Gradle module metadata file consumer --> | ||
<!-- that they should prefer consuming it instead. --> | ||
<!-- do_not_remove: published-with-gradle-metadata --> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>test</groupId> | ||
<artifactId>platform-with-dependencies</artifactId> | ||
<version>1.0</version> | ||
<packaging>pom</packaging> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-core</artifactId> | ||
<version>5.3.27</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |