Skip to content

Commit 78cb3fe

Browse files
committed
Обновление JDK и API
1 parent bdb2ede commit 78cb3fe

19 files changed

+149
-117
lines changed

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
java_version: ['17', '21']
11+
java_version: ['21', '25']
1212
os: [ubuntu-latest, windows-latest, macOS-latest]
1313
steps:
1414
- uses: actions/checkout@v6

.github/workflows/night_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up JDK
2020
uses: actions/setup-java@v5
2121
with:
22-
java-version: 17
22+
java-version: 21
2323
distribution: 'adopt'
2424
- name: Build with Gradle
2525
run: ./gradlew build

.github/workflows/pluginTest.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ jobs:
88
steps:
99
- uses: actions/checkout@v6
1010

11-
- name: Set up JDK 17
11+
- name: Set up JDK
1212
uses: actions/setup-java@v5
1313
with:
14-
java-version: '17'
15-
distribution: 'adopt'
14+
java-version: '21'
15+
distribution: 'temurin'
1616
cache: 'gradle'
1717

1818
- name: Build Plugin
@@ -41,16 +41,18 @@ jobs:
4141
repository: '1c-syntax/ssl_3_1'
4242
path: 'target-project'
4343

44-
- name: Run Sonar Scanner
44+
- name: Install Sonar scanner
45+
run: npm install -g sonar-scanner
46+
47+
- name: SonarQube Scan
4548
run: |
46-
docker run --rm --network="host" -v "$(pwd)/target-project:/usr/src" \
47-
sonarsource/sonar-scanner-cli \
48-
-Dsonar.projectKey=test-project \
49-
-Dsonar.sources=. \
50-
-Dsonar.host.url=http://localhost:9000 \
51-
-Dsonar.token=${{ env.SONAR_TOKEN }} \
52-
-Dsonar.lang.patterns.bsl=**/*.bsl,**/*.os \
53-
-Dsonar.scm.disabled=true
49+
sonar-scanner \
50+
-Dsonar.projectKey=test-project \
51+
-Dsonar.sources=target-project \
52+
-Dsonar.host.url=http://localhost:9000 \
53+
-Dsonar.token=${{ env.SONAR_TOKEN }} \
54+
-Dsonar.lang.patterns.bsl=**/*.bsl,**/*.os \
55+
-Dsonar.scm.disabled=true
5456
5557
- name: Server Logs on Failure
5658
if: failure()

.github/workflows/qa.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
fetch-depth: ''
1717
- run: |
1818
git fetch --prune --unshallow
19-
- name: Set up JDK 17
19+
- name: Set up JDK 21
2020
uses: actions/setup-java@v5
2121
with:
22-
java-version: 17
22+
java-version: 21
2323
distribution: 'adopt'
2424
- name: SonarCloud Scan
2525
run: ./gradlew check sonar

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up JDK
1717
uses: actions/setup-java@v5
1818
with:
19-
java-version: 17
19+
java-version: 21
2020
distribution: 'adopt'
2121
- name: Build with Gradle
2222
run: ./gradlew build

.github/workflows/update-gradle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v6
1414

15-
- name: Set up JDK 17
15+
- name: Set up JDK 21
1616
uses: actions/setup-java@v5
1717
with:
18-
java-version: 17
18+
java-version: 21
1919
distribution: 'temurin'
2020
cache: gradle
2121

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ English version -> https://1c-syntax.github.io/sonar-bsl-plugin-community/en/
2020

2121
| Версия SonarQube | Версия плагина | Версия JAVA |
2222
|------------------|-----------------|-------------|
23-
| 25.1+ | 1.15.2+ | 17 |
24-
| 9.9+ | 1.13.0+ | 17 |
23+
| 25.4+ | 1.18.0+ | 21 |
24+
| 25.1+ | 1.15.2...1.17.2 | 17 |
25+
| 9.9+ | 1.13.0...1.17.2 | 17 |
2526
| 8.9+ | 1.11.0...1.12.0 | 11 |
2627
| 7.9+ | 0.7.0....1.10.0 | 11 |
2728
| 7.4 - 7.8 | 0.1.0....0.6.0 | 8 |

build.gradle.kts

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,39 +21,44 @@ repositories {
2121
maven("https://central.sonatype.com/repository/maven-snapshots")
2222
}
2323

24-
val sonarQubeVersion = "9.9.0.65466"
24+
val sonarQubeVersion = "25.4.0.105899"
25+
val commonmarkVersion = "0.27.1"
2526

2627
dependencies {
27-
compileOnly("org.sonarsource.api.plugin", "sonar-plugin-api", "9.14.0.375")
28+
compileOnly("org.sonarsource.api.plugin", "sonar-plugin-api", "11.3.0.2824")
2829

2930
implementation("io.github.1c-syntax", "bsl-language-server", "0.28.5") {
3031
exclude("com.contrastsecurity", "java-sarif")
3132
exclude("io.sentry", "sentry-logback")
3233
exclude("info.picocli", "picocli-spring-boot-starter")
3334
exclude("me.tongfei", "progressbar")
3435
}
35-
implementation("org.sonarsource.analyzer-commons", "sonar-analyzer-commons", "2.5.0.1358")
36+
implementation("org.sonarsource.analyzer-commons", "sonar-analyzer-commons", "2.21.0.4626")
3637

3738
// MD to HTML converter of BSL LS rule descriptions
38-
implementation("org.commonmark", "commonmark", "0.24.0")
39-
implementation("org.commonmark", "commonmark-ext-gfm-tables", "0.24.0")
40-
implementation("org.commonmark", "commonmark-ext-autolink", "0.24.0")
41-
implementation("org.commonmark", "commonmark-ext-heading-anchor", "0.24.0")
42-
43-
testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.11.4")
44-
testImplementation("org.assertj", "assertj-core", "3.27.0")
45-
testImplementation("org.mockito", "mockito-core", "5.14.2")
46-
testImplementation("org.sonarsource.sonarqube", "sonar-testing-harness", sonarQubeVersion)
47-
testImplementation("org.sonarsource.sonarqube", "sonar-core", sonarQubeVersion)
39+
implementation("org.commonmark", "commonmark", commonmarkVersion)
40+
implementation("org.commonmark", "commonmark-ext-gfm-tables", commonmarkVersion)
41+
implementation("org.commonmark", "commonmark-ext-autolink", commonmarkVersion)
42+
implementation("org.commonmark", "commonmark-ext-heading-anchor", commonmarkVersion)
43+
44+
testImplementation("org.junit.jupiter", "junit-jupiter-api", "6.0.3")
45+
testImplementation("org.assertj", "assertj-core", "3.27.7")
46+
testImplementation("org.mockito", "mockito-core", "5.21.0")
47+
testImplementation("org.sonarsource.sonarqube", "sonar-testing-harness", sonarQubeVersion) {
48+
exclude("org.sonarsource.sonarqube", "sonar-sarif")
49+
}
50+
testImplementation("org.sonarsource.sonarqube", "sonar-core", sonarQubeVersion) {
51+
exclude("org.sonarsource.sonarqube", "sonar-sarif")
52+
}
4853
testImplementation("org.reflections", "reflections", "0.10.2")
4954

50-
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", "5.11.4")
51-
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.11.4")
55+
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", "6.0.3")
56+
testRuntimeOnly("org.junit.platform", "junit-platform-launcher", "6.0.3")
5257
}
5358

5459
java {
55-
sourceCompatibility = JavaVersion.VERSION_17
56-
targetCompatibility = JavaVersion.VERSION_17
60+
sourceCompatibility = JavaVersion.VERSION_21
61+
targetCompatibility = JavaVersion.VERSION_21
5762
}
5863

5964
tasks.withType<JavaCompile> {
@@ -127,7 +132,6 @@ tasks.jar {
127132
attributes["Plugin-Developers"] = "Alexey Sosnoviy, Nikita Fedkin"
128133

129134
attributes["SonarLint-Supported"] = false
130-
attributes["Sonar-Version"] = sonarQubeVersion
131135

132136
attributes["Plugin-Organization"] = "1c-syntax"
133137
attributes["Plugin-OrganizationUrl"] = "https://github.com/1c-syntax"

lombok.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
lombok.anyConstructor.addConstructorProperties=true
22
lombok.addLombokGeneratedAnnotation=true
3+
lombok.log.fieldName=LOGGER

src/main/java/com/github/_1c_syntax/bsl/sonar/BSLCommunityProperties.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import lombok.experimental.UtilityClass;
2727
import org.sonar.api.PropertyType;
2828
import org.sonar.api.config.PropertyDefinition;
29-
import org.sonar.api.resources.Qualifiers;
3029

3130
import java.util.Arrays;
3231
import java.util.List;
@@ -69,14 +68,12 @@ public static List<PropertyDefinition> getProperties() {
6968
LANG_SERVER_DIAGNOSTIC_LANGUAGE_DEFAULT_VALUE)
7069
.type(PropertyType.SINGLE_SELECT_LIST)
7170
.options(Language.RU.getLanguageCode(), Language.EN.getLanguageCode())
72-
.onQualifiers(Qualifiers.APP, Qualifiers.PROJECT)
7371
.build(),
7472
PropertyDefinitionUtils.newPropertyBuilderBSL(1,
7573
LANG_SERVER_ENABLED_KEY,
7674
"enabled",
7775
LANG_SERVER_ENABLED_DEFAULT_VALUE.toString())
7876
.type(PropertyType.BOOLEAN)
79-
.onQualifiers(Qualifiers.PROJECT)
8077
.build(),
8178
PropertyDefinitionUtils.newPropertyBuilderBSL(2,
8279
LANG_SERVER_COMPUTE_DIAGNOSTICS_SKIP_SUPPORT_KEY,
@@ -87,49 +84,42 @@ public static List<PropertyDefinition> getProperties() {
8784
.map(value -> value.name().toLowerCase(Locale.ENGLISH).replace("_", " "))
8885
.toList()
8986
)
90-
.onQualifiers(Qualifiers.PROJECT)
9187
.build(),
9288
PropertyDefinitionUtils.newPropertyBuilderBSL(3,
9389
LANG_SERVER_OVERRIDE_CONFIGURATION_KEY,
9490
"overrideConfiguration",
9591
LANG_SERVER_OVERRIDE_CONFIGURATION_DEFAULT_VALUE.toString())
9692
.type(PropertyType.BOOLEAN)
97-
.onQualifiers(Qualifiers.PROJECT)
9893
.build(),
9994
PropertyDefinitionUtils.newPropertyBuilderBSL(4,
10095
LANG_SERVER_CONFIGURATION_PATH_KEY,
10196
"enabled.configurationPath",
10297
LANG_SERVER_CONFIGURATION_PATH_DEFAULT_VALUE)
10398
.type(PropertyType.STRING)
104-
.onQualifiers(Qualifiers.PROJECT)
10599
.build(),
106100
PropertyDefinitionUtils.newPropertyBuilderBSL(5,
107101
LANG_SERVER_SUBSYSTEM_FILTER_INCLUDE_KEY,
108102
"subsystemfilter.include",
109103
"")
110-
.onQualifiers(Qualifiers.PROJECT)
111104
.multiValues(true)
112105
.build(),
113106
PropertyDefinitionUtils.newPropertyBuilderBSL(6,
114107
LANG_SERVER_SUBSYSTEM_FILTER_EXCLUDE_KEY,
115108
"subsystemfilter.exclude",
116109
"")
117-
.onQualifiers(Qualifiers.PROJECT)
118110
.multiValues(true)
119111
.build(),
120112
PropertyDefinitionUtils.newPropertyBuilderBSL(7,
121113
BSL_FILE_EXTENSIONS_KEY,
122114
"file.suffixes",
123115
BSL_FILE_EXTENSIONS_DEFAULT_VALUE)
124-
.onQualifiers(Qualifiers.PROJECT)
125116
.multiValues(true)
126117
.build(),
127118
PropertyDefinitionUtils.newPropertyBuilderExternal(0,
128119
LANG_SERVER_REPORT_PATH_KEY,
129120
"reportPaths",
130121
"")
131122
.subCategory(BSL_SUBCATEGORY)
132-
.onQualifiers(Qualifiers.PROJECT)
133123
.multiValues(true)
134124
.build()
135125
);

0 commit comments

Comments
 (0)