Skip to content

Commit

Permalink
Support publishing Gradle plugin marker artifact (#766)
Browse files Browse the repository at this point in the history
* Configure publishing plugin

https://plugins.gradle.org/docs/publish-plugin

* Compat old users

* Fix legacy namespace
  • Loading branch information
Goooler authored Feb 28, 2024
1 parent 8675d71 commit 040baf7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions plugins/gradle/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id "com.github.johnrengelman.shadow" version "8.1.0"
id "com.gradle.plugin-publish" version "1.2.1"
id 'java'
id 'groovy'
id 'maven-publish'
Expand Down Expand Up @@ -44,6 +45,19 @@ dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.11'
}

gradlePlugin {
website = "https://mobivm.github.io"
vcsUrl = "https://github.com/MobiVM/robovm"
plugins {
create("robovm") {
id = "com.mobidevelop.robovm"
implementationClass = "org.robovm.gradle.RoboVMPlugin"
displayName = "RoboVM Gradle Plugin"
description = "The RoboVM Gradle Plugin provides a way to build RoboVM apps using Gradle."
}
}
}

publishing {
publications {
mavenJava(MavenPublication) {
Expand Down Expand Up @@ -125,3 +139,7 @@ signing {
assemble.dependsOn('shadowJar')
publishToMavenLocal.dependsOn('shadowJar')
publish.dependsOn('shadowJar')

tasks.withType(AbstractPublishToMaven).configureEach {
dependsOn(tasks.withType(Sign))
}
1 change: 1 addition & 0 deletions plugins/gradle/src/main/resources/META-INF/gradle-plugins/robovm.properties
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# Keep this file here for legacy plugin id, to compat users applying this plugin via buildscript classpath.
implementation-class=org.robovm.gradle.RoboVMPlugin

0 comments on commit 040baf7

Please sign in to comment.