Skip to content

Commit 3a45d46

Browse files
committed
Allow buildSrc to resolve Framework snapshots
Closes gh-35297
1 parent 75e9a7e commit 3a45d46

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

buildSrc/build.gradle

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,22 @@ repositories {
99
gradlePluginPortal()
1010
}
1111

12-
sourceCompatibility = 1.8
13-
targetCompatibility = 1.8
14-
15-
ext {
16-
def propertiesFile = new File(new File("$projectDir").parentFile, "gradle.properties")
17-
propertiesFile.withInputStream {
18-
def properties = new Properties()
19-
properties.load(it)
20-
set("kotlinVersion", properties["kotlinVersion"])
21-
set("springFrameworkVersion", properties["springFrameworkVersion"])
12+
new File(new File("$projectDir").parentFile, "gradle.properties").withInputStream {
13+
def properties = new Properties()
14+
properties.load(it)
15+
ext.set("kotlinVersion", properties["kotlinVersion"])
16+
ext.set("springFrameworkVersion", properties["springFrameworkVersion"])
17+
if (properties["springFrameworkVersion"].contains("-")) {
18+
repositories {
19+
maven { url "https://repo.spring.io/milestone" }
20+
maven { url "https://repo.spring.io/snapshot" }
21+
}
2222
}
2323
}
2424

25+
sourceCompatibility = 1.8
26+
targetCompatibility = 1.8
27+
2528
dependencies {
2629
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:${javaFormatVersion}"
2730

0 commit comments

Comments
 (0)