@@ -3,6 +3,8 @@ package com.mattbertolini.buildlogic
33plugins {
44 java
55 jacoco
6+ id(" com.mattbertolini.buildlogic.project-conventions" )
7+ id(" com.mattbertolini.buildlogic.error-prone" )
68}
79
810val versionCatalog = versionCatalogs.named(" libs" )
@@ -13,10 +15,6 @@ java {
1315 }
1416}
1517
16- tasks.named<JavaCompile >(" compileJava" ).configure {
17- options.release.set(8 )
18- }
19-
2018testing {
2119 suites {
2220 named<JvmTestSuite >(" test" ).configure {
@@ -34,30 +32,25 @@ tasks.named<Jar>("jar").configure {
3432 }
3533}
3634
37- val springVersion: String = versionCatalog.findVersion(" spring" ).orElseThrow().toString()
38- val springBootVersion: String = versionCatalog.findVersion(" springBoot" ).orElseThrow().toString()
39-
4035val javadocLinks = arrayOf(
41- " https://docs.oracle.com/javase/8 /docs/api/ " ,
42- " https://docs.oracle.com/javaee/7/api /" ,
43- " https://docs.spring.io/spring-framework/docs/$springVersion /javadoc-api/" ,
44- " https://docs.spring.io/spring-boot/docs/ $springBootVersion / api/"
36+ " https://docs.oracle.com/en/java/ javase/17 /docs/api" ,
37+ " https://jakarta.ee/specifications/platform/11/apidocs /" ,
38+ " https://docs.spring.io/spring-framework/docs/current /javadoc-api/" ,
39+ " https://docs.spring.io/spring-boot/api/java /"
4540)
4641
4742tasks.named<Javadoc >(" javadoc" ).configure {
4843 options {
4944 this as StandardJavadocDocletOptions
50- source = " 8 "
45+ source = " 17 "
5146 links(* javadocLinks)
5247 addStringOption(" Xdoclint:none" , " -quiet" )
53- if (java.toolchain.languageVersion.get().asInt() >= 9 ) {
54- addBooleanOption(" html5" , true )
55- }
48+ addBooleanOption(" html5" , true )
5649 }
5750}
5851
5952val jacocoVersion: String = versionCatalog.findVersion(" jacoco" ).orElseThrow().toString()
60- configure< JacocoPluginExtension > {
53+ jacoco {
6154 toolVersion = jacocoVersion
6255}
6356
@@ -69,4 +62,6 @@ tasks.named<JacocoReport>("jacocoTestReport").configure {
6962 }
7063}
7164
72- tasks.test { finalizedBy(tasks.jacocoTestReport) }
65+ tasks.named(" test" ).configure {
66+ finalizedBy(tasks.named(" jacocoTestReport" ))
67+ }
0 commit comments