Skip to content

Commit 738ed8a

Browse files
committed
Create convention plugins and start to move java configuration to convention plugins
1 parent 9e2f4a9 commit 738ed8a

File tree

10 files changed

+42
-30
lines changed

10 files changed

+42
-30
lines changed

build.gradle.kts

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,16 @@ val javadocLinks = arrayOf(
1919
"https://docs.spring.io/spring-boot/docs/$springBootVersion/api/"
2020
)
2121

22-
allprojects {
23-
repositories {
24-
mavenCentral()
25-
}
26-
}
27-
2822
subprojects {
2923
apply(plugin = "java")
3024
apply(plugin = "jacoco")
3125
apply(plugin = "org.sonarqube")
3226
apply(plugin = "jvm-test-suite")
27+
apply(plugin = "com.mattbertolini.buildlogic.java-conventions")
3328

3429
group = "com.mattbertolini"
3530
version = "0.6.0-SNAPSHOT"
3631

37-
java {
38-
toolchain {
39-
languageVersion.set(JavaLanguageVersion.of(17))
40-
}
41-
}
42-
43-
tasks.compileJava {
44-
options.release.set(8)
45-
}
46-
4732
// sourceCompatibility = 1.8
4833

4934
dependencies {
@@ -72,14 +57,6 @@ subprojects {
7257
)
7358
}
7459
}
75-
76-
testing {
77-
suites {
78-
val test by getting(JvmTestSuite::class) {
79-
useJUnitJupiter()
80-
}
81-
}
82-
}
8360

8461
tasks.jacocoTestReport {
8562
reports {

buildSrc/settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
// buildSrc settings file. Required even if this file is empty
1+
// buildSrc settings file. Required even if this file is empty
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.mattbertolini.buildlogic
2+
3+
plugins {
4+
java
5+
jacoco
6+
}
7+
8+
java {
9+
toolchain {
10+
languageVersion.set(JavaLanguageVersion.of(17))
11+
}
12+
}
13+
14+
tasks.named<JavaCompile>("compileJava").configure {
15+
options.release.set(8)
16+
}
17+
18+
testing {
19+
suites {
20+
named<JvmTestSuite>("test").configure {
21+
useJUnitJupiter()
22+
}
23+
}
24+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.mattbertolini.buildlogic
2+
3+
plugins {
4+
`java-library`
5+
}
6+
7+
apply(plugin = "com.mattbertolini.buildlogic.java-conventions")

settings.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
rootProject.name = "spring-annotated-web-data-binder"
22

33
dependencyResolutionManagement {
4+
repositories {
5+
mavenCentral()
6+
}
7+
48
versionCatalogs {
59
register("libs") {
610
from(files("libs.versions.toml"))

spring-annotated-data-binder-core/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
`java-library`
2+
id("com.mattbertolini.buildlogic.java-library")
33
id("com.mattbertolini.build.maven-central-publish")
44
}
55

spring-webflux-annotated-data-binder/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
`java-library`
2+
id("com.mattbertolini.buildlogic.java-library")
33
id("com.mattbertolini.build.maven-central-publish")
44
}
55

spring-webmvc-annotated-data-binder/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
`java-library`
2+
id("com.mattbertolini.buildlogic.java-library")
33
id("com.mattbertolini.build.maven-central-publish")
44
}
55

webflux-annotated-data-binder-spring-boot-starter/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
`java-library`
2+
id("com.mattbertolini.buildlogic.java-library")
33
id("com.mattbertolini.build.maven-central-publish")
44
}
55

webmvc-annotated-data-binder-spring-boot-starter/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
`java-library`
2+
id("com.mattbertolini.buildlogic.java-library")
33
id("com.mattbertolini.build.maven-central-publish")
44
}
55

0 commit comments

Comments
 (0)