Skip to content

Commit a924944

Browse files
committed
chore: Update readme for new plugin modules
1 parent a6b692a commit a924944

File tree

1 file changed

+63
-1
lines changed

1 file changed

+63
-1
lines changed

README.md

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,66 @@ sponge {
4646

4747
// [...]
4848

49-
```
49+
```
50+
51+
## [`org.spongepowered.gradle.ore`](https://plugins.gradle.org/plugin/org.spongepowered.gradle.ore)
52+
53+
A plugin to deploy artifacts to the [Ore](https://ore.spongepowered.org) plugin repository.
54+
55+
When using SpongeGradle, this plugin is auto-configured based on the plugin configuration used.
56+
57+
Multiple publications are supported for situations where a project produces multiple artifacts.
58+
59+
Full DSL:
60+
61+
```kotlin
62+
oreDeployment {
63+
oreEndpoint("https://ore.spongepowered.org/") // default
64+
apiKey().set(
65+
providers.gradleProperty("org.spongepowered.ore.apiToken")
66+
.orElse(providers.environmentVariable("ORE_TOKEN"))
67+
) // default value
68+
69+
publications {
70+
register("default") {
71+
// Ore project ID, taken from the first plugin created by SpongeGradle when present
72+
projectId.set("id")
73+
createForumPost.set(true) // default
74+
// Contents (aka release notes) for the version
75+
versionBody.set("") // default (empty)
76+
// Channel
77+
channel.set("Release") // default
78+
// Artifact -- must be a single file
79+
publishArtifacts.from(tasks.jar.map { it.outputs }) // default when SpongeGradle is present
80+
}
81+
}
82+
83+
// alternatively:
84+
defaultPublication {
85+
// same as above
86+
}
87+
}
88+
```
89+
90+
## [`org.spongepowered.gradle.repository`](https://plugins.gradle.org/plugin/org.spongepowered.gradle.repository)
91+
92+
Provides a simple way to register Sponge's maven repository in a buildscript:
93+
94+
```groovy
95+
plugins {
96+
id 'org.spongepowered.gradle.repository' version '<version>'
97+
}
98+
99+
repositories {
100+
sponge.releases()
101+
sponge.snapshots()
102+
}
103+
```
104+
105+
This extension is applied to both the `settings` `dependencyResolutionManagement` repository section, as well as the buildscript `repositories` section.
106+
107+
> **Note**
108+
> 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:
109+
> ```kotlin
110+
> val sponge = (this as ExtensionAware).extensions.getByType(org.spongepowered.gradle.repository.SpongeRepositoryExtension::class)
111+
> ```

0 commit comments

Comments
 (0)