This is an automated email from the ASF dual-hosted git repository.

mdedetrich pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-grpc.git


The following commit(s) were added to refs/heads/main by this push:
     new ae1c5f1c Setup gradle plugin for publishing
ae1c5f1c is described below

commit ae1c5f1ca836116b3b5fbc0852c846c659cb8cef
Author: Matthew de Detrich <[email protected]>
AuthorDate: Mon Aug 7 10:42:54 2023 +0200

    Setup gradle plugin for publishing
---
 .github/workflows/publish-nightly.yml | 25 ++++---------------
 gradle-plugin/build.gradle            | 47 +++++++++++++++++++++++++++--------
 2 files changed, 41 insertions(+), 31 deletions(-)

diff --git a/.github/workflows/publish-nightly.yml 
b/.github/workflows/publish-nightly.yml
index a914cff4..120ed95a 100644
--- a/.github/workflows/publish-nightly.yml
+++ b/.github/workflows/publish-nightly.yml
@@ -31,26 +31,11 @@ jobs:
           NEXUS_USER: ${{ secrets.NEXUS_USER }}
           NEXUS_PW: ${{ secrets.NEXUS_PW }}
 
-# TODO: Need to figure out where to publish gradle plugin, see 
https://github.com/apache/incubator-pekko-grpc/issues/40
-#  gradle-plugin:
-#    name: Release gradle plugin
-#    runs-on: ubuntu-latest
-#    if: github.repository == 'apache/incubator-pekko-grpc'
-#    steps:
-#      - name: Checkout
-#        uses: actions/checkout@v3
-#        with:
-#          # we don't know what commit the last tag was it's safer to get 
entire repo so previousStableVersion resolves
-#          fetch-depth: 0
-#
-#      - name: Setup Java 8
-#        uses: actions/setup-java@v3
-#        with:
-#          distribution: temurin
-#          java-version: 8
-#
-#      - name: Publish Plugin to Gradle Plugin Repository
-#        run: cd gradle-plugin && ./gradlew publishPlugins 
-Pgradle.publish.key='${{ secrets.GRADLE_PUBLISH_KEY }}' 
-Pgradle.publish.secret='${{ secrets.GRADLE_SECRET }}'
+      - name: Publish Plugin to Gradle Plugin Repository
+        run: cd gradle-plugin && ./gradlew publishToSonatype
+        env:
+          NEXUS_USER: ${{ secrets.NEXUS_USER }}
+          NEXUS_PW: ${{ secrets.NEXUS_PW }}
 
       - name: Build Documentation
         run: |-
diff --git a/gradle-plugin/build.gradle b/gradle-plugin/build.gradle
index 21e60808..ecf457f6 100644
--- a/gradle-plugin/build.gradle
+++ b/gradle-plugin/build.gradle
@@ -3,7 +3,7 @@ plugins {
   id 'java-gradle-plugin'
   id 'maven-publish'
   id 'com.palantir.git-version' version '0.10.1'
-  id 'com.gradle.plugin-publish' version '0.11.0'
+  id 'io.github.gradle-nexus.publish-plugin' version '1.0.0'
 }
 
 group = "org.apache.pekko"
@@ -23,18 +23,43 @@ gradlePlugin {
   }
 }
 
-pluginBundle {
-  website = 'https://pekko.apache.org/docs/pekko-grpc/current/'
-  vcsUrl = 'https://github.com/apache/incubator-pekko-grpc'
-  description = 'Building streaming gRPC servers and clients on top of Apache 
Pekko Streams'
-  tags = ['pekko', 'streams', 'reactive']
+publishing {
+    publications.withType(MavenPublication) {
+        pom {
+            name = "pekko-grpc-gradle-plugin"
+            description = "Apache Pekko gRPC - Support for building streaming 
gRPC servers and clients on top of Pekko Streams."
+            url = "https://pekko.apache.org/";
+            licenses {
+                license {
+                    name = "Apache-2.0"
+                    url = "https://www.apache.org/licenses/LICENSE-2.0.html";
+                }
+            }
+            developers {
+                developer {
+                    id = 'contributors'
+                    name = 'Contributors'
+                    url = 
'https://github.com/apache/incubator-pekko-grpc/graphs/contributors'
+                    email = '[email protected]'
+                }
+            }
+            scm {
+                connection = '[email protected]:apache/incubator-pekko-grpc'
+                url = 'https://github.com/apache/incubator-pekko-grpc'
+            }
+        }
+    }
+}
 
-  plugins {
-    pekkoGrpcPlugin {
-      id = 'org.apache.pekko.grpc.gradle'
-      displayName = 'Apache Pekko gRPC'
+nexusPublishing {
+    repositories {
+        sonatype {
+            nexusUrl.set(uri("https://repository.apache.org/";))
+            
snapshotRepositoryUrl.set(uri("https://repository.apache.org/content/repositories/snapshots/";))
+            username = System.getenv("NEXUS_USER")
+            password = System.getenv("NEXUS_PW")
+        }
     }
-  }
 }
 
 jar {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to