Skip to content

Commit

Permalink
Support publishing Gradle plugin marker artifact (MobiVM#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

(cherry picked from commit 040baf7)
  • Loading branch information
Goooler authored and dkimitsa committed Apr 12, 2024
1 parent ca8b03c commit 245b752
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 245b752

Please sign in to comment.