Skip to content

Commit

Permalink
Add marker artifact to gradle plugin (#59)
Browse files Browse the repository at this point in the history
* Setup gradle plugin via java-gradle-plugin

This adds a marker artifact to the publication

* Update readme with plugins block example
  • Loading branch information
fourlastor committed Feb 18, 2024
1 parent b46251d commit bc9e53a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,13 @@ We recommend you look at some existing projects for examples:
- [gdx-video-desktop](https://github.com/libgdx/gdx-video/blob/master/gdx-video-desktop/build.gradle)
- [Jamepad](https://github.com/libgdx/Jamepad/blob/master/build.gradle)

```
// Add buildscript dependency
buildscript {
dependencies {
classpath "com.badlogicgames.gdx:gdx-jnigen-gradle:2.X.X"
}
}
```gradle
// Apply jnigen plugin
apply plugin: "com.badlogicgames.gdx.gdx-jnigen"
plugins {
id "com.badlogicgames.gdx.gdx-jnigen"
}
...
// ...
// Define jnigen extension
jnigen {
Expand Down
15 changes: 14 additions & 1 deletion gdx-jnigen-gradle/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
plugins {
id 'java-gradle-plugin'
}

dependencies {
implementation project(":gdx-jnigen")
implementation gradleApi()
}
}

gradlePlugin {
plugins {
register('gdxJniGen') {
id = 'com.badlogicgames.gdx.gdx-jnigen'
implementationClass = 'com.badlogic.gdx.jnigen.gradle.JnigenPlugin'
}
}
}

This file was deleted.

0 comments on commit bc9e53a

Please sign in to comment.