11plugins {
22 id " java"
33 id " scala"
4- id " io.quarkus"
4+ id " io.quarkus" version " 3.28.2 "
55 id ' cz.augi.gradle.scalafmt' version ' 1.21.5'
66 id ' io.github.cosmicsilence.scalafix' version ' 0.2.5'
77 id " com.github.ben-manes.versions" version " 0.53.0"
@@ -11,10 +11,11 @@ plugins {
1111repositories {
1212 mavenCentral()
1313 mavenLocal()
14+ gradlePluginPortal()
1415}
1516
1617def VERSIONS = [
17- QUARKUS : " 3.26.3 " ,
18+ QUARKUS : " 3.28.2 " ,
1819 QUARKUS_SCALA3 : " 1.0.0" ,
1920 SCALA3 : " 3.7.3" ,
2021 MAGNUM : " 1.3.1" ,
@@ -65,8 +66,8 @@ dependencies {
6566 implementation " com.augustnagro:magnum_3:${ VERSIONS.MAGNUM} "
6667}
6768
68- group " org.acme"
69- version " 1.0.0-SNAPSHOT"
69+ group = " org.acme"
70+ version = " 1.0.0-SNAPSHOT"
7071
7172java {
7273 sourceCompatibility = JavaVersion . VERSION_21
@@ -89,32 +90,34 @@ test {
8990 exclude ' **/*IT*'
9091}
9192
92- compileJava {
93- options. encoding = " UTF-8"
94- options. compilerArgs << " -parameters"
93+ // Configure Java compile tasks lazily to avoid classloader/name collisions
94+ // (some plugins may register Named objects that conflict with direct task properties)
95+ tasks. withType(org.gradle.api.tasks.compile.JavaCompile ). configureEach {
96+ options. encoding = ' UTF-8'
9597}
9698
97- compileTestJava {
98- options. encoding = " UTF-8"
99+ // Only the main compile task needs the -parameters flag
100+ tasks. named(' compileJava' , org.gradle.api.tasks.compile.JavaCompile ). configure {
101+ options. compilerArgs << ' -parameters'
99102}
100103
101104scalafix {
102105 ignoreSourceSets = [ ' quarkus-generated-sources' , ' quarkus-test-generated-sources' ]
103106}
104107
105108testlogger {
106- theme ' mocha'
107- slowThreshold 5000
109+ theme = ' mocha'
110+ slowThreshold = 5000
108111}
109112
110113// Custom Tasks (run with ./gradlew lint, ./gradlew deps)
111114task lint (type : GradleBuild ) {
112- group ' Custom project tasks'
113- description ' Run code linting tasks (scalafmt, scalafix, etc)'
115+ group = ' Custom project tasks'
116+ description = ' Run code linting tasks (scalafmt, scalafix, etc)'
114117 tasks = [' scalafmt' , ' scalafix' ]
115118}
116119task deps (type : GradleBuild ) {
117- group ' Custom project tasks'
118- description ' Check for dependency updates'
120+ group = ' Custom project tasks'
121+ description = ' Check for dependency updates'
119122 tasks = [' dependencyUpdates' ]
120123}
0 commit comments