Skip to content

Commit ac1eb59

Browse files
committed
Got rid of duplication in gradle
CR illu
1 parent b91f9e6 commit ac1eb59

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

build.gradle

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ subprojects {
5151
}
5252
}
5353

54-
55-
compileJava {
54+
def compileTasks = {
5655
options.encoding = 'UTF-8'
5756

5857
// Makes spotlessApply task run on every compile/build.
@@ -63,16 +62,8 @@ subprojects {
6362
targetCompatibility = JavaVersion.VERSION_17
6463
}
6564

66-
compileTestJava {
67-
options.encoding = 'UTF-8'
68-
69-
// Makes spotlessApply task run on every compile/build.
70-
dependsOn 'spotlessApply'
71-
72-
// Nails the Java-Version of every Subproject
73-
sourceCompatibility = JavaVersion.VERSION_17
74-
targetCompatibility = JavaVersion.VERSION_17
75-
}
65+
compileJava(compileTasks)
66+
compileTestJava(compileTasks)
7667

7768
spotless {
7869
java {

0 commit comments

Comments
 (0)