Skip to content

Commit

Permalink
chore: Update readme for new plugin modules
Browse files Browse the repository at this point in the history
  • Loading branch information
zml2008 committed Oct 16, 2022
1 parent a6b692a commit a924944
Showing 1 changed file with 63 additions and 1 deletion.
64 changes: 63 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,66 @@ sponge {

// [...]

```
```

## [`org.spongepowered.gradle.ore`](https://plugins.gradle.org/plugin/org.spongepowered.gradle.ore)

A plugin to deploy artifacts to the [Ore](https://ore.spongepowered.org) plugin repository.

When using SpongeGradle, this plugin is auto-configured based on the plugin configuration used.

Multiple publications are supported for situations where a project produces multiple artifacts.

Full DSL:

```kotlin
oreDeployment {
oreEndpoint("https://ore.spongepowered.org/") // default
apiKey().set(
providers.gradleProperty("org.spongepowered.ore.apiToken")
.orElse(providers.environmentVariable("ORE_TOKEN"))
) // default value

publications {
register("default") {
// Ore project ID, taken from the first plugin created by SpongeGradle when present
projectId.set("id")
createForumPost.set(true) // default
// Contents (aka release notes) for the version
versionBody.set("") // default (empty)
// Channel
channel.set("Release") // default
// Artifact -- must be a single file
publishArtifacts.from(tasks.jar.map { it.outputs }) // default when SpongeGradle is present
}
}

// alternatively:
defaultPublication {
// same as above
}
}
```

## [`org.spongepowered.gradle.repository`](https://plugins.gradle.org/plugin/org.spongepowered.gradle.repository)

Provides a simple way to register Sponge's maven repository in a buildscript:

```groovy
plugins {
id 'org.spongepowered.gradle.repository' version '<version>'
}
repositories {
sponge.releases()
sponge.snapshots()
}
```

This extension is applied to both the `settings` `dependencyResolutionManagement` repository section, as well as the buildscript `repositories` section.

> **Note**
> The Kotlin stub generation for `settings.gradle.kts` files does not generate stubs for the `dependencyResolutionManagement.repositories {}` block. The extension will have to be read manually, using something like:
> ```kotlin
> val sponge = (this as ExtensionAware).extensions.getByType(org.spongepowered.gradle.repository.SpongeRepositoryExtension::class)
> ```

0 comments on commit a924944

Please sign in to comment.