Skip to content

Commit 465ec25

Browse files
committed
Finish v0.14.3
2 parents 499acbc + c41a4bf commit 465ec25

File tree

11 files changed

+122
-107
lines changed

11 files changed

+122
-107
lines changed

.github/workflows/check.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ jobs:
1111
java_version: ['17', '21', '23']
1212
os: [ubuntu-latest, windows-latest, macOS-latest]
1313
steps:
14-
- uses: actions/checkout@v4
15-
with:
16-
submodules: true
17-
- name: Set up JDK ${{ matrix.java_version }}
18-
uses: actions/setup-java@v4
19-
with:
20-
java-version: ${{ matrix.java_version }}
21-
distribution: 'adopt'
22-
- name: Build with Gradle
23-
run: ./gradlew check --stacktrace
24-
- name: Archive test results
25-
if: failure()
26-
uses: actions/upload-artifact@v4
27-
with:
28-
name: junit_report_${{ matrix.os }}_${{ matrix.java_version }}
29-
path: build/reports/tests/test
14+
- uses: actions/checkout@v5
15+
with:
16+
fetch-depth: 0
17+
- name: Set up JDK ${{ matrix.java_version }}
18+
uses: actions/setup-java@v5
19+
with:
20+
java-version: ${{ matrix.java_version }}
21+
distribution: 'adopt'
22+
- name: Build with Gradle
23+
run: ./gradlew check --stacktrace
24+
- name: Archive test results
25+
if: failure()
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: junit_report_${{ matrix.os }}_${{ matrix.java_version }}
29+
path: build/reports/tests/test
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish to maven central
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@v5
16+
with:
17+
fetch-depth: 0
18+
- name: Set up JDK
19+
uses: actions/setup-java@v5
20+
with:
21+
java-version: 17
22+
distribution: 'temurin'
23+
cache: gradle
24+
- name: Deploy to Central Portal
25+
run: |
26+
./gradlew publishMavenPublicationToStagingRepository
27+
./gradlew jreleaserDeploy
28+
env:
29+
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
31+
JRELEASER_MAVENCENTRAL_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
32+
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_SIGNING_PUBLIC_KEY }}
33+
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SIGNING_KEY }}
34+
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_PASSWORD }}
35+
JRELEASER_DEPLOY_MAVEN_NEXUS2_SNAPSHOT_DEPLOY_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
36+
JRELEASER_DEPLOY_MAVEN_NEXUS2_SNAPSHOT_DEPLOY_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}

.github/workflows/publish-to-sonatype.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.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@v4
15+
- uses: actions/checkout@v5
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@v4
22+
uses: actions/setup-java@v5
2323
with:
2424
java-version: 17
2525
distribution: 'adopt'

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ jobs:
1010
name: Publish release
1111
steps:
1212
- name: Checkout source
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@v5
14+
with:
15+
fetch-depth: 0
1416
- name: Set up JDK
15-
uses: actions/setup-java@v4
17+
uses: actions/setup-java@v5
1618
with:
1719
java-version: 17
1820
distribution: 'adopt'

.github/workflows/update-gradle.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v4
14-
13+
- uses: actions/checkout@v5
1514
- name: Set up JDK 17
16-
uses: actions/setup-java@v4
15+
uses: actions/setup-java@v5
1716
with:
1817
java-version: 17
1918
distribution: 'temurin'
2019
cache: gradle
21-
2220
- name: Update Gradle Wrapper
2321
uses: gradle-update/update-gradle-wrapper-action@v2
2422
with:

build.gradle.kts

Lines changed: 56 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,36 @@
1-
import me.qoomon.gitversioning.commons.GitRefType
2-
import java.util.*
1+
import java.util.Calendar
2+
import org.jreleaser.model.Active.*
33

44
plugins {
55
`java-library`
66
`maven-publish`
77
jacoco
8-
signing
9-
id("org.sonarqube") version "6.0.1.5171"
108
id("org.cadixdev.licenser") version "0.6.1"
119
id("me.qoomon.git-versioning") version "6.4.4"
12-
id("io.freefair.lombok") version "8.12.1"
13-
id("io.freefair.javadoc-links") version "8.12.1"
14-
id("io.freefair.javadoc-utf-8") version "8.12.1"
15-
id("io.freefair.maven-central.validate-poms") version "8.12.1"
10+
id("io.freefair.lombok") version "8.14.2"
11+
id("io.freefair.javadoc-links") version "8.14.2"
12+
id("io.freefair.javadoc-utf-8") version "8.14.2"
13+
id("io.freefair.maven-central.validate-poms") version "8.14.2"
1614
id("com.github.ben-manes.versions") version "0.52.0"
1715
id("ru.vyarus.pom") version "3.0.0"
18-
id("io.codearte.nexus-staging") version "0.30.0"
16+
id("org.jreleaser") version "1.19.0"
17+
id("org.sonarqube") version "6.2.0.5505"
1918
}
2019

2120
group = "io.github.1c-syntax"
2221
gitVersioning.apply {
2322
refs {
24-
considerTagsOnBranches = true
23+
describeTagFirstParent = false
2524
tag("v(?<tagVersion>[0-9].*)") {
2625
version = "\${ref.tagVersion}\${dirty}"
2726
}
27+
28+
branch("develop") {
29+
version = "\${describe.tag.version.major}." +
30+
"\${describe.tag.version.minor.next}.0." +
31+
"\${describe.distance}-SNAPSHOT\${dirty}"
32+
}
33+
2834
branch(".+") {
2935
version = "\${ref}-\${commit.short}\${dirty}"
3036
}
@@ -34,7 +40,6 @@ gitVersioning.apply {
3440
version = "\${commit.short}\${dirty}"
3541
}
3642
}
37-
val isSnapshot = gitVersioning.gitVersionDetails.refType != GitRefType.TAG
3843

3944
repositories {
4045
mavenLocal()
@@ -47,7 +52,7 @@ dependencies {
4752

4853
// прочее
4954
implementation("commons-io", "commons-io", "2.18.0")
50-
api("io.github.1c-syntax", "bsl-common-library", "0.8.0")
55+
api("io.github.1c-syntax", "bsl-common-library", "0.8.1")
5156

5257
// тестирование
5358
testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.11.4")
@@ -122,39 +127,16 @@ license {
122127
exclude("**/*.xml")
123128
}
124129

125-
signing {
126-
val signingInMemoryKey: String? by project // env.ORG_GRADLE_PROJECT_signingInMemoryKey
127-
val signingInMemoryPassword: String? by project // env.ORG_GRADLE_PROJECT_signingInMemoryPassword
128-
if (signingInMemoryKey != null) {
129-
useInMemoryPgpKeys(signingInMemoryKey, signingInMemoryPassword)
130-
sign(publishing.publications)
131-
}
132-
}
133-
134130
publishing {
135131
repositories {
136132
maven {
137-
name = "sonatype"
138-
url = if (isSnapshot)
139-
uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
140-
else
141-
uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
142-
143-
val sonatypeUsername: String? by project
144-
val sonatypePassword: String? by project
145-
146-
credentials {
147-
username = sonatypeUsername // ORG_GRADLE_PROJECT_sonatypeUsername
148-
password = sonatypePassword // ORG_GRADLE_PROJECT_sonatypePassword
149-
}
133+
name = "staging"
134+
url = layout.buildDirectory.dir("staging-deploy").get().asFile.toURI()
150135
}
151136
}
152137
publications {
153138
create<MavenPublication>("maven") {
154139
from(components["java"])
155-
if (isSnapshot && project.hasProperty("simplifyVersion")) {
156-
version = findProperty("git.ref.slug") as String + "-SNAPSHOT"
157-
}
158140
pom {
159141
description.set("Support configuration read library for Language 1C (BSL)")
160142
url.set("https://github.com/1c-syntax/supportconf")
@@ -188,6 +170,16 @@ publishing {
188170
developerConnection.set("scm:git:git@github.com:1c-syntax/supportconf.git")
189171
url.set("https://github.com/1c-syntax/supportconf")
190172
}
173+
// Добавлено для Maven Central validation
174+
issueManagement {
175+
system.set("GitHub Issues")
176+
url.set("https://github.com/1c-syntax/supportconf/issues")
177+
}
178+
// Добавлено для Maven Central validation
179+
ciManagement {
180+
system.set("GitHub Actions")
181+
url.set("https://github.com/1c-syntax/supportconf/actions")
182+
}
191183
}
192184
}
193185
}
@@ -205,7 +197,31 @@ tasks.withType<Javadoc> {
205197
.addStringOption("Xdoclint:none", "-quiet")
206198
}
207199

208-
nexusStaging {
209-
serverUrl = "https://s01.oss.sonatype.org/service/local/"
210-
stagingProfileId = "15bd88b4d17915" // ./gradlew getStagingProfile
200+
jreleaser {
201+
signing {
202+
active = ALWAYS
203+
armored = true
204+
}
205+
deploy {
206+
maven {
207+
mavenCentral {
208+
create("release-deploy") {
209+
active = RELEASE
210+
url = "https://central.sonatype.com/api/v1/publisher"
211+
stagingRepository("build/staging-deploy")
212+
}
213+
}
214+
nexus2 {
215+
create("snapshot-deploy") {
216+
active = SNAPSHOT
217+
snapshotUrl = "https://central.sonatype.com/repository/maven-snapshots/"
218+
applyMavenCentralRules = true
219+
snapshotSupported = true
220+
closeRepository = true
221+
releaseRepository = true
222+
stagingRepository("build/staging-deploy")
223+
}
224+
}
225+
}
226+
}
211227
}

gradle/wrapper/gradle-wrapper.jar

181 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.12.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ case "$( uname )" in #(
114114
NONSTOP* ) nonstop=true ;;
115115
esac
116116

117-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
117+
CLASSPATH="\\\"\\\""
118118

119119

120120
# Determine the Java command to use to start the JVM.
@@ -205,15 +205,15 @@ fi
205205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206206

207207
# Collect all arguments for the java command:
208-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209209
# and any embedded shellness will be escaped.
210210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211211
# treated as '${Hostname}' itself on the command line.
212212

213213
set -- \
214214
"-Dorg.gradle.appname=$APP_BASE_NAME" \
215215
-classpath "$CLASSPATH" \
216-
org.gradle.wrapper.GradleWrapperMain \
216+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
217217
"$@"
218218

219219
# Stop when "xargs" is not available.

0 commit comments

Comments
 (0)