Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Mar 23, 2024
1 parent 392c34c commit 6ac506c
Showing 1 changed file with 35 additions and 7 deletions.
42 changes: 35 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gradle plugin for generating resource files at build time.
```kotlin
plugins {
// Apply the plugin
id("xyz.jpenilla.resource-factory") version "0.0.3"
id("xyz.jpenilla.resource-factory") version "VERSION"
}
```
2) Add resource factories to the desired source sets
Expand All @@ -27,15 +27,43 @@ Gradle plugin for generating resource files at build time.

## Included factories

- PaperPluginYml
- BukkitPluginYml
- VelocityPluginJson
- FabricModJson
- BungeePluginYml
| Type | Convention Plugin |
|--------------------|-----------------------------------------------------|
| PaperPluginYml | `xyz.jpenilla.resource-factory-paper-convention` |
| BukkitPluginYml | `xyz.jpenilla.resource-factory-bukkit-convention` |
| VelocityPluginJson | `xyz.jpenilla.resource-factory-velocity-convention` |
| FabricModJson | `xyz.jpenilla.resource-factory-fabric-convention` |
| BungeePluginYml | `xyz.jpenilla.resource-factory-bungee-convention` |

The included factories can be created in two ways.
The included factories can be used in two ways.
PaperPluginYml is used as an example, but the process is the same for the other included factories.

### Convention Plugins

The provided convention plugins can be applied in addition to or instead of the base `xyz.jpenilla.resource-factory`
plugin.
These conventions behave the same as the below manual examples, however they also register an extension for the resource
object.
This allows simplifying use to the following:

```kotlin
plugins {
// Apply the convention plugin
id("xyz.jpenilla.resource-factory-paper-convention") version "VERSION"
}

paperPluginYml {
// Defaults for name, version, and description are inherited from the Gradle project
main = "main.class.Name"
authors.add("MyName")
// configure fields...
}
```

### Manually

The included factories can be used manually in two ways.

1) Directly on the project instance, and then registered manually
```kotlin
import xyz.jpenilla.resourcefactory.paper.paperPluginYml
Expand Down

0 comments on commit 6ac506c

Please sign in to comment.