From 747c5ac13d2b7990b6cee634e29f64a7b2ffd2d7 Mon Sep 17 00:00:00 2001 From: Ivan Migalev Date: Thu, 22 Aug 2024 13:48:38 +0200 Subject: [PATCH 01/10] Signing: migrate to Central Publishing plugin --- buildSrc/build.gradle.kts | 1 + .../rd/gradle/plugins/KotlinJVMPlugin.kt | 81 +++++++++++-------- gradle.properties | 3 +- 3 files changed, 51 insertions(+), 34 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index ab98c6869..fb1f1b2cc 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -16,4 +16,5 @@ dependencies { implementation("com.moowork.gradle:gradle-node-plugin:1.3.1") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4") implementation("com.jetbrains:jet-sign:45.47") + implementation("net.thebugmc.gradle:sonatype-central-portal-publisher:1.2.4") } diff --git a/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt b/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt index 1030ea710..090c7703a 100644 --- a/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt +++ b/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt @@ -3,6 +3,8 @@ package com.jetbrains.rd.gradle.plugins import com.jetbrains.rd.gradle.dependencies.junitVersion import com.jetbrains.rd.gradle.dependencies.kotlinVersion import jetbrains.sign.GpgSignSignatoryProvider +import net.thebugmc.gradle.sonatypepublisher.CentralPortalExtension +import net.thebugmc.gradle.sonatypepublisher.PublishingType import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.publish.PublishingExtension @@ -23,6 +25,7 @@ open class KotlinJVMPlugin : Plugin { apply(plugin = "maven-publish") apply(plugin = "org.jetbrains.dokka") apply(plugin = "signing") + apply(plugin = "net.thebugmc.gradle.sonatype-central-portal-publisher") configure { val sourceJar by tasks.creating(Jar::class) { @@ -50,9 +53,10 @@ open class KotlinJVMPlugin : Plugin { enabled = false } - configure { - publications { - if (project.name != "rd-cross") { + if (project.name != "rd-cross") { + val deployToCentral = rootProject.extra["deployMavenToMavenCentral"].toString().toBoolean() + configure { + publications { register("pluginMaven", MavenPublication::class.java) { groupId = "com.jetbrains.rd" artifactId = project.name @@ -91,45 +95,56 @@ open class KotlinJVMPlugin : Plugin { artifact(packageJavadoc) } } - } - val isUnderTeamCity = System.getenv("TEAMCITY_VERSION") != null - project.configure { - if (isUnderTeamCity) { - sign(publications) - signatories = GpgSignSignatoryProvider() - } - } - val deployToIntelliJ = rootProject.extra["deployMavenToIntelliJDependencies"].toString().toBoolean() - val deployToSonatype = rootProject.extra["deployMavenToSonatype"].toString().toBoolean() - repositories { - maven { - name = "artifacts" - url = uri(rootProject.projectDir.resolve("build").resolve("artifacts").resolve("maven")) - } - if (deployToIntelliJ) { - maven { - name = "intellij-dependencies" - url = uri("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies/") - credentials { - username = "Bearer" - password = rootProject.extra["internalDeployKey"].toString() - } + val isUnderTeamCity = System.getenv("TEAMCITY_VERSION") != null + project.configure { + if (isUnderTeamCity) { + sign(publications) + signatories = GpgSignSignatoryProvider() } } - if (deployToSonatype) { + val deployToIntelliJ = rootProject.extra["deployMavenToIntelliJDependencies"].toString().toBoolean() +// val deployToSonatype = rootProject.extra["deployMavenToSonatype"].toString().toBoolean() + repositories { maven { - name = "maven-central" - url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") - credentials { - username = rootProject.extra["sonatypeUser"].toString() - password = rootProject.extra["sonatypePassword"].toString() + name = "artifacts" + url = uri(rootProject.projectDir.resolve("build").resolve("artifacts").resolve("maven")) + } + if (deployToIntelliJ) { + maven { + name = "intellij-dependencies" + url = uri("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies/") + credentials { + username = "Bearer" + password = rootProject.extra["internalDeployKey"].toString() + } } } + +// if (deployToSonatype) { +// maven { +// name = "maven-central" +// url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") +// credentials { +// username = rootProject.extra["sonatypeUser"].toString() +// password = rootProject.extra["sonatypePassword"].toString() +// } +// } +// } } } - } + if (deployToCentral) { + val user = rootProject.extra["sonatypePortalUser"] as String + val token = rootProject.extra["sonatypePortalToken"] as String + project.configure { + username.set(user) + password.set(token) + + publishingType.set(PublishingType.USER_MANAGED) + } + } + } val test by tasks.getting(Test::class) { maxHeapSize = "512m" diff --git a/gradle.properties b/gradle.properties index f272632cc..007267ef6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,6 +2,7 @@ org.gradle.jvmargs=-Xmx1024m version=2024.3-pre2 deployMavenToIntelliJDependencies=false -deployMavenToSonatype=false +#deployMavenToSonatype=false +deployMavenToMavenCentral=false deployNuGetToNuGetOrg=false deployNuGetToInternal=false From 5b06f0de91dfcb812e0ce49a01d05ced8ea76116 Mon Sep 17 00:00:00 2001 From: Ivan Migalev Date: Thu, 22 Aug 2024 14:01:42 +0200 Subject: [PATCH 02/10] Release: prepare 2024.3-pre3 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 007267ef6..e640ea3c3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ org.gradle.jvmargs=-Xmx1024m -version=2024.3-pre2 +version=2024.3-pre3 deployMavenToIntelliJDependencies=false #deployMavenToSonatype=false deployMavenToMavenCentral=false From 141f2ce1d0de8ff8dee65612886331052daa04ad Mon Sep 17 00:00:00 2001 From: Ivan Migalev Date: Thu, 22 Aug 2024 14:15:22 +0200 Subject: [PATCH 03/10] Publish: move group id to a common place --- .../kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt b/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt index 090c7703a..f440e6700 100644 --- a/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt +++ b/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt @@ -27,6 +27,8 @@ open class KotlinJVMPlugin : Plugin { apply(plugin = "signing") apply(plugin = "net.thebugmc.gradle.sonatype-central-portal-publisher") + group = "com.jetbrains.rd" + configure { val sourceJar by tasks.creating(Jar::class) { from(sourceSets["main"].kotlin.sourceDirectories) @@ -58,7 +60,6 @@ open class KotlinJVMPlugin : Plugin { configure { publications { register("pluginMaven", MavenPublication::class.java) { - groupId = "com.jetbrains.rd" artifactId = project.name version = rootProject.version as String From a29f2a578e09c6f0e50893258b4f627f8f85acdd Mon Sep 17 00:00:00 2001 From: Ivan Migalev Date: Thu, 22 Aug 2024 14:25:24 +0200 Subject: [PATCH 04/10] Publish: replicate name and pom --- .../rd/gradle/plugins/KotlinJVMPlugin.kt | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt b/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt index f440e6700..c6c1caed1 100644 --- a/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt +++ b/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt @@ -139,10 +139,36 @@ open class KotlinJVMPlugin : Plugin { val user = rootProject.extra["sonatypePortalUser"] as String val token = rootProject.extra["sonatypePortalToken"] as String project.configure { + publishingType.set(PublishingType.USER_MANAGED) username.set(user) password.set(token) - - publishingType.set(PublishingType.USER_MANAGED) + name.set(project.name) + pom { + url.set("https://github.com/JetBrains/rd") + licenses { + license { + name.set("The Apache License, Version 2.0") + url.set("https://www.apache.org/licenses/LICENSE-2.0") + } + } + developers { + // According to the reference, this should be the person(s) to be contacted about the project. + developer { + id.set("ivan.migalev") + name.set("Ivan Migalev") + email.set("ivan.migalev@jetbrains.com") + } + developer { + id.set("mikhail.filippov") + name.set("Mikhail Filippov") + email.set("Mikhail.Filippov@jetbrains.com") + } + } + scm { + connection.set("scm:git:https://github.com/JetBrains/rd.git") + url.set("https://github.com/JetBrains/rd") + } + } } } } From 5a456346d6cb2a7e3e6dfe6ace3f9e954822457e Mon Sep 17 00:00:00 2001 From: Ivan Migalev Date: Thu, 22 Aug 2024 14:41:55 +0200 Subject: [PATCH 05/10] Publish: package javadoc --- .../kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt b/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt index c6c1caed1..fcc360078 100644 --- a/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt +++ b/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt @@ -169,6 +169,7 @@ open class KotlinJVMPlugin : Plugin { url.set("https://github.com/JetBrains/rd") } } + javadocJarTask.set(packageJavadoc) } } } From 75a7ddfdb046a7da6ffe7b1754c7da788f5a2af0 Mon Sep 17 00:00:00 2001 From: Ivan Migalev Date: Thu, 22 Aug 2024 16:05:54 +0200 Subject: [PATCH 06/10] Publish: package sources correctly --- .../kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt b/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt index fcc360078..0856f3bb8 100644 --- a/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt +++ b/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt @@ -170,6 +170,7 @@ open class KotlinJVMPlugin : Plugin { } } javadocJarTask.set(packageJavadoc) + sourcesJarTask.set(sourceJar) } } } From ea9d94a927fd51524e93a0df8ff32b7cd11f9e47 Mon Sep 17 00:00:00 2001 From: Ivan Migalev Date: Wed, 18 Sep 2024 18:36:02 +0200 Subject: [PATCH 07/10] Publish: implement upload via HTTP --- build.gradle.kts | 70 ++++++++++++++++ .../rd/gradle/plugins/KotlinJVMPlugin.kt | 81 +++++++++---------- gradle.properties | 4 +- 3 files changed, 111 insertions(+), 44 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index d192d95fa..f7b9876e7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,9 +1,17 @@ import com.jetbrains.rd.gradle.dependencies.kotlinVersion +import okhttp3.MultipartBody +import okhttp3.OkHttpClient +import okhttp3.Request +import okhttp3.RequestBody.Companion.asRequestBody import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import java.util.* buildscript { + dependencies { + classpath("com.squareup.okhttp3:okhttp:4.12.0") + } project.extra.apply { val repoRoot = rootProject.projectDir set("repoRoot", repoRoot) @@ -180,4 +188,66 @@ tasks { named("publish") { dependsOn(publishNuGet) } + + val packSonatypeCentralBundle by registering(Zip::class) { + group = publishingGroup + + dependsOn( + ":rd-core:publishAllPublicationsToArtifactsRepository", + ":rd-framework:publishAllPublicationsToArtifactsRepository", + ":rd-gen:publishAllPublicationsToArtifactsRepository", + ":rd-swing:publishAllPublicationsToArtifactsRepository", + ":rd-text:publishAllPublicationsToArtifactsRepository" + ) + + from(layout.buildDirectory.dir("artifacts/maven")) + archiveFileName.set("bundle.zip") + destinationDirectory.set(layout.buildDirectory) + } + + val publishMavenToCentralPortal by registering { + group = publishingGroup + + dependsOn(packSonatypeCentralBundle) + + doLast { + val uriBase = rootProject.extra["centralPortalApiUrl"] as String + val publicationType = "USER_MANAGED" + val deploymentName = "rd-$version" + val uri = "$uriBase?name=$deploymentName&publicationType=$publicationType" + + val userName = rootProject.extra["centralPortalUserName"] as String + val token = rootProject.extra["centralPortalToken"] as String + val base64Auth = Base64.getEncoder().encode("$userName:$token".toByteArray()).toString(Charsets.UTF_8) + val bundleFile = packSonatypeCentralBundle.get().archiveFile.get().asFile + + println("Sending request to $uri...") + + val client = OkHttpClient() + val request = Request.Builder() + .url(uri) + .header("Authorization", "Bearer $base64Auth") + .post( + MultipartBody.Builder() + .setType(MultipartBody.FORM) + .addFormDataPart("bundle", bundleFile.name, bundleFile.asRequestBody()) + .build() + ) + .build() + val response = client.newCall(request).execute() +// val client = HttpClient.newHttpClient() +// val request = HttpRequest.newBuilder(uri) +// .header("Authorization", "Bearer $base64Auth") +// .header("Content-Type", "multipart/form-data; boundary=---WD9146A") +// .POST(HttpRequest.BodyPublishers.ofFile(bundleFile.asFile.toPath())) +// .build() + + val statusCode = response.code + println("Upload status code: $statusCode") + println("Upload result: ${response.body!!.string()}") + if (statusCode != 201) { + error("Upload error to Central repository. Status code $statusCode.") + } + } + } } diff --git a/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt b/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt index 0856f3bb8..49f3dd0bb 100644 --- a/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt +++ b/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt @@ -3,8 +3,6 @@ package com.jetbrains.rd.gradle.plugins import com.jetbrains.rd.gradle.dependencies.junitVersion import com.jetbrains.rd.gradle.dependencies.kotlinVersion import jetbrains.sign.GpgSignSignatoryProvider -import net.thebugmc.gradle.sonatypepublisher.CentralPortalExtension -import net.thebugmc.gradle.sonatypepublisher.PublishingType import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.publish.PublishingExtension @@ -25,7 +23,7 @@ open class KotlinJVMPlugin : Plugin { apply(plugin = "maven-publish") apply(plugin = "org.jetbrains.dokka") apply(plugin = "signing") - apply(plugin = "net.thebugmc.gradle.sonatype-central-portal-publisher") +// apply(plugin = "net.thebugmc.gradle.sonatype-central-portal-publisher") group = "com.jetbrains.rd" @@ -56,7 +54,6 @@ open class KotlinJVMPlugin : Plugin { } if (project.name != "rd-cross") { - val deployToCentral = rootProject.extra["deployMavenToMavenCentral"].toString().toBoolean() configure { publications { register("pluginMaven", MavenPublication::class.java) { @@ -135,44 +132,44 @@ open class KotlinJVMPlugin : Plugin { } } - if (deployToCentral) { - val user = rootProject.extra["sonatypePortalUser"] as String - val token = rootProject.extra["sonatypePortalToken"] as String - project.configure { - publishingType.set(PublishingType.USER_MANAGED) - username.set(user) - password.set(token) - name.set(project.name) - pom { - url.set("https://github.com/JetBrains/rd") - licenses { - license { - name.set("The Apache License, Version 2.0") - url.set("https://www.apache.org/licenses/LICENSE-2.0") - } - } - developers { - // According to the reference, this should be the person(s) to be contacted about the project. - developer { - id.set("ivan.migalev") - name.set("Ivan Migalev") - email.set("ivan.migalev@jetbrains.com") - } - developer { - id.set("mikhail.filippov") - name.set("Mikhail Filippov") - email.set("Mikhail.Filippov@jetbrains.com") - } - } - scm { - connection.set("scm:git:https://github.com/JetBrains/rd.git") - url.set("https://github.com/JetBrains/rd") - } - } - javadocJarTask.set(packageJavadoc) - sourcesJarTask.set(sourceJar) - } - } +// if (deployToCentral) { +// val user = rootProject.extra["sonatypePortalUser"] as String +// val token = rootProject.extra["sonatypePortalToken"] as String +// project.configure { +// publishingType.set(PublishingType.USER_MANAGED) +// username.set(user) +// password.set(token) +// name.set(project.name) +// pom { +// url.set("https://github.com/JetBrains/rd") +// licenses { +// license { +// name.set("The Apache License, Version 2.0") +// url.set("https://www.apache.org/licenses/LICENSE-2.0") +// } +// } +// developers { +// // According to the reference, this should be the person(s) to be contacted about the project. +// developer { +// id.set("ivan.migalev") +// name.set("Ivan Migalev") +// email.set("ivan.migalev@jetbrains.com") +// } +// developer { +// id.set("mikhail.filippov") +// name.set("Mikhail Filippov") +// email.set("Mikhail.Filippov@jetbrains.com") +// } +// } +// scm { +// connection.set("scm:git:https://github.com/JetBrains/rd.git") +// url.set("https://github.com/JetBrains/rd") +// } +// } +// javadocJarTask.set(packageJavadoc) +// sourcesJarTask.set(sourceJar) +// } +// } } val test by tasks.getting(Test::class) { diff --git a/gradle.properties b/gradle.properties index e640ea3c3..d4fcad031 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,8 +1,8 @@ org.gradle.jvmargs=-Xmx1024m version=2024.3-pre3 + deployMavenToIntelliJDependencies=false -#deployMavenToSonatype=false -deployMavenToMavenCentral=false +centralPortalApiUrl=https://central.sonatype.com/api/v1/publisher/upload deployNuGetToNuGetOrg=false deployNuGetToInternal=false From f456f0fe65a032a331ac1cbc209b7b92a51b68e2 Mon Sep 17 00:00:00 2001 From: Ivan Migalev Date: Wed, 18 Sep 2024 18:50:14 +0200 Subject: [PATCH 08/10] Publish: add a flag to depend common publishing on the Central Portal task --- build.gradle.kts | 13 +++++++++---- gradle.properties | 4 +++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index f7b9876e7..d2cf85ef6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -185,10 +185,6 @@ tasks { } } - named("publish") { - dependsOn(publishNuGet) - } - val packSonatypeCentralBundle by registering(Zip::class) { group = publishingGroup @@ -250,4 +246,13 @@ tasks { } } } + + named("publish") { + dependsOn(publishNuGet) + + val deployToCentral = rootProject.extra["deployMavenToCentralPortal"].toString().toBoolean() + if (deployToCentral) { + dependsOn(publishMavenToCentralPortal) + } + } } diff --git a/gradle.properties b/gradle.properties index d4fcad031..d1dc13024 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,6 +3,8 @@ org.gradle.jvmargs=-Xmx1024m version=2024.3-pre3 deployMavenToIntelliJDependencies=false -centralPortalApiUrl=https://central.sonatype.com/api/v1/publisher/upload +deployMavenToCentralPortal=false deployNuGetToNuGetOrg=false deployNuGetToInternal=false + +centralPortalApiUrl=https://central.sonatype.com/api/v1/publisher/upload From 664ccb2957a8f0a70edb3fbafe6058e09adf94f3 Mon Sep 17 00:00:00 2001 From: Ivan Migalev Date: Wed, 18 Sep 2024 19:25:02 +0200 Subject: [PATCH 09/10] Release: prepare 2024.3.0 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index d1dc13024..61c94f2c7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ org.gradle.jvmargs=-Xmx1024m -version=2024.3-pre3 +version=2024.3.0 deployMavenToIntelliJDependencies=false deployMavenToCentralPortal=false From 485d95243f0cf99cdc6a357a51dad80216ce8828 Mon Sep 17 00:00:00 2001 From: Ivan Migalev Date: Wed, 18 Sep 2024 19:30:32 +0200 Subject: [PATCH 10/10] Publish: cleanup --- build.gradle.kts | 6 --- buildSrc/build.gradle.kts | 1 - .../rd/gradle/plugins/KotlinJVMPlugin.kt | 52 ------------------- 3 files changed, 59 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index d2cf85ef6..2af6b7e19 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -231,12 +231,6 @@ tasks { ) .build() val response = client.newCall(request).execute() -// val client = HttpClient.newHttpClient() -// val request = HttpRequest.newBuilder(uri) -// .header("Authorization", "Bearer $base64Auth") -// .header("Content-Type", "multipart/form-data; boundary=---WD9146A") -// .POST(HttpRequest.BodyPublishers.ofFile(bundleFile.asFile.toPath())) -// .build() val statusCode = response.code println("Upload status code: $statusCode") diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index fb1f1b2cc..ab98c6869 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -16,5 +16,4 @@ dependencies { implementation("com.moowork.gradle:gradle-node-plugin:1.3.1") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4") implementation("com.jetbrains:jet-sign:45.47") - implementation("net.thebugmc.gradle:sonatype-central-portal-publisher:1.2.4") } diff --git a/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt b/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt index 49f3dd0bb..c0c518bd0 100644 --- a/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt +++ b/buildSrc/src/main/kotlin/com/jetbrains/rd/gradle/plugins/KotlinJVMPlugin.kt @@ -23,7 +23,6 @@ open class KotlinJVMPlugin : Plugin { apply(plugin = "maven-publish") apply(plugin = "org.jetbrains.dokka") apply(plugin = "signing") -// apply(plugin = "net.thebugmc.gradle.sonatype-central-portal-publisher") group = "com.jetbrains.rd" @@ -102,7 +101,6 @@ open class KotlinJVMPlugin : Plugin { } } val deployToIntelliJ = rootProject.extra["deployMavenToIntelliJDependencies"].toString().toBoolean() -// val deployToSonatype = rootProject.extra["deployMavenToSonatype"].toString().toBoolean() repositories { maven { name = "artifacts" @@ -118,58 +116,8 @@ open class KotlinJVMPlugin : Plugin { } } } - -// if (deployToSonatype) { -// maven { -// name = "maven-central" -// url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") -// credentials { -// username = rootProject.extra["sonatypeUser"].toString() -// password = rootProject.extra["sonatypePassword"].toString() -// } -// } -// } } } - -// if (deployToCentral) { -// val user = rootProject.extra["sonatypePortalUser"] as String -// val token = rootProject.extra["sonatypePortalToken"] as String -// project.configure { -// publishingType.set(PublishingType.USER_MANAGED) -// username.set(user) -// password.set(token) -// name.set(project.name) -// pom { -// url.set("https://github.com/JetBrains/rd") -// licenses { -// license { -// name.set("The Apache License, Version 2.0") -// url.set("https://www.apache.org/licenses/LICENSE-2.0") -// } -// } -// developers { -// // According to the reference, this should be the person(s) to be contacted about the project. -// developer { -// id.set("ivan.migalev") -// name.set("Ivan Migalev") -// email.set("ivan.migalev@jetbrains.com") -// } -// developer { -// id.set("mikhail.filippov") -// name.set("Mikhail Filippov") -// email.set("Mikhail.Filippov@jetbrains.com") -// } -// } -// scm { -// connection.set("scm:git:https://github.com/JetBrains/rd.git") -// url.set("https://github.com/JetBrains/rd") -// } -// } -// javadocJarTask.set(packageJavadoc) -// sourcesJarTask.set(sourceJar) -// } -// } } val test by tasks.getting(Test::class) {