Skip to content

Commit 8362668

Browse files
committed
Build and publish the shared base alongside main build
1 parent 657c9e6 commit 8362668

File tree

7 files changed

+23
-57
lines changed

7 files changed

+23
-57
lines changed

.github/workflows/publish-shared.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
push:
55
branches: [ 'main' ]
66
paths-ignore:
7-
- 'gradleutils-shared/**'
87
- '.github/workflows/**'
8+
- 'docs/**'
99
- 'README.md'
1010

1111
permissions:
@@ -16,8 +16,8 @@ jobs:
1616
uses: MinecraftForge/SharedActions/.github/workflows/gradle.yml@v0
1717
with:
1818
java: 17
19-
gradle_tasks: ':gradleutils-shared:check :check :publish :publishPlugins'
20-
artifact_name: 'gradleutils'
19+
gradle_tasks: ':gradleutils-shared:check :check :gradleutils-shared:publish :publish :publishPlugins'
20+
artifact_name: 'gradleutils,gradleutils-shared'
2121
secrets:
2222
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
2323
PROMOTE_ARTIFACT_WEBHOOK: ${{ secrets.PROMOTE_ARTIFACT_WEBHOOK }}

build.gradle

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ plugins {
1010
id 'maven-publish'
1111
id 'io.freefair.javadoc-links'
1212
id 'net.minecraftforge.gradleutils'
13-
alias libs.plugins.licenser
14-
alias libs.plugins.gitversion
13+
id 'net.minecraftforge.gitversion'
1514
alias libs.plugins.changelog
15+
alias libs.plugins.licenser
1616
alias libs.plugins.plugin.publish
1717
alias libs.plugins.shadow
1818
}
@@ -21,7 +21,7 @@ final projectDisplayName = 'Forge Gradle Utilities'
2121
description = 'Small collection of utilities for standardizing MinecraftForge gradle scripts'
2222
base.archivesName = 'gradleutils'
2323
group = 'net.minecraftforge'
24-
version = gitversion.tagOffset
24+
// version set by gitversion in settings.gradle
2525

2626
println "Version: $version"
2727

@@ -42,7 +42,7 @@ configurations {
4242
attributes {
4343
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling, Bundling.SHADOWED))
4444
}
45-
} because 'Project dependencies do not read the published module file, so the shadowed attribute is manually declared'
45+
} because 'Project dependencies do not read the published module file, so the shadowed attribute is manually declared.'
4646
}
4747
}
4848

@@ -76,7 +76,6 @@ dependencies {
7676
}
7777

7878
// Removes local Gradle API from compileOnly. This is a workaround for bugged plugins.
79-
// TODO [GradleUtils][GradleAPI] Remove this once they are fixed.
8079
// Publish Plugin: https://github.com/gradle/plugin-portal-requests/issues/260
8180
// Shadow: https://github.com/GradleUp/shadow/pull/1422
8281
afterEvaluate { project ->
@@ -128,7 +127,7 @@ gradlePlugin {
128127
implementationClass = 'net.minecraftforge.gradleutils.GradleUtilsPlugin'
129128
displayName = projectDisplayName
130129
description = project.description
131-
tags.set(['minecraftforge'])
130+
tags = ['minecraftforge']
132131
}
133132
}
134133

docs/releases/3.0.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# GradleUtils 3
22

3-
GradleUtils 3 is a new release of GradleUtils that includes a compete rewrite of
4-
the plugin, along with its components. It is now written for Java version 17 and
3+
GradleUtils 3 is a new release of GradleUtils that includes a complete rewrite
4+
of the plugin, along with its components. It is now written for Java version 17 and
55
targets Gradle 9.0.0.
66

77
## Additions
@@ -89,10 +89,8 @@ publishing info.
8989
9090
### Plugin Application
9191
92-
GradleUtils is no longer restricted to only plugins. It can now be applied to
93-
any type of `ExtensionAware`, which includes the `settings.gradle`. Projects
94-
that apply the plugin will now use a subset of the `gradleutils` extension that
95-
includes project-specific members, such as `gradleutils.pom`.
92+
GradleUtils is no longer restricted to only projects. It can now be applied to
93+
any type of `ExtensionAware`, which includes the `settings.gradle`.
9694
9795
### Release Maven Publishing
9896

gradleutils-shared/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins. This is meant to be a tool internal to Forge, but any one case use it
55
if they want.
66

77
> [!NOTE]
8-
> The version number is intentionally shared with base GradleUtils. However, it
9-
> may not always be published alongside it. Check the
10-
> [Forge Files Site](https://files.minecraftforge.net/net/minecraftforge/gradleutils-shared/index.html)
11-
> for the latest version before using it.
8+
> The version number is intentionally shared with base GradleUtils. It will
9+
> always be built alongside GradleUtils, but it is not published to the Gradle
10+
> Plugin Portal or Maven Central, only to the Forge Maven at
11+
> `https://maven.minecraftforge.net`.

gradleutils-shared/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ plugins {
1010
id 'io.freefair.javadoc-links'
1111
id 'net.minecraftforge.gradleutils'
1212
alias libs.plugins.licenser
13-
alias libs.plugins.gitversion
1413
alias libs.plugins.shadow
1514
}
1615

1716
final projectDisplayName = 'Minecraft Forge Shared Plugin Base'
1817
base.archivesName = 'gradleutils-shared'
1918
description = 'The shared base used by all of Minecraft Forge\'s Gradle plugins'
2019
group = 'net.minecraftforge'
21-
version = gitversion.tagOffset
20+
// version set by gitversion in settings.gradle
2221

2322
println "Version: $version"
2423

settings.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ plugins {
1313
// NOTE: We need to load this into the classpath before GradleUtils for the service to load correctly
1414
id 'io.freefair.javadoc-links' version '8.14' apply false // https://plugins.gradle.org/plugin/io.freefair.javadoc-links
1515

16-
id 'net.minecraftforge.gradleutils' version '3.0.0-beta.20' // https://plugins.gradle.org/plugin/net.minecraftforge.gradleutils
16+
id 'net.minecraftforge.gradleutils' version '3.0.0-beta.30' // https://plugins.gradle.org/plugin/net.minecraftforge.gradleutils
17+
id 'net.minecraftforge.gitversion' version '3.0.0' // https://plugins.gradle.org/plugin/net.minecraftforge.gitversion
1718
}
1819

1920
rootProject.name = 'gradleutils'
@@ -32,11 +33,10 @@ dependencyResolutionManagement {
3233
register('libs') {
3334
version 'gradle-javadoc-links', '8.14'
3435

35-
plugin 'licenser', 'net.minecraftforge.licenser' version '1.2.0' // https://plugins.gradle.org/plugin/net.minecraftforge.licenser
36-
plugin 'gitversion', 'net.minecraftforge.gitversion' version '3.0.0-beta.22' // https://plugins.gradle.org/plugin/net.minecraftforge.gitversion
37-
plugin 'changelog', 'net.minecraftforge.changelog' version '3.0.0-beta.22' // https://plugins.gradle.org/plugin/net.minecraftforge.changelog
38-
plugin 'plugin-publish', 'com.gradle.plugin-publish' version '1.3.1' // https://plugins.gradle.org/plugin/com.gradle.plugin-publish
39-
plugin 'shadow', 'com.gradleup.shadow' version '9.0.2' // https://plugins.gradle.org/plugin/com.gradleup.shadow
36+
plugin 'licenser', 'net.minecraftforge.licenser' version '1.2.0' // https://plugins.gradle.org/plugin/net.minecraftforge.licenser
37+
plugin 'changelog', 'net.minecraftforge.changelog' version '3.0.0' // https://plugins.gradle.org/plugin/net.minecraftforge.changelog
38+
plugin 'plugin-publish', 'com.gradle.plugin-publish' version '1.3.1' // https://plugins.gradle.org/plugin/com.gradle.plugin-publish
39+
plugin 'shadow', 'com.gradleup.shadow' version '9.0.2' // https://plugins.gradle.org/plugin/com.gradleup.shadow
4040

4141
// Static Analysis
4242
library 'nulls', 'org.jetbrains', 'annotations' version '26.0.2'

0 commit comments

Comments
 (0)