@@ -10,52 +10,54 @@ repositories {
10
10
gradlePluginPortal()
11
11
}
12
12
13
- new File (new File (" $projectDir " ). parentFile, " gradle.properties" ). withInputStream {
13
+ sourceCompatibility = 17
14
+ targetCompatibility = 17
15
+
16
+ def versions = [:]
17
+ new File (projectDir. parentFile, " gradle.properties" ). withInputStream {
14
18
def properties = new Properties ()
15
19
properties. load(it)
16
- ext. set(" kotlinVersion" , properties[" kotlinVersion" ])
17
- ext. set(" springFrameworkVersion" , properties[" springFrameworkVersion" ])
18
- if (properties[" springFrameworkVersion" ]. contains(" -" )) {
19
- repositories {
20
- maven { url " https://repo.spring.io/milestone" }
21
- maven { url " https://repo.spring.io/snapshot" }
22
- }
20
+ [" assertj" , " commonsCodec" , " hamcrest" , " jackson" , " junitJupiter" ,
21
+ " kotlin" , " maven" , " springFramework" ]. each {
22
+ versions[it] = properties[it + " Version" ]
23
+ }
24
+ }
25
+ ext. set(" versions" , versions)
26
+ if (versions. springFramework. contains(" -" )) {
27
+ repositories {
28
+ maven { url " https://repo.spring.io/milestone" }
29
+ maven { url " https://repo.spring.io/snapshot" }
23
30
}
24
31
}
25
-
26
- sourceCompatibility = 17
27
- targetCompatibility = 17
28
32
29
33
dependencies {
30
34
checkstyle " io.spring.javaformat:spring-javaformat-checkstyle:${ javaFormatVersion} "
31
35
32
- implementation(platform(" org.springframework:spring-framework-bom:${ springFrameworkVersion } " ))
36
+ implementation(platform(" org.springframework:spring-framework-bom:${ versions.springFramework } " ))
33
37
implementation(" com.diffplug.gradle:goomph:3.37.2" )
34
- implementation(" com.fasterxml.jackson.core:jackson-databind:2.11.4 " )
38
+ implementation(" com.fasterxml.jackson.core:jackson-databind:${ versions.jackson } " )
35
39
implementation(" com.gradle:gradle-enterprise-gradle-plugin:3.12.1" )
36
40
implementation(" com.tngtech.archunit:archunit:1.0.0" )
37
- implementation(" de.undercouch.download:de.undercouch.download.gradle.plugin:5.5.0" )
38
- implementation(" commons-codec:commons-codec:1.13" )
41
+ implementation(" commons-codec:commons-codec:${ versions.commonsCodec} " )
39
42
implementation(" io.spring.javaformat:spring-javaformat-gradle-plugin:${ javaFormatVersion} " )
40
- implementation(" org.apache.maven:maven-embedder:3.6.3 " )
43
+ implementation(" org.apache.maven:maven-embedder:${ versions.maven } " )
41
44
implementation(" org.asciidoctor:asciidoctor-gradle-jvm:3.3.2" )
42
- implementation(" org.jetbrains.kotlin:kotlin-gradle-plugin:${ kotlinVersion } " )
43
- implementation(" org.jetbrains.kotlin:kotlin-compiler-embeddable:${ kotlinVersion } " )
45
+ implementation(" org.jetbrains.kotlin:kotlin-gradle-plugin:${ versions.kotlin } " )
46
+ implementation(" org.jetbrains.kotlin:kotlin-compiler-embeddable:${ versions.kotlin } " )
44
47
implementation(" org.springframework:spring-context" )
45
48
implementation(" org.springframework:spring-core" )
46
49
implementation(" org.springframework:spring-web" )
47
50
48
- testImplementation(" org.apache.logging.log4j:log4j-core:2.17.1" )
49
- testImplementation(" org.assertj:assertj-core:3.11.1" )
50
- testImplementation(" org.hamcrest:hamcrest:2.2" )
51
- testImplementation(" org.junit.jupiter:junit-jupiter:5.6.0" )
51
+ testImplementation(" org.assertj:assertj-core:${ versions.assertj} " )
52
+ testImplementation(" org.hamcrest:hamcrest:${ versions.hamcrest} " )
53
+ testImplementation(" org.junit.jupiter:junit-jupiter:${ versions.junitJupiter} " )
52
54
testImplementation(" org.springframework:spring-test" )
53
55
54
56
testRuntimeOnly(" org.junit.platform:junit-platform-launcher" )
55
57
}
56
58
57
59
checkstyle {
58
- toolVersion = 8.11
60
+ toolVersion = " 10.12.4 "
59
61
}
60
62
61
63
gradlePlugin {
@@ -65,8 +67,8 @@ gradlePlugin {
65
67
implementationClass = " org.springframework.boot.build.processors.AnnotationProcessorPlugin"
66
68
}
67
69
architecturePlugin {
68
- id = " org.springframework.boot.architecture"
69
- implementationClass = " org.springframework.boot.build.architecture.ArchitecturePlugin"
70
+ id = " org.springframework.boot.architecture"
71
+ implementationClass = " org.springframework.boot.build.architecture.ArchitecturePlugin"
70
72
}
71
73
autoConfigurationPlugin {
72
74
id = " org.springframework.boot.auto-configuration"
0 commit comments