|
2 | 2 | buildscript { |
3 | 3 | ext { |
4 | 4 | kotlinVersion = "1.4.32" |
5 | | - detektVersion = "1.15.0" |
| 5 | + detektVersion = "1.17.0-RC2" |
6 | 6 | } |
7 | 7 | repositories { |
8 | | - maven { |
9 | | - url 'https://maven.aliyun.com/repository/public/' |
10 | | - } |
| 8 | + mavenCentral() |
11 | 9 | gradlePluginPortal() |
12 | 10 | } |
13 | 11 | dependencies { |
14 | 12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}" |
15 | | - classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4" |
16 | 13 | classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:${detektVersion}" |
17 | 14 | } |
18 | 15 | } |
19 | 16 |
|
20 | 17 | allprojects { |
21 | 18 | group = "org.ktorm" |
22 | | - version = "3.3.0" |
| 19 | + version = "3.4.0-SNAPSHOT" |
23 | 20 | } |
24 | 21 |
|
25 | 22 | subprojects { project -> |
26 | 23 | apply plugin: "kotlin" |
| 24 | + apply plugin: "signing" |
27 | 25 | apply plugin: "maven-publish" |
28 | | - apply plugin: "com.jfrog.bintray" |
29 | 26 | apply plugin: "io.gitlab.arturbosch.detekt" |
30 | 27 | apply from: "${project.rootDir}/check-source-header.gradle" |
31 | 28 |
|
32 | 29 | repositories { |
33 | | - maven { |
34 | | - url 'https://maven.aliyun.com/repository/public/' |
35 | | - } |
| 30 | + mavenCentral() |
36 | 31 | } |
37 | 32 |
|
38 | 33 | dependencies { |
@@ -62,16 +57,13 @@ subprojects { project -> |
62 | 57 |
|
63 | 58 | detekt { |
64 | 59 | toolVersion = detektVersion |
| 60 | + input = files("src/main/kotlin") |
65 | 61 | config = files("${project.rootDir}/detekt.yml") |
66 | | - reports { |
67 | | - xml.enabled = false |
68 | | - html.enabled = false |
69 | | - } |
70 | 62 | } |
71 | 63 |
|
72 | 64 | publishing { |
73 | 65 | publications { |
74 | | - bintray(MavenPublication) { |
| 66 | + dist(MavenPublication) { |
75 | 67 | from components.java |
76 | 68 | artifact generateSources |
77 | 69 | artifact generateJavadoc |
@@ -180,34 +172,39 @@ subprojects { project -> |
180 | 172 | } |
181 | 173 | } |
182 | 174 | } |
183 | | - } |
184 | 175 |
|
185 | | - bintray { |
186 | | - user = System.getenv("BINTRAY_USER") |
187 | | - key = System.getenv("BINTRAY_KEY") |
188 | | - publications = ["bintray"] |
189 | | - publish = true |
190 | | - |
191 | | - pkg { |
192 | | - repo = "ktorm" |
193 | | - name = project.name |
194 | | - licenses = ["Apache-2.0"] |
195 | | - vcsUrl = "https://github.com/kotlin-orm/ktorm.git" |
196 | | - labels = ["Kotlin", "ORM", "SQL"] |
197 | | - |
198 | | - version { |
199 | | - name = project.version |
200 | | - released = new Date() |
201 | | - vcsTag = project.version |
202 | | - |
203 | | - mavenCentralSync { |
204 | | - sync = false |
205 | | - user = System.getenv("OSSRH_USER") |
| 176 | + repositories { |
| 177 | + maven { |
| 178 | + name = "central" |
| 179 | + url = "https://oss.sonatype.org/service/local/staging/deploy/maven2" |
| 180 | + credentials { |
| 181 | + username = System.getenv("OSSRH_USER") |
| 182 | + password = System.getenv("OSSRH_PASSWORD") |
| 183 | + } |
| 184 | + } |
| 185 | + maven { |
| 186 | + name = "snapshot" |
| 187 | + url = "https://oss.sonatype.org/content/repositories/snapshots" |
| 188 | + credentials { |
| 189 | + username = System.getenv("OSSRH_USER") |
206 | 190 | password = System.getenv("OSSRH_PASSWORD") |
207 | 191 | } |
208 | 192 | } |
209 | 193 | } |
210 | 194 | } |
| 195 | + |
| 196 | + signing { |
| 197 | + def keyId = System.getenv("GPG_KEY_ID") |
| 198 | + def secretKey = System.getenv("GPG_SECRET_KEY") |
| 199 | + def password = System.getenv("GPG_PASSWORD") |
| 200 | + |
| 201 | + required { |
| 202 | + !project.version.endsWith("SNAPSHOT") && gradle.taskGraph.hasTask("publishDistPublicationToCentralRepository") |
| 203 | + } |
| 204 | + |
| 205 | + useInMemoryPgpKeys(keyId, secretKey, password) |
| 206 | + sign publishing.publications.dist |
| 207 | + } |
211 | 208 | } |
212 | 209 |
|
213 | 210 | task printClasspath() { |
|
0 commit comments