Exclude developmentOnly dependences from AOT processing classpaths

Fixes gh-35433
This commit is contained in:
Andy Wilkinson
2023-05-16 09:26:20 +01:00
parent 25375679e6
commit c39a37cd23
4 changed files with 75 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
plugins {
id 'org.springframework.boot' version '{version}'
id 'java'
}
apply plugin: 'org.springframework.boot.aot'
repositories {
mavenCentral()
}
dependencies {
developmentOnly("org.apache.commons:commons-lang3:3.12.0")
}
task('processAotClasspath') {
doFirst {
tasks.processAot.classpath.each { println it }
}
}

View File

@@ -0,0 +1,31 @@
plugins {
id 'org.springframework.boot' version '{version}'
id 'java'
}
apply plugin: 'org.springframework.boot.aot'
repositories {
mavenCentral()
maven { url 'file:repository' }
}
configurations.all {
resolutionStrategy {
eachDependency {
if (it.requested.group == 'org.springframework.boot') {
it.useVersion project.bootVersion
}
}
}
}
dependencies {
developmentOnly("org.apache.commons:commons-lang3:3.12.0")
}
task('processTestAotClasspath') {
doFirst {
tasks.processTestAot.classpath.each { println it }
}
}