1- import java.util.Calendar
21import org.jreleaser.model.Active.*
2+ import java.util.*
33
44plugins {
55 `java- library`
66 `maven- publish`
77 jacoco
88 idea
99 antlr
10- id(" org.cadixdev.licenser " ) version " 0.6.1 "
10+ id(" cloud.rio.license " ) version " 0.18.0 "
1111 id(" me.qoomon.git-versioning" ) version " 6.4.4"
1212 id(" io.freefair.javadoc-links" ) version " 9.2.0"
1313 id(" io.freefair.javadoc-utf-8" ) version " 9.2.0"
1414 id(" io.freefair.lombok" ) version " 9.2.0"
15- id(" io.freefair.maven-central.validate-poms" ) version " 9.2.0"
15+ // id("io.freefair.maven-central.validate-poms") version "9.2.0"
1616 id(" com.github.ben-manes.versions" ) version " 0.53.0"
1717 id(" ru.vyarus.pom" ) version " 3.0.0"
1818 id(" org.jreleaser" ) version " 1.21.0"
1919 id(" org.sonarqube" ) version " 7.2.2.6593"
20- id(" me.champeau.gradle. jmh" ) version " 0.5 .3"
20+ id(" me.champeau.jmh" ) version " 0.7 .3"
2121}
2222
2323repositories {
@@ -50,23 +50,26 @@ gitVersioning.apply {
5050}
5151
5252dependencies {
53- antlr(" io.github.1c-syntax" , " antlr4" , " 0.2.0" )
54-
55- // stat analysis
56- compileOnly(" com.github.spotbugs" , " spotbugs-annotations" , " 4.8.6" )
53+ antlr(" io.github.1c-syntax:antlr4:0.3.0" )
5754
5855 // testing
59- testImplementation(" io.github.1c-syntax" , " bsl-parser-testing" , " 0.4.0" )
56+ testImplementation(" io.github.1c-syntax:bsl-parser-testing:0.5.0" ) {
57+ exclude(" org.antlr:antlr-runtime" )
58+ exclude(" org.antlr:ST4" )
59+ }
60+
61+ testImplementation(platform(" org.junit:junit-bom:6.0.3" ))
62+ testImplementation(" org.junit.jupiter:junit-jupiter-api" )
63+ testImplementation(" org.junit.jupiter:junit-jupiter-params" )
64+ testImplementation(" org.assertj:assertj-core:3.27.7" )
6065
61- testImplementation(" org.junit.jupiter" , " junit-jupiter-api" , " 5.11.4" )
62- testImplementation(" org.junit.jupiter" , " junit-jupiter-engine" , " 5.11.4" )
63- testImplementation(" org.junit.jupiter" , " junit-jupiter-params" , " 5.11.4" )
64- testImplementation(" org.assertj" , " assertj-core" , " 3.27.0" )
66+ testRuntimeOnly(" org.junit.jupiter:junit-jupiter-engine" )
67+ testRuntimeOnly(" org.junit.platform:junit-platform-launcher" )
6568}
6669
6770java {
68- sourceCompatibility = JavaVersion .VERSION_17
69- targetCompatibility = JavaVersion .VERSION_17
71+ sourceCompatibility = JavaVersion .VERSION_21
72+ targetCompatibility = JavaVersion .VERSION_21
7073 withSourcesJar()
7174 withJavadocJar()
7275}
@@ -118,7 +121,7 @@ idea {
118121
119122jmh {
120123 jvmArgsAppend = listOf (" -XX:+UseParallelGC" )
121- isIncludeTests = true
124+ includeTests.set( true )
122125 duplicateClassesStrategy = DuplicatesStrategy .WARN
123126 timeUnit = " s"
124127}
@@ -134,12 +137,12 @@ tasks.generateGrammarSource {
134137 outputDirectory = file(" src/main/gen/com/github/_1c_syntax/bsl/parser" )
135138}
136139
137- tasks.updateLicenseMain {
140+ tasks.licenseFormatMain {
138141 mustRunAfter(tasks.generateGrammarSource)
139142}
140143
141- tasks.checkLicenseMain {
142- dependsOn(tasks.updateLicenseMain )
144+ tasks.licenseMain {
145+ dependsOn(tasks.licenseFormatMain )
143146}
144147
145148tasks.test {
@@ -173,18 +176,16 @@ tasks.javadoc {
173176}
174177
175178license {
176- header(rootProject.file(" license/HEADER.txt" ))
177- newLine(false )
179+ header = rootProject.file(" license/HEADER.txt" )
180+ skipExistingHeaders = false
181+ strictCheck = true
182+ mapping(" java" , " SLASHSTAR_STYLE" )
178183 ext[" year" ] = " 2018-" + Calendar .getInstance().get(Calendar .YEAR )
179184 ext[" name" ] =
180- " Alexey Sosnoviy <labotamy@gmail.com>, Nikita Fedkin <nixel2007@gmail.com>, Sergey Batanov <sergey.batanov@dmpas.ru>"
185+ " Alexey Sosnoviy <labotamy@gmail.com>, Nikita Fedkin <nixel2007@gmail.com>, " +
186+ " Sergey Batanov <sergey.batanov@dmpas.ru>"
181187 ext[" project" ] = " BSL Parser"
182- exclude(" **/*.tokens" )
183- exclude(" **/*.interp" )
184- exclude(" **/*.g4" )
185- exclude(" **/*.bsl" )
186- exclude(" **/*.orig" )
187- exclude(" **/*.gitkeep" )
188+ include(" **/*.java" )
188189}
189190
190191tasks.clean {
@@ -201,7 +202,10 @@ sonar {
201202 property(" sonar.projectKey" , " 1c-syntax_bsl-parser" )
202203 property(" sonar.projectName" , " BSL Parser" )
203204 property(" sonar.scm.exclusions.disabled" , " true" )
204- property(" sonar.coverage.jacoco.xmlReportPaths" , " ${layout.buildDirectory.get()} /reports/jacoco/test/jacoco.xml" )
205+ property(
206+ " sonar.coverage.jacoco.xmlReportPaths" ,
207+ " ${layout.buildDirectory.get()} /reports/jacoco/test/jacoco.xml"
208+ )
205209 }
206210}
207211
0 commit comments