Skip to content

Commit 4b458da

Browse files
marko-bekhtakoentsje
authored andcommitted
HBX-2968 Publish the Gradle Plugins on the Plugin Portal
1 parent 055af1e commit 4b458da

File tree

3 files changed

+52
-4
lines changed

3 files changed

+52
-4
lines changed

ci/release/Jenkinsfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ pipeline {
8282
configFile(fileId: 'release.config.ssh.knownhosts', targetLocation: env.HOME + '/.ssh/known_hosts')]) {
8383
// using MAVEN_GPG_PASSPHRASE (the default env variable name for passphrase in maven gpg plugin)
8484
withCredentials([file(credentialsId: 'release.gpg.private-key', variable: 'RELEASE_GPG_PRIVATE_KEY_PATH'),
85-
string(credentialsId: 'release.gpg.passphrase', variable: 'MAVEN_GPG_PASSPHRASE')]) {
85+
string(credentialsId: 'release.gpg.passphrase', variable: 'MAVEN_GPG_PASSPHRASE'),
86+
usernamePassword(credentialsId: 'gradle-plugin-portal-api-key', passwordVariable: 'GRADLE_PUBLISH_SECRET', usernameVariable: 'GRADLE_PUBLISH_KEY')]) {
8687
sshagent(['ed25519.Hibernate-CI.github.com', 'hibernate.filemgmt.jboss.org', 'hibernate-ci.frs.sourceforge.net']) {
8788
sh 'cat $HOME/.ssh/config'
8889
sh 'git clone https://github.com/hibernate/hibernate-release-scripts.git'

gradle/plugin/build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id 'java-gradle-plugin'
33
id 'maven-publish'
4+
id 'com.gradle.plugin-publish' version '1.2.1'
45
}
56

67
group = 'org.hibernate.tool'
@@ -25,11 +26,19 @@ dependencies {
2526
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
2627
}
2728

29+
rootProject.ext.set("gradle.publish.key", System.env.PLUGIN_PORTAL_USERNAME)
30+
rootProject.ext.set("gradle.publish.secret", System.env.PLUGIN_PORTAL_PASSWORD)
31+
2832
gradlePlugin {
33+
website = 'https://github.com/hibernate/hibernate-tools/tree/main/gradle/plugin'
34+
vcsUrl = 'https://github.com/hibernate/hibernate-tools/tree/main/gradle/plugin'
2935
plugins {
3036
hibernate {
3137
id = 'org.hibernate.tool.hibernate-tools-gradle'
3238
implementationClass = 'org.hibernate.tool.gradle.Plugin'
39+
displayName = 'Hibernate Tools Gradle Plugin'
40+
description = 'Gradle plugin to provide hibernate-tools reverse engineering and code/schema generation abilities.'
41+
tags = ['hibernate','tools','reverse engineering','reveng','generation']
3342
}
3443
}
3544
}

gradle/pom.xml

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030

3131
<name>Hibernate Tools Gradle Plugin</name>
3232
<description>Gradle plugin to provide hibernate-tools reverse engineering and code/schema generation abilities.</description>
33-
<url>http://hibernate.org/tools/</url>
33+
<url>https://hibernate.org/tools/</url>
3434

3535
<issueManagement>
3636
<system>JIRA</system>
37-
<url>http://hibernate.onjira.com/browse/HBX</url>
37+
<url>https://hibernate.atlassian.net/projects/HBX</url>
3838
</issueManagement>
3939

4040
<properties>
@@ -101,4 +101,42 @@
101101
</plugins>
102102
</build>
103103

104-
</project>
104+
<profiles>
105+
<profile>
106+
<id>release</id>
107+
<activation>
108+
<property>
109+
<name>performRelease</name>
110+
<value>true</value>
111+
</property>
112+
</activation>
113+
<build>
114+
<plugins>
115+
<plugin>
116+
<groupId>org.codehaus.mojo</groupId>
117+
<artifactId>exec-maven-plugin</artifactId>
118+
<executions>
119+
<execution>
120+
<id>gradle-publish-to-plugin-portal</id>
121+
<phase>deploy</phase>
122+
<configuration>
123+
<executable>${gradle.executable}</executable>
124+
<arguments>
125+
<argument>publishPlugins</argument>
126+
<argument>-Pversion=${project.version}</argument>
127+
<argument>-Dmaven.repo.local=${settings.localRepository}</argument>
128+
</arguments>
129+
</configuration>
130+
<goals>
131+
<goal>exec</goal>
132+
</goals>
133+
</execution>
134+
</executions>
135+
</plugin>
136+
</plugins>
137+
</build>
138+
</profile>
139+
</profiles>
140+
141+
</project>
142+

0 commit comments

Comments
 (0)