@@ -7,17 +7,17 @@ plugins {
77 `java- library`
88 `maven- publish`
99 jacoco
10- id(" cloud.rio.license " ) version " 0.18.0 "
10+ id(" com.diffplug.spotless " ) version " 7.0.4 "
1111 id(" me.qoomon.git-versioning" ) version " 6.4.4"
12- id(" io.freefair.lombok" ) version " 9.1 .0"
13- id(" io.freefair.javadoc-links" ) version " 9.1 .0"
14- id(" io.freefair.javadoc-utf-8" ) version " 9.1 .0"
15- id(" io.freefair.aspectj.post-compile-weaving" ) version " 9.1 .0"
12+ id(" io.freefair.lombok" ) version " 9.2 .0"
13+ id(" io.freefair.javadoc-links" ) version " 9.2 .0"
14+ id(" io.freefair.javadoc-utf-8" ) version " 9.2 .0"
15+ id(" io.freefair.aspectj.post-compile-weaving" ) version " 9.2 .0"
1616 // id("io.freefair.maven-central.validate-poms") version "9.0.0" // TODO: Re-enable when compatible with Gradle 9
1717 id(" com.github.ben-manes.versions" ) version " 0.53.0"
18- id(" org.springframework.boot" ) version " 3.5.9 "
18+ id(" org.springframework.boot" ) version " 4.0.1 "
1919 id(" io.spring.dependency-management" ) version " 1.1.7"
20- id(" io.sentry.jvm.gradle" ) version " 5.12.2 "
20+ id(" io.sentry.jvm.gradle" ) version " 6.0.0-rc.1 "
2121 id(" io.github.1c-syntax.bslls-dev-tools" ) version " 0.8.1"
2222 id(" ru.vyarus.pom" ) version " 3.0.0"
2323 id(" org.jreleaser" ) version " 1.21.0"
@@ -38,21 +38,21 @@ gitVersioning.apply {
3838 refs {
3939 describeTagFirstParent = false
4040 tag(" v(?<tagVersion>[0-9].*)" ) {
41- version = " \ $ {ref.tagVersion}\ $ {dirty}"
41+ version = $$ " ${ref.tagVersion}${dirty} "
4242 }
4343
4444 branch(" develop" ) {
45- version = " \ $ {describe.tag.version}." +
46- " \ $ {describe.distance}-SNAPSHOT\ $ {dirty}"
45+ version = $$ " ${describe.tag.version} ." +
46+ $$ " ${describe.distance} -SNAPSHOT${dirty} "
4747 }
4848
4949 branch(" .+" ) {
50- version = " \ $ {ref}-\ $ {commit.short}\ $ {dirty}"
50+ version = $$ " ${ref} -${commit.short}${dirty} "
5151 }
5252 }
5353
5454 rev {
55- version = " \ $ {commit.short}\ $ {dirty}"
55+ version = $$ " ${commit.short}${dirty} "
5656 }
5757}
5858
@@ -82,14 +82,14 @@ dependencies {
8282 api(" org.eclipse.lsp4j" , " org.eclipse.lsp4j.websocket.jakarta" , " 0.24.0" )
8383
8484 // 1c-syntax
85- api(" io.github.1c-syntax" , " bsl-parser" , " 0.29 .0" ) {
85+ api(" io.github.1c-syntax" , " bsl-parser" , " 0.30 .0" ) {
8686 exclude(" com.ibm.icu" , " *" )
8787 exclude(" org.antlr" , " ST4" )
8888 exclude(" org.antlr" , " antlr-runtime" )
8989 }
9090 api(" io.github.1c-syntax" , " utils" , " 0.6.8" )
91- api(" io.github.1c-syntax" , " mdclasses" , " 0.17.2 " )
92- api(" io.github.1c-syntax" , " bsl-common-library" , " 0.9.1 " )
91+ api(" io.github.1c-syntax" , " mdclasses" , " 0.17.4 " )
92+ api(" io.github.1c-syntax" , " bsl-common-library" , " 0.9.2 " )
9393 api(" io.github.1c-syntax" , " supportconf" , " 0.15.0" )
9494
9595 // nullability annotations
@@ -113,7 +113,7 @@ dependencies {
113113 }
114114
115115 // AOP
116- implementation(" org.aspectj" , " aspectjrt" , " 1.9.25" )
116+ implementation(" org.aspectj" , " aspectjrt" , " 1.9.25.1 " )
117117
118118 // commons utils
119119 implementation(" commons-io" , " commons-io" , " 2.21.0" )
@@ -129,8 +129,8 @@ dependencies {
129129 implementation(" me.tongfei" , " progressbar" , " 0.10.1" )
130130
131131 // (de)serialization
132- implementation(" com.fasterxml. jackson.datatype :jackson-datatype-jsr310 " )
133- implementation(" com.fasterxml .jackson.dataformat:jackson-dataformat-xml" )
132+ implementation(" tools. jackson.core :jackson-databind " )
133+ implementation(" tools .jackson.dataformat:jackson-dataformat-xml" )
134134 implementation(" io.leangen.geantyref:geantyref:2.0.1" )
135135
136136 // graphs
@@ -193,9 +193,21 @@ tasks.bootJar {
193193 archiveClassifier.set(" exec" )
194194}
195195
196- tasks.named(" sourcesJar" ) {
197- dependsOn(tasks.generateSentryDebugMetaPropertiesjava)
198- dependsOn(tasks.collectExternalDependenciesForSentry)
196+ afterEvaluate {
197+ tasks.named(" spotlessJavaCheck" ) {
198+ dependsOn(tasks.generateSentryDebugMetaPropertiesjava)
199+ dependsOn(tasks.collectExternalDependenciesForSentry)
200+ }
201+
202+ tasks.named(" spotlessJavaApply" ) {
203+ dependsOn(tasks.generateSentryDebugMetaPropertiesjava)
204+ dependsOn(tasks.collectExternalDependenciesForSentry)
205+ }
206+
207+ tasks.named(" sourcesJar" ) {
208+ dependsOn(tasks.generateSentryDebugMetaPropertiesjava)
209+ dependsOn(tasks.collectExternalDependenciesForSentry)
210+ }
199211}
200212
201213tasks.build {
@@ -248,16 +260,6 @@ tasks.check {
248260 mustRunAfter(tasks.generateDiagnosticDocs)
249261}
250262
251- tasks.named(" licenseMain" ) {
252- dependsOn(tasks.generateSentryDebugMetaPropertiesjava)
253- dependsOn(tasks.collectExternalDependenciesForSentry)
254- }
255-
256- tasks.named(" licenseFormatMain" ) {
257- dependsOn(tasks.generateSentryDebugMetaPropertiesjava)
258- dependsOn(tasks.collectExternalDependenciesForSentry)
259- }
260-
261263tasks.jacocoTestReport {
262264 reports {
263265 xml.required.set(true )
@@ -269,6 +271,14 @@ jmh {
269271 jmhVersion = " 1.37"
270272}
271273
274+ sentry {
275+ org.set(" 1c-syntax" )
276+ projectName.set(" bsl-language-server" )
277+
278+ // Включить source context только при наличии токена аутентификации
279+ includeSourceContext = System .getenv(" SENTRY_AUTH_TOKEN" ) != null
280+ }
281+
272282tasks.processResources {
273283 filteringCharset = " UTF-8"
274284 // native2ascii gradle replacement
@@ -307,23 +317,11 @@ tasks.javadoc {
307317 }
308318}
309319
310- license {
311- header = rootProject.file(" license/HEADER.txt" )
312- skipExistingHeaders = false
313- strictCheck = true
314- ext[" year" ] = " 2018-" + Calendar .getInstance().get(Calendar .YEAR )
315- ext[" name" ] = " Alexey Sosnoviy <labotamy@gmail.com>, Nikita Fedkin <nixel2007@gmail.com>"
316- ext[" project" ] = " BSL Language Server"
317- mapping(" java" , " SLASHSTAR_STYLE" )
318- exclude(" **/*.properties" )
319- exclude(" **/*.xml" )
320- exclude(" **/*.json" )
321- exclude(" **/*.bsl" )
322- exclude(" **/*.os" )
323- exclude(" **/*.txt" )
324- exclude(" **/*.java.orig" )
325- exclude(" **/*.impl" )
326- exclude(" **/*.mockito.plugins.MockMaker" )
320+ spotless {
321+ java {
322+ targetExclude(" **/AbstractObjectPool.java" )
323+ licenseHeaderFile(rootProject.file(" license/HEADER.txt" ), " package " ).updateYearWithLatest(true )
324+ }
327325}
328326
329327sonarqube {
@@ -453,9 +451,9 @@ tasks.withType<GenerateModuleMetadata> {
453451}
454452
455453tasks.register(" updateLicenses" ) {
456- description = " Wrapper for licenseFormat "
454+ description = " Wrapper for spotlessApply "
457455 group = " license"
458- dependsOn(tasks.licenseFormat )
456+ dependsOn(tasks.spotlessApply )
459457}
460458
461459fun buildTime (): String {
0 commit comments