Skip to content

Commit

Permalink
Finish v0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
theshadowco committed Mar 19, 2024
2 parents e45dac2 + 74920ec commit e3b5c1d
Show file tree
Hide file tree
Showing 23 changed files with 885 additions and 242 deletions.
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gradle" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
groups:
freefair:
patterns:
- "io.freefair.*"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java_version: ['11', '13']
java_version: ['17', '20']
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/publish-to-sonatype.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish to Sonatype

on:
release:
types: [published]
push:
branches:
- develop
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'liberica'
- name: Publish to Sonatype
run: ./gradlew publishMavenPublicationToSonatypeRepository -PsimplifyVersion
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryPassword: ${{ secrets.GPG_SIGNING_PASSWORD }}
- name: Close repository
if: github.event_name == 'release'
run: ./gradlew closeAndReleaseRepository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_nexusUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_nexusPassword: ${{ secrets.SONATYPE_PASSWORD }}
24 changes: 0 additions & 24 deletions .github/workflows/release.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

416 changes: 416 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# 1c-syntax utils

Common utils for 1c-syntax team java projects
183 changes: 139 additions & 44 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,41 +1,59 @@
import me.qoomon.gradle.gitversioning.GitVersioningPluginConfig
import me.qoomon.gradle.gitversioning.GitVersioningPluginConfig.CommitVersionDescription
import me.qoomon.gradle.gitversioning.GitVersioningPluginConfig.VersionDescription
import me.qoomon.gitversioning.commons.GitRefType
import java.util.Calendar

plugins {
java
jacoco
maven
`java-library`
`maven-publish`
id("com.github.hierynomus.license") version "0.15.0"
id("io.franzbecker.gradle-lombok") version "3.2.0"
id("me.qoomon.git-versioning") version "2.1.1"
jacoco
signing
id("org.cadixdev.licenser") version "0.6.1"
id("me.qoomon.git-versioning") version "6.4.3"
id("com.gorylenko.gradle-git-properties") version "2.4.1"
id("io.freefair.lombok") version "8.6"
id("io.freefair.javadoc-links") version "8.6"
id("io.freefair.javadoc-utf-8") version "8.6"
id("io.freefair.maven-central.validate-poms") version "8.6"
id("com.github.ben-manes.versions") version "0.27.0"
id("ru.vyarus.pom") version "3.0.0"
id("io.codearte.nexus-staging") version "0.30.0"
}

group = "com.github.1c-syntax"
group = "io.github.1c-syntax"
gitVersioning.apply {
refs {
considerTagsOnBranches = true
tag("v(?<tagVersion>[0-9].*)") {
version = "\${ref.tagVersion}\${dirty}"
}
branch(".+") {
version = "\${ref}-\${commit.short}\${dirty}"
}
}

rev {
version = "\${commit.short}\${dirty}"
}
}
val isSnapshot = gitVersioning.gitVersionDetails.refType != GitRefType.TAG

repositories {
mavenCentral()
}

val junitVersion = "5.6.0"
val junitVersion = "5.7.0"

dependencies {

compileOnly("org.projectlombok", "lombok", lombok.version)

compileOnly("com.github.spotbugs:spotbugs-annotations:4.8.3")
testImplementation("org.junit.jupiter", "junit-jupiter-api", junitVersion)
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", junitVersion)

testImplementation("org.assertj", "assertj-core", "3.14.0")
testImplementation("org.assertj", "assertj-core", "3.18.1")
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
withJavadocJar()
}

tasks.withType<JavaCompile> {
Expand All @@ -52,51 +70,128 @@ tasks.test {
}

reports {
html.isEnabled = true
html.required.set(true)
}
}


tasks.check {
dependsOn(tasks.jacocoTestReport)
}

tasks.jacocoTestReport {
reports {
xml.isEnabled = true
xml.destination = File("$buildDir/reports/jacoco/test/jacoco.xml")
xml.required.set(true)
xml.outputLocation.set(File("$buildDir/reports/jacoco/test/jacoco.xml"))
}
}

license {
header = rootProject.file("license/HEADER.txt")
header(rootProject.file("license/HEADER.txt"))
newLine(false)
ext["year"] = "2018-" + Calendar.getInstance().get(Calendar.YEAR)
ext["name"] = "Alexey Sosnoviy <[email protected]>, Nikita Fedkin <[email protected]>"
ext["project"] = "1c-syntax utils"
strictCheck = true
mapping("java", "SLASHSTAR_STYLE")
exclude("**/*.properties")
exclude("**/*.xml")
exclude("**/*.json")
exclude("**/*.bsl")
}

gitVersioning.apply(closureOf<GitVersioningPluginConfig> {
preferTags = true
branch(closureOf<VersionDescription> {
pattern = "^(?!v[0-9]+).*"
versionFormat = "\${branch}-\${commit.short}\${dirty}"
})
tag(closureOf<VersionDescription>{
pattern = "v(?<tagVersion>[0-9].*)"
versionFormat = "\${tagVersion}\${dirty}"
})
commit(closureOf<CommitVersionDescription>{
versionFormat = "\${commit.short}\${dirty}"
})
})

lombok {
version = "1.18.10"
sha256 = "2836e954823bfcbad45e78c18896e3d01058e6f643749810c608b7005ee7b2fa"
}
tasks.javadoc {
options {
this as StandardJavadocDocletOptions
noComment(false)
}
}

artifacts {
archives(tasks["jar"])
archives(tasks["sourcesJar"])
archives(tasks["javadocJar"])
}

signing {
val signingInMemoryKey: String? by project // env.ORG_GRADLE_PROJECT_signingInMemoryKey
val signingInMemoryPassword: String? by project // env.ORG_GRADLE_PROJECT_signingInMemoryPassword
if (signingInMemoryKey != null) {
useInMemoryPgpKeys(signingInMemoryKey, signingInMemoryPassword)
sign(publishing.publications)
}
}

publishing {
repositories {
maven {
name = "sonatype"
url = if (isSnapshot)
uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
else
uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")

val sonatypeUsername: String? by project
val sonatypePassword: String? by project

credentials {
username = sonatypeUsername // ORG_GRADLE_PROJECT_sonatypeUsername
password = sonatypePassword // ORG_GRADLE_PROJECT_sonatypePassword
}
}
}
publications {
create<MavenPublication>("maven") {
from(components["java"])

if (isSnapshot && project.hasProperty("simplifyVersion")) {
version = findProperty("git.ref.slug") as String + "-SNAPSHOT"
}

pom {
description.set("Common utils for 1c-syntax team java projects")
url.set("https://github.com/1c-syntax/utils")
licenses {
license {
name.set("GNU LGPL 3")
url.set("https://www.gnu.org/licenses/lgpl-3.0.txt")
distribution.set("repo")
}
}
developers {
developer {
id.set("asosnoviy")
name.set("Alexey Sosnoviy")
email.set("[email protected]")
url.set("https://github.com/asosnoviy")
organization.set("1c-syntax")
organizationUrl.set("https://github.com/1c-syntax")
}
developer {
id.set("nixel2007")
name.set("Nikita Fedkin")
email.set("[email protected]")
url.set("https://github.com/nixel2007")
organization.set("1c-syntax")
organizationUrl.set("https://github.com/1c-syntax")
}
developer {
id.set("theshadowco")
name.set("Valery Maximov")
email.set("[email protected]")
url.set("https://github.com/theshadowco")
organization.set("1c-syntax")
organizationUrl.set("https://github.com/1c-syntax")
}
}
scm {
connection.set("scm:git:git://github.com/1c-syntax/utils.git")
developerConnection.set("scm:git:[email protected]:1c-syntax/utils.git")
url.set("https://github.com/1c-syntax/utils")
}
}
}
}
}

nexusStaging {
serverUrl = "https://s01.oss.sonatype.org/service/local/"
stagingProfileId = "15bd88b4d17915" // ./gradlew getStagingProfile
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit e3b5c1d

Please sign in to comment.