1
- import jetbrains.sign.GpgSignSignatoryProvider
2
1
import org.gradle.jvm.tasks.Jar
3
2
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
4
3
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@@ -20,33 +19,18 @@ import plugins.publishing.*
20
19
* limitations under the License.
21
20
*/
22
21
23
- buildscript {
24
- repositories {
25
- maven { url = uri(" https://packages.jetbrains.team/maven/p/jcs/maven" ) }
26
- }
27
- dependencies {
28
- classpath(" com.jetbrains:jet-sign:38" )
29
- }
30
- }
31
-
32
22
repositories {
33
23
mavenCentral()
34
24
}
35
25
36
26
plugins {
37
27
kotlin(" multiplatform" ) version " 1.9.22"
38
- id(" io.github.gradle-nexus.publish-plugin" ) version " 1.1.0"
39
28
`maven- publish`
40
- signing
41
29
java
42
30
}
43
31
44
- var projectVersion = project.findProperty(" projectVersion" ) as String
45
- val publishingUser: String? = System .getenv(" PUBLISHING_USER" )
46
- val publishingPassword: String? = System .getenv(" PUBLISHING_PASSWORD" )
47
- if (publishingPassword == null ) {
48
- projectVersion + = " -SNAPSHOT"
49
- }
32
+ val projectVersion = project.findProperty(" projectVersion" ) as String
33
+
50
34
println (" ##teamcity[setParameter name='java.annotations.version' value='$projectVersion ']" )
51
35
52
36
// https://github.com/gradle/gradle/issues/847
@@ -200,15 +184,6 @@ tasks {
200
184
}
201
185
}
202
186
203
- nexusPublishing {
204
- repositories {
205
- sonatype {
206
- username.set(publishingUser)
207
- password.set(publishingPassword)
208
- }
209
- }
210
- }
211
-
212
187
configurations {
213
188
create(" javaOnlySourcesElements" ) {
214
189
copyAttributes(configurations.findByName(" jvmSourcesElements" )!! .attributes, attributes)
@@ -230,6 +205,11 @@ artifacts {
230
205
}
231
206
232
207
publishing {
208
+ repositories {
209
+ maven {
210
+ setUrl(layout.buildDirectory.dir(" maven-central-artifacts" ))
211
+ }
212
+ }
233
213
val artifactBaseName = base.archivesName.get()
234
214
configureMultiModuleMavenPublishing {
235
215
val rootModule = module(" rootModule" ) {
@@ -310,12 +290,3 @@ fun MavenPublication.configureKotlinPomAttributes(
310
290
}
311
291
}
312
292
}
313
-
314
- signing {
315
- sign(publishing.publications)
316
- signatories = GpgSignSignatoryProvider ()
317
- }
318
-
319
- tasks.register(" signAll" ) {
320
- dependsOn(tasks.withType<Sign >())
321
- }
0 commit comments