Skip to content

Commit b7bc5c6

Browse files
committed
Simplify and Refactor build.gradle files
1 parent 30873bc commit b7bc5c6

File tree

11 files changed

+45
-45
lines changed

11 files changed

+45
-45
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
dependencies {
22
// Main-dependency needed for JUnit 5
3-
testCompile "org.junit.jupiter:junit-jupiter-api:${junit5_version}"
3+
testCompile "org.junit.jupiter:junit-jupiter-api:$junit5_version"
44

55

66
// Commons
77
testCompile project(":common")
88

99

1010
// Logging
11-
testCompile "org.slf4j:slf4j-simple:${slf4j_version}"
11+
testCompile "org.slf4j:slf4j-simple:$slf4j_version"
1212
}

01_junit_5/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
dependencies {
22
// Main-dependency needed for JUnit 5
3-
testCompile "org.junit.jupiter:junit-jupiter-api:${junit5_version}"
3+
testCompile "org.junit.jupiter:junit-jupiter-api:$junit5_version"
44

55

66
// Lagacy support for JUnit 4
7-
testCompile "org.junit.vintage:junit-vintage-engine:${junit5_vintage4_version}"
7+
testCompile "org.junit.vintage:junit-vintage-engine:$junit5_vintage4_version"
88

99

1010
// Commons
1111
testCompile project(":common")
1212

1313

1414
// Logging
15-
testCompile "org.slf4j:slf4j-simple:${slf4j_version}"
15+
testCompile "org.slf4j:slf4j-simple:$slf4j_version"
1616
}

02_assertj/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
dependencies {
22
// Main-dependency needed for JUnit 5
3-
testCompile "org.junit.jupiter:junit-jupiter-api:${junit5_version}"
3+
testCompile "org.junit.jupiter:junit-jupiter-api:$junit5_version"
44

55

66
// AssertJ
7-
testCompile "org.assertj:assertj-core:${assertj_version}"
7+
testCompile "org.assertj:assertj-core:$assertj_version"
88

99

1010
// Hamcrest for comparison
11-
testCompile "org.hamcrest:hamcrest-all:${hamcrest_version}"
11+
testCompile "org.hamcrest:hamcrest-all:$hamcrest_version"
1212

1313

1414
// Commons
1515
testCompile project(":common")
1616

1717

1818
// Logging
19-
testCompile "org.slf4j:slf4j-simple:${slf4j_version}"
19+
testCompile "org.slf4j:slf4j-simple:$slf4j_version"
2020
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
dependencies {
22
// Main-dependency needed for JUnit 5
3-
testCompile "org.junit.jupiter:junit-jupiter-api:${junit5_version}"
3+
testCompile "org.junit.jupiter:junit-jupiter-api:$junit5_version"
44

55
// Lagacy support for JUnit 4
6-
testCompile "org.junit.vintage:junit-vintage-engine:${junit5_vintage4_version}"
6+
testCompile "org.junit.vintage:junit-vintage-engine:$junit5_vintage4_version"
77

88
// Spring Boot 4
9-
compile "org.springframework.boot:spring-boot-starter-data-jpa:${spring4_boot_version}"
10-
testCompile "org.springframework.boot:spring-boot-starter-test:${spring4_boot_version}"
9+
compile "org.springframework.boot:spring-boot-starter-data-jpa:$spring4_boot_version"
10+
testCompile "org.springframework.boot:spring-boot-starter-test:$spring4_boot_version"
1111
// JUnit 5 Extension for Spring 4 Tests
12-
testCompile "com.github.sbrannen:spring-test-junit5:${junit5_spring4_test_version}"
12+
testCompile "com.github.sbrannen:spring-test-junit5:$junit5_spring4_test_version"
1313

1414

1515
// Commons
1616
testCompile project(":common")
1717

1818
// Database Drivers
19-
runtime "org.hsqldb:hsqldb:${hsqldb_driver_version}"
20-
runtime "org.postgresql:postgresql:${postgresql_driver_version}"
19+
runtime "org.hsqldb:hsqldb:$hsqldb_driver_version"
20+
runtime "org.postgresql:postgresql:$postgresql_driver_version"
2121
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
dependencies {
22
// Main-dependency needed for JUnit 5
3-
testCompile "org.junit.jupiter:junit-jupiter-api:${junit5_version}"
3+
testCompile "org.junit.jupiter:junit-jupiter-api:$junit5_version"
44
// Lagacy support for JUnit 4
5-
testCompile "org.junit.vintage:junit-vintage-engine:${junit5_vintage4_version}"
5+
testCompile "org.junit.vintage:junit-vintage-engine:$junit5_vintage4_version"
66

77

88
// Spring Boot 5
9-
compile "org.springframework.boot:spring-boot-starter-data-jpa:${spring5_boot_version}"
10-
testCompile "org.springframework.boot:spring-boot-starter-test:${spring5_boot_version}"
9+
compile "org.springframework.boot:spring-boot-starter-data-jpa:$spring5_boot_version"
10+
testCompile "org.springframework.boot:spring-boot-starter-test:$spring5_boot_version"
1111

1212

1313
// Commons
1414
testCompile project(":common")
1515

1616

1717
// Database Drivers
18-
runtime "org.hsqldb:hsqldb:${hsqldb_driver_version}"
19-
runtime "org.postgresql:postgresql:${postgresql_driver_version}"
18+
runtime "org.hsqldb:hsqldb:$hsqldb_driver_version"
19+
runtime "org.postgresql:postgresql:$postgresql_driver_version"
2020
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
dependencies {
22
// Main-dependency needed for JUnit 5
3-
testCompile "org.junit.jupiter:junit-jupiter-api:${junit5_version}"
3+
testCompile "org.junit.jupiter:junit-jupiter-api:$junit5_version"
44
// Lagacy support for JUnit 4
5-
testCompile "org.junit.vintage:junit-vintage-engine:${junit5_vintage4_version}"
5+
testCompile "org.junit.vintage:junit-vintage-engine:$junit5_vintage4_version"
66

77

88
// Spring 4
9-
compile "org.springframework.data:spring-data-jpa:${spring4_version}"
9+
compile "org.springframework.data:spring-data-jpa:$spring4_version"
1010
// JUnit 5 Extension for Spring 4 Tests
11-
testCompile "com.github.sbrannen:spring-test-junit5:${junit5_spring4_test_version}"
11+
testCompile "com.github.sbrannen:spring-test-junit5:$junit5_spring4_test_version"
1212

1313

1414
// Hibernate JPA
15-
compile "org.hibernate:hibernate-core:${hibernate_core_version}"
15+
compile "org.hibernate:hibernate-core:$hibernate_core_version"
1616

1717

1818
// Commons
1919
compile project(":common")
2020

2121

2222
// Database Drivers
23-
runtime "org.hsqldb:hsqldb:${hsqldb_driver_version}"
24-
runtime "org.postgresql:postgresql:${postgresql_driver_version}"
23+
runtime "org.hsqldb:hsqldb:$hsqldb_driver_version"
24+
runtime "org.postgresql:postgresql:$postgresql_driver_version"
2525
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
dependencies {
22
// Main-dependency needed for JUnit 5
3-
testCompile "org.junit.jupiter:junit-jupiter-api:${junit5_version}"
3+
testCompile "org.junit.jupiter:junit-jupiter-api:$junit5_version"
44
// Lagacy support for JUnit 4
5-
testCompile "org.junit.vintage:junit-vintage-engine:${junit5_vintage4_version}"
5+
testCompile "org.junit.vintage:junit-vintage-engine:$junit5_vintage4_version"
66

77

88
// Spring 5
9-
compile "org.springframework.data:spring-data-jpa:${spring5_data_jpa_version}"
10-
testCompile "org.springframework:spring-test:${spring5_version}"
9+
compile "org.springframework.data:spring-data-jpa:$spring5_data_jpa_version"
10+
testCompile "org.springframework:spring-test:$spring5_version"
1111

1212

1313
// Hibernate JPA
14-
compile "org.hibernate:hibernate-core:${hibernate_core_version}"
14+
compile "org.hibernate:hibernate-core:$hibernate_core_version"
1515

1616

1717
// Commons
1818
compile project(":common")
1919

2020

2121
// Database Drivers
22-
runtime "org.hsqldb:hsqldb:${hsqldb_driver_version}"
23-
runtime "org.postgresql:postgresql:${postgresql_driver_version}"
22+
runtime "org.hsqldb:hsqldb:$hsqldb_driver_version"
23+
runtime "org.postgresql:postgresql:$postgresql_driver_version"
2424
}

04_testfx/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
dependencies {
22
// Main-dependency needed for JUnit 5
3-
testCompile "org.junit.jupiter:junit-jupiter-api:${junit5_version}"
3+
testCompile "org.junit.jupiter:junit-jupiter-api:$junit5_version"
44

55

66
// Commons
77
testCompile project(":common")
88

99

1010
// Logging
11-
testCompile "org.slf4j:slf4j-simple:${slf4j_version}"
11+
testCompile "org.slf4j:slf4j-simple:$slf4j_version"
1212
}

05_mockito/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
dependencies {
22
// Main-dependency needed for JUnit 5
3-
testCompile "org.junit.jupiter:junit-jupiter-api:${junit5_version}"
3+
testCompile "org.junit.jupiter:junit-jupiter-api:$junit5_version"
44

55

66
// Mockito
7-
testCompile "org.mockito:mockito-core:${mockito_version}"
7+
testCompile "org.mockito:mockito-core:$mockito_version"
88

99

1010
// Commons
1111
testCompile project(":common")
1212

1313

1414
// Logging
15-
testCompile "org.slf4j:slf4j-simple:${slf4j_version}"
15+
testCompile "org.slf4j:slf4j-simple:$slf4j_version"
1616

1717
}

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ allprojects {
5555
}
5656
}
5757

58+
5859
configure(subprojects - project(":03_spring")) {
5960

6061
apply plugin: 'java'
@@ -65,7 +66,6 @@ configure(subprojects - project(":03_spring")) {
6566

6667
// Gradle-Configuration for JUnit 5 Platform
6768
junitPlatform {
68-
// platformVersion '1.0.0'
6969
filters {
7070
engines {
7171
// include 'junit-jupiter', 'junit-vintage'
@@ -79,7 +79,7 @@ configure(subprojects - project(":03_spring")) {
7979
}
8080
}
8181
dependencies {
82-
testRuntime "org.junit.jupiter:junit-jupiter-engine:${junit5_version}"
83-
testRuntime "org.junit.vintage:junit-vintage-engine:${junit5_vintage4_version}"
82+
testRuntime "org.junit.jupiter:junit-jupiter-engine:$junit5_version"
83+
testRuntime "org.junit.vintage:junit-vintage-engine:$junit5_vintage4_version"
8484
}
8585
}

0 commit comments

Comments
 (0)