Skip to content

Commit 2bf6072

Browse files
committed
Finish 0.13.0
2 parents b5ddbca + 066d2aa commit 2bf6072

File tree

15 files changed

+166
-117
lines changed

15 files changed

+166
-117
lines changed

.github/workflows/check.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
java_version: ['11', '17', '20']
11+
java_version: ['17', '20']
1212
os: [ubuntu-latest, windows-latest, macOS-latest]
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
with:
1616
submodules: true
1717
- name: Set up JDK ${{ matrix.java_version }}
18-
uses: actions/setup-java@v3
18+
uses: actions/setup-java@v4
1919
with:
2020
java-version: ${{ matrix.java_version }}
2121
distribution: 'adopt'
2222
- name: Build with Gradle
2323
run: ./gradlew check --stacktrace
2424
- name: Archive test results
2525
if: failure()
26-
uses: actions/upload-artifact@v3.1.2
26+
uses: actions/upload-artifact@v4.1.0
2727
with:
2828
name: junit_report_${{ matrix.os }}_${{ matrix.java_version }}
2929
path: build/reports/tests/test
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish to Sonatype
2+
3+
on:
4+
release:
5+
types: [published]
6+
push:
7+
branches:
8+
- develop
9+
workflow_dispatch:
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Set up JDK
17+
uses: actions/setup-java@v4
18+
with:
19+
java-version: 17
20+
distribution: 'liberica'
21+
- name: Publish to Sonatype
22+
run: ./gradlew publishMavenPublicationToSonatypeRepository -PsimplifyVersion
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
26+
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
27+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SIGNING_KEY }}
28+
ORG_GRADLE_PROJECT_signingInMemoryPassword: ${{ secrets.GPG_SIGNING_PASSWORD }}
29+
- name: Close repository
30+
if: github.event_name == 'release'
31+
run: ./gradlew closeAndReleaseRepository
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
35+
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
36+
ORG_GRADLE_PROJECT_nexusUsername: ${{ secrets.SONATYPE_USERNAME }}
37+
ORG_GRADLE_PROJECT_nexusPassword: ${{ secrets.SONATYPE_PASSWORD }}

.github/workflows/qa.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ jobs:
1212
runs-on: ubuntu-latest
1313
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.event.repository.full_name
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616
with:
1717
fetch-depth: ''
1818
submodules: true
1919
- run: |
2020
git fetch --prune --unshallow
2121
- name: Set up JDK 17
22-
uses: actions/setup-java@v3
22+
uses: actions/setup-java@v4
2323
with:
2424
java-version: 17
2525
distribution: 'adopt'

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ jobs:
1010
name: Publish release
1111
steps:
1212
- name: Checkout source
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414
- name: Set up JDK
15-
uses: actions/setup-java@v3
15+
uses: actions/setup-java@v4
1616
with:
17-
java-version: 11
17+
java-version: 17
1818
distribution: 'adopt'
1919
- name: Build with Gradle
2020
run: ./gradlew build
2121
- name: Upload jar to release
22-
uses: AButler/upload-release-assets@v2.0
22+
uses: AButler/upload-release-assets@v3.0
2323
with:
2424
files: './build/libs/*.jar'
2525
repo-token: ${{ secrets.GITHUB_TOKEN }}

build.gradle.kts

Lines changed: 60 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,39 @@
1+
import me.qoomon.gitversioning.commons.GitRefType
12
import java.util.*
23

34
plugins {
45
`java-library`
56
`maven-publish`
67
jacoco
8+
id("org.sonarqube") version "4.4.1.3373"
79
id("org.cadixdev.licenser") version "0.6.1"
8-
id("com.github.gradle-git-version-calculator") version "1.1.0"
9-
id("io.freefair.lombok") version "8.3"
10-
id("io.freefair.javadoc-links") version "8.3"
11-
id("io.freefair.javadoc-utf-8") version "8.3"
12-
id("org.sonarqube") version "4.0.0.2929"
10+
id("me.qoomon.git-versioning") version "6.4.3"
11+
id("io.freefair.lombok") version "8.4"
12+
id("io.freefair.javadoc-links") version "8.4"
13+
id("io.freefair.javadoc-utf-8") version "8.4"
14+
id("io.freefair.maven-central.validate-poms") version "8.4"
15+
id("com.github.ben-manes.versions") version "0.50.0"
16+
id("ru.vyarus.pom") version "2.2.2"
17+
id("io.codearte.nexus-staging") version "0.30.0"
1318
}
1419

1520
group = "io.github.1c-syntax"
16-
version = gitVersionCalculator.calculateVersion("v")
21+
gitVersioning.apply {
22+
refs {
23+
considerTagsOnBranches = true
24+
tag("v(?<tagVersion>[0-9].*)") {
25+
version = "\${ref.tagVersion}\${dirty}"
26+
}
27+
branch(".+") {
28+
version = "\${ref}-\${commit.short}\${dirty}"
29+
}
30+
}
31+
32+
rev {
33+
version = "\${commit.short}\${dirty}"
34+
}
35+
}
36+
val isSnapshot = gitVersioning.gitVersionDetails.refType != GitRefType.TAG
1737

1838
repositories {
1939
mavenLocal()
@@ -23,24 +43,24 @@ repositories {
2343

2444
dependencies {
2545
// логирование
26-
implementation("org.slf4j", "slf4j-api", "1.7.30")
46+
implementation("org.slf4j", "slf4j-api", "2.0.11")
2747

2848
// прочее
29-
implementation("commons-io", "commons-io", "2.8.0")
30-
api("io.github.1c-syntax", "bsl-common-library", "0.4.0")
49+
implementation("commons-io", "commons-io", "2.15.1")
50+
api("io.github.1c-syntax", "bsl-common-library", "0.5.0")
3151

3252
// тестирование
33-
testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.7.0")
34-
testImplementation("org.junit.jupiter", "junit-jupiter-engine", "5.7.0")
35-
testImplementation("org.assertj", "assertj-core", "3.18.1")
53+
testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.10.1")
54+
testImplementation("org.junit.jupiter", "junit-jupiter-engine", "5.10.1")
55+
testImplementation("org.assertj", "assertj-core", "3.25.0")
3656
// логирование
3757
// https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12
38-
testImplementation("org.slf4j", "slf4j-log4j12", "1.7.30")
58+
testImplementation("org.slf4j", "slf4j-log4j12", "2.0.11")
3959
}
4060

4161
java {
42-
sourceCompatibility = JavaVersion.VERSION_11
43-
targetCompatibility = JavaVersion.VERSION_11
62+
sourceCompatibility = JavaVersion.VERSION_17
63+
targetCompatibility = JavaVersion.VERSION_17
4464
withSourcesJar()
4565
withJavadocJar()
4666
}
@@ -103,9 +123,29 @@ license {
103123
}
104124

105125
publishing {
126+
repositories {
127+
maven {
128+
name = "sonatype"
129+
url = if (isSnapshot)
130+
uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
131+
else
132+
uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
133+
134+
val sonatypeUsername: String? by project
135+
val sonatypePassword: String? by project
136+
137+
credentials {
138+
username = sonatypeUsername // ORG_GRADLE_PROJECT_sonatypeUsername
139+
password = sonatypePassword // ORG_GRADLE_PROJECT_sonatypePassword
140+
}
141+
}
142+
}
106143
publications {
107144
create<MavenPublication>("maven") {
108145
from(components["java"])
146+
if (isSnapshot && project.hasProperty("simplifyVersion")) {
147+
version = findProperty("git.ref.slug") as String + "-SNAPSHOT"
148+
}
109149
pom {
110150
description.set("Support configuration read library for Language 1C (BSL)")
111151
url.set("https://github.com/1c-syntax/supportconf")
@@ -155,3 +195,8 @@ tasks.withType<Javadoc> {
155195
(options as StandardJavadocDocletOptions)
156196
.addStringOption("Xdoclint:none", "-quiet")
157197
}
198+
199+
nexusStaging {
200+
serverUrl = "https://s01.oss.sonatype.org/service/local/"
201+
stagingProfileId = "15bd88b4d17915" // ./gradlew getStagingProfile
202+
}

gradle/wrapper/gradle-wrapper.jar

346 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ done
8383
# This is normally unused
8484
# shellcheck disable=SC2034
8585
APP_BASE_NAME=${0##*/}
86-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
8788

8889
# Use the maximum available, or set MAX_FD != -1 to use that value.
8990
MAX_FD=maximum
@@ -144,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144145
case $MAX_FD in #(
145146
max*)
146147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
148149
MAX_FD=$( ulimit -H -n ) ||
149150
warn "Could not query maximum file descriptor limit"
150151
esac
151152
case $MAX_FD in #(
152153
'' | soft) :;; #(
153154
*)
154155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
156157
ulimit -n "$MAX_FD" ||
157158
warn "Could not set maximum file descriptor limit to $MAX_FD"
158159
esac
@@ -201,11 +202,11 @@ fi
201202
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
202203
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
203204

204-
# Collect all arguments for the java command;
205-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
206-
# shell script including quotes and variable substitutions, so put them in
207-
# double quotes to make sure that they get re-expanded; and
208-
# * put everything else in single quotes, so that it's not re-expanded.
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
209210

210211
set -- \
211212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

src/main/java/com/github/_1c_syntax/bsl/supconf/GeneralSupportVariant.java

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
/*
2-
* This file is a part of Support Configuration.
3-
*
4-
* Copyright (c) 2019 - 2023
5-
* Tymko Oleg <olegtymko@yandex.ru>, Maximov Valery <maximovvalery@gmail.com> and contributors
6-
*
7-
* SPDX-License-Identifier: LGPL-3.0-or-later
8-
*
9-
* Support Configuration is free software; you can redistribute it and/or
10-
* modify it under the terms of the GNU Lesser General Public
11-
* License as published by the Free Software Foundation; either
12-
* version 3.0 of the License, or (at your option) any later version.
13-
*
14-
* Support Configuration is distributed in the hope that it will be useful,
15-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17-
* Lesser General Public License for more details.
18-
*
19-
* You should have received a copy of the GNU Lesser General Public
20-
* License along with Support Configuration.
21-
*/
22-
package com.github._1c_syntax.bsl.supconf;
1+
/*
2+
* This file is a part of Support Configuration.
3+
*
4+
* Copyright (c) 2019 - 2024
5+
* Tymko Oleg <olegtymko@yandex.ru>, Maximov Valery <maximovvalery@gmail.com> and contributors
6+
*
7+
* SPDX-License-Identifier: LGPL-3.0-or-later
8+
*
9+
* Support Configuration is free software; you can redistribute it and/or
10+
* modify it under the terms of the GNU Lesser General Public
11+
* License as published by the Free Software Foundation; either
12+
* version 3.0 of the License, or (at your option) any later version.
13+
*
14+
* Support Configuration is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17+
* Lesser General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Lesser General Public
20+
* License along with Support Configuration.
21+
*/
22+
package com.github._1c_syntax.bsl.supconf;
2323

2424
public enum GeneralSupportVariant {
2525
LOCKED, UNLOCKED;

src/main/java/com/github/_1c_syntax/bsl/supconf/ParseSupportData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is a part of Support Configuration.
33
*
4-
* Copyright (c) 2019 - 2023
4+
* Copyright (c) 2019 - 2024
55
* Tymko Oleg <olegtymko@yandex.ru>, Maximov Valery <maximovvalery@gmail.com> and contributors
66
*
77
* SPDX-License-Identifier: LGPL-3.0-or-later

0 commit comments

Comments
 (0)