Merge branch '3.1.x'

Closes gh-38233
This commit is contained in:
Andy Wilkinson
2023-11-06 14:26:09 +00:00
4 changed files with 41 additions and 31 deletions

View File

@@ -1,16 +0,0 @@
plugins {
id 'org.springframework.boot' version '{version}'
id 'java'
}
springBoot {
mainClass = "com.example.Main"
}
gradle.taskGraph.whenReady {
def attributes = configurations.findByName('productionRuntimeClasspath').attributes
println "${attributes.keySet().size()} productionRuntimeClasspath attributes:"
attributes.keySet().each { attribute ->
println " ${attribute}: ${attributes.getAttribute(attribute)}"
}
}

View File

@@ -0,0 +1,22 @@
def collectAttributes(String configurationName) {
def attributes = configurations.findByName(configurationName).attributes
def keys = new TreeSet<>((a1, a2) -> a1.name.compareTo(a2.name))
keys.addAll(attributes.keySet())
keys.collect { key -> "${key}: ${attributes.getAttribute(key)}" }
}
plugins {
id 'org.springframework.boot' version '{version}'
id 'java'
}
springBoot {
mainClass = "com.example.Main"
}
gradle.taskGraph.whenReady {
def runtimeClasspathAttributes = collectAttributes("runtimeClasspath")
def productionRuntimeClasspathAttributes = collectAttributes("productionRuntimeClasspath")
println("runtimeClasspath: ${runtimeClasspathAttributes}")
println("productionRuntimeClasspath: ${productionRuntimeClasspathAttributes}")
}