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