|
1 | 1 | import me.qoomon.gitversioning.commons.GitRefType |
2 | 2 | import java.util.Calendar |
| 3 | +import org.jreleaser.model.Active.* |
3 | 4 |
|
4 | 5 | plugins { |
5 | 6 | `java-library` |
6 | 7 | `maven-publish` |
7 | 8 | jacoco |
8 | | - signing |
9 | 9 | id("org.cadixdev.licenser") version "0.6.1" |
10 | 10 | id("me.qoomon.git-versioning") version "6.4.4" |
11 | | - id("com.gorylenko.gradle-git-properties") version "2.4.2" |
12 | | - id("io.freefair.lombok") version "8.11" |
13 | | - id("io.freefair.javadoc-links") version "8.11" |
14 | | - id("io.freefair.javadoc-utf-8") version "8.11" |
15 | | - id("io.freefair.maven-central.validate-poms") version "8.11" |
16 | | - id("com.github.ben-manes.versions") version "0.51.0" |
| 11 | + id("com.gorylenko.gradle-git-properties") version "2.5.2" |
| 12 | + id("io.freefair.lombok") version "8.14.2" |
| 13 | + id("io.freefair.javadoc-links") version "8.14.2" |
| 14 | + id("io.freefair.javadoc-utf-8") version "8.14.2" |
| 15 | + id("io.freefair.maven-central.validate-poms") version "8.14.2" |
| 16 | + id("com.github.ben-manes.versions") version "0.52.0" |
17 | 17 | id("ru.vyarus.pom") version "3.0.0" |
18 | | - id("io.codearte.nexus-staging") version "0.30.0" |
| 18 | + id("org.jreleaser") version "1.19.0" |
19 | 19 | } |
20 | 20 |
|
21 | 21 | group = "io.github.1c-syntax" |
@@ -108,31 +108,11 @@ artifacts { |
108 | 108 | archives(tasks["javadocJar"]) |
109 | 109 | } |
110 | 110 |
|
111 | | -signing { |
112 | | - val signingInMemoryKey: String? by project // env.ORG_GRADLE_PROJECT_signingInMemoryKey |
113 | | - val signingInMemoryPassword: String? by project // env.ORG_GRADLE_PROJECT_signingInMemoryPassword |
114 | | - if (signingInMemoryKey != null) { |
115 | | - useInMemoryPgpKeys(signingInMemoryKey, signingInMemoryPassword) |
116 | | - sign(publishing.publications) |
117 | | - } |
118 | | -} |
119 | | - |
120 | 111 | publishing { |
121 | 112 | repositories { |
122 | 113 | maven { |
123 | | - name = "sonatype" |
124 | | - url = if (isSnapshot) |
125 | | - uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") |
126 | | - else |
127 | | - uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") |
128 | | - |
129 | | - val sonatypeUsername: String? by project |
130 | | - val sonatypePassword: String? by project |
131 | | - |
132 | | - credentials { |
133 | | - username = sonatypeUsername // ORG_GRADLE_PROJECT_sonatypeUsername |
134 | | - password = sonatypePassword // ORG_GRADLE_PROJECT_sonatypePassword |
135 | | - } |
| 114 | + name = "staging" |
| 115 | + url = layout.buildDirectory.dir("staging-deploy").get().asFile.toURI() |
136 | 116 | } |
137 | 117 | } |
138 | 118 | publications { |
@@ -184,12 +164,47 @@ publishing { |
184 | 164 | developerConnection.set("scm:git:git@github.com:1c-syntax/utils.git") |
185 | 165 | url.set("https://github.com/1c-syntax/utils") |
186 | 166 | } |
| 167 | + // Добавлено для Maven Central validation |
| 168 | + issueManagement { |
| 169 | + system.set("GitHub Issues") |
| 170 | + url.set("https://github.com/1c-syntax/utils/issues") |
| 171 | + } |
| 172 | + // Добавлено для Maven Central validation |
| 173 | + ciManagement { |
| 174 | + system.set("GitHub Actions") |
| 175 | + url.set("https://github.com/1c-syntax/utils/actions") |
| 176 | + } |
187 | 177 | } |
188 | 178 | } |
189 | 179 | } |
190 | 180 | } |
191 | 181 |
|
192 | | -nexusStaging { |
193 | | - serverUrl = "https://s01.oss.sonatype.org/service/local/" |
194 | | - stagingProfileId = "15bd88b4d17915" // ./gradlew getStagingProfile |
| 182 | +jreleaser { |
| 183 | + signing { |
| 184 | + active = ALWAYS |
| 185 | + armored = true |
| 186 | + } |
| 187 | + deploy { |
| 188 | + maven { |
| 189 | + mavenCentral { |
| 190 | + create("release-deploy") { |
| 191 | + active = RELEASE |
| 192 | + url = "https://central.sonatype.com/api/v1/publisher" |
| 193 | + stagingRepository("build/staging-deploy") |
| 194 | + } |
| 195 | + } |
| 196 | + nexus2 { |
| 197 | + create("snapshot-deploy") { |
| 198 | + active = SNAPSHOT |
| 199 | + snapshotUrl = "https://central.sonatype.com/repository/maven-snapshots/" |
| 200 | + applyMavenCentralRules = true |
| 201 | + snapshotSupported = true |
| 202 | + closeRepository = true |
| 203 | + releaseRepository = true |
| 204 | + stagingRepository("build/staging-deploy") |
| 205 | + } |
| 206 | + } |
| 207 | + } |
| 208 | + } |
195 | 209 | } |
| 210 | + |
0 commit comments