Skip to content

Commit aa76cb1

Browse files
committed
Finish v0.3.1
2 parents 9bb148e + fc0f305 commit aa76cb1

File tree

10 files changed

+110
-95
lines changed

10 files changed

+110
-95
lines changed
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,13 +12,13 @@ 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
- run: |
1919
git fetch --prune --unshallow
2020
- name: Set up JDK 17
21-
uses: actions/setup-java@v4
21+
uses: actions/setup-java@v5
2222
with:
2323
java-version: 17
2424
distribution: 'adopt'

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ jobs:
1212
matrix:
1313
os: [ ubuntu-latest, windows-latest, macOS-latest ]
1414
steps:
15-
- uses: actions/checkout@v4
16-
- uses: actions/setup-java@v4
15+
- uses: actions/checkout@v5
16+
with:
17+
fetch-depth: 0
18+
- uses: actions/setup-java@v5
1719
with:
1820
java-version: 17
1921
distribution: 'adopt'

.github/workflows/update-gradle.yaml

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

1212
steps:
13-
- uses: actions/checkout@v4
14-
13+
- uses: actions/checkout@v5
14+
with:
15+
fetch-depth: 0
1516
- name: Set up JDK 17
16-
uses: actions/setup-java@v4
17+
uses: actions/setup-java@v5
1718
with:
1819
java-version: 17
1920
distribution: 'temurin'

build.gradle.kts

Lines changed: 58 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,43 @@
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 {
5+
`java-library`
56
`maven-publish`
6-
idea
77
jacoco
8-
`java-library`
9-
signing
10-
id("org.sonarqube") version "6.0.1.5171"
8+
idea
119
id("org.cadixdev.licenser") version "0.6.1"
1210
id("me.qoomon.git-versioning") version "6.4.4"
13-
id("io.freefair.lombok") version "8.12.1"
14-
id("io.freefair.javadoc-links") version "8.12.1"
15-
id("io.freefair.javadoc-utf-8") version "8.12.1"
11+
id("io.freefair.lombok") version "8.14.2"
12+
id("io.freefair.javadoc-links") version "8.14.2"
13+
id("io.freefair.javadoc-utf-8") version "8.14.2"
14+
id("io.freefair.maven-central.validate-poms") version "8.14.2"
1615
id("com.github.ben-manes.versions") version "0.52.0"
17-
id("me.champeau.jmh") version "0.7.3"
18-
id("io.freefair.maven-central.validate-poms") version "8.12.1"
1916
id("ru.vyarus.pom") version "3.0.0"
20-
id("io.codearte.nexus-staging") version "0.30.0"
17+
id("org.jreleaser") version "1.19.0"
18+
id("org.sonarqube") version "6.2.0.5505"
19+
id("me.champeau.jmh") version "0.7.3"
2120
}
2221

2322
repositories {
2423
mavenLocal()
2524
mavenCentral()
26-
maven(url = "https://jitpack.io")
2725
}
2826

2927
group = "io.github.1c-syntax"
3028
gitVersioning.apply {
3129
refs {
32-
considerTagsOnBranches = true
30+
describeTagFirstParent = false
3331
tag("v(?<tagVersion>[0-9].*)") {
3432
version = "\${ref.tagVersion}\${dirty}"
3533
}
34+
35+
branch("develop") {
36+
version = "\${describe.tag.version.major}." +
37+
"\${describe.tag.version.minor.next}.0." +
38+
"\${describe.distance}-SNAPSHOT\${dirty}"
39+
}
40+
3641
branch(".+") {
3742
version = "\${ref}-\${commit.short}\${dirty}"
3843
}
@@ -42,11 +47,10 @@ gitVersioning.apply {
4247
version = "\${commit.short}\${dirty}"
4348
}
4449
}
45-
val isSnapshot = gitVersioning.gitVersionDetails.refType != GitRefType.TAG
4650

4751
dependencies {
48-
implementation("io.github.1c-syntax", "bsl-parser-core", "0.3.0")
49-
implementation("io.github.1c-syntax", "antlr4", "0.1.1")
52+
implementation("io.github.1c-syntax", "bsl-parser-core", "0.3.1")
53+
implementation("io.github.1c-syntax", "antlr4", "0.1.2")
5054
implementation("commons-io", "commons-io", "2.15.1")
5155
implementation("org.junit.jupiter", "junit-jupiter-api", "5.10.1")
5256
implementation("org.assertj", "assertj-core", "3.25.0")
@@ -123,39 +127,16 @@ artifacts {
123127
archives(tasks["javadocJar"])
124128
}
125129

126-
signing {
127-
val signingInMemoryKey: String? by project // env.ORG_GRADLE_PROJECT_signingInMemoryKey
128-
val signingInMemoryPassword: String? by project // env.ORG_GRADLE_PROJECT_signingInMemoryPassword
129-
if (signingInMemoryKey != null) {
130-
useInMemoryPgpKeys(signingInMemoryKey, signingInMemoryPassword)
131-
sign(publishing.publications)
132-
}
133-
}
134-
135130
publishing {
136131
repositories {
137132
maven {
138-
name = "sonatype"
139-
url = if (isSnapshot)
140-
uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
141-
else
142-
uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
143-
144-
val sonatypeUsername: String? by project
145-
val sonatypePassword: String? by project
146-
147-
credentials {
148-
username = sonatypeUsername // ORG_GRADLE_PROJECT_sonatypeUsername
149-
password = sonatypePassword // ORG_GRADLE_PROJECT_sonatypePassword
150-
}
133+
name = "staging"
134+
url = layout.buildDirectory.dir("staging-deploy").get().asFile.toURI()
151135
}
152136
}
153137
publications {
154138
create<MavenPublication>("maven") {
155139
from(components["java"])
156-
if (isSnapshot && project.hasProperty("simplifyVersion")) {
157-
version = findProperty("git.ref.slug") as String + "-SNAPSHOT"
158-
}
159140

160141
pom {
161142
description.set("Library for testing parsers for Language 1C (BSL) in ANTLR4 format.")
@@ -182,12 +163,44 @@ publishing {
182163
developerConnection.set("scm:git:[email protected]:1c-syntax/bsl-parser-testing.git")
183164
url.set("https://github.com/1c-syntax/bsl-parser-testing")
184165
}
166+
issueManagement {
167+
system.set("GitHub Issues")
168+
url.set("https://github.com/1c-syntax/bsl-parser-testing/issues")
169+
}
170+
ciManagement {
171+
system.set("GitHub Actions")
172+
url.set("https://github.com/1c-syntax/bsl-parser-testing/actions")
173+
}
185174
}
186175
}
187176
}
188177
}
189178

190-
nexusStaging {
191-
serverUrl = "https://s01.oss.sonatype.org/service/local/"
192-
stagingProfileId = "15bd88b4d17915" // ./gradlew getStagingProfile
179+
jreleaser {
180+
signing {
181+
active = ALWAYS
182+
armored = true
183+
}
184+
deploy {
185+
maven {
186+
mavenCentral {
187+
create("release-deploy") {
188+
active = RELEASE
189+
url = "https://central.sonatype.com/api/v1/publisher"
190+
stagingRepository("build/staging-deploy")
191+
}
192+
}
193+
nexus2 {
194+
create("snapshot-deploy") {
195+
active = SNAPSHOT
196+
snapshotUrl = "https://central.sonatype.com/repository/maven-snapshots/"
197+
applyMavenCentralRules = true
198+
snapshotSupported = true
199+
closeRepository = true
200+
releaseRepository = true
201+
stagingRepository("build/staging-deploy")
202+
}
203+
}
204+
}
205+
}
193206
}

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.

gradlew.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ goto fail
7070
:execute
7171
@rem Setup the command line
7272

73-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73+
set CLASSPATH=
7474

7575

7676
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
77+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7878

7979
:end
8080
@rem End local scope for the variables with windows NT shell

0 commit comments

Comments
 (0)