Skip to content

Commit d080748

Browse files
authored
Migrate doc sites to MkDocs (#1302)
* Delete package.json and yarn.lock * Move docs folder out of src * Run `mkdocs new .` https://squidfunk.github.io/mkdocs-material * Update mkdocs.yml and nav items * Delete .vuepress things * Disable the explicit home page * Remove gitPublish and node plugins * Inline releaseAll task * Add a job for testing deploying * Update dokka output dir * Tweak the deployment step * Update release workflow * Update ignore list * Update changelog * Add Dokka output into delete list
1 parent d590ff8 commit d080748

40 files changed

+290
-9134
lines changed

.github/pull_request_template.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
---
22

3-
- [ ] [CHANGELOG](https://github.com/GradleUp/shadow/blob/main/src/docs/changes/README.md)'s "Unreleased" section has been updated, if applicable.
3+
- [ ] [CHANGELOG](https://github.com/GradleUp/shadow/blob/main/docs/changes/README.md)'s "Unreleased" section has been updated, if applicable.

.github/workflows/release.yml

+8-13
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,26 @@ jobs:
2020
- uses: gradle/actions/setup-gradle@v4
2121
with:
2222
cache-read-only: true
23-
- uses: actions/setup-node@v4
24-
with:
25-
# Due to some limitations of https://github.com/node-gradle/gradle-node-plugin.
26-
node-version: '16'
27-
# Used for gitPublish tasks.
28-
- name: Set up Git
29-
run: |
30-
git config --global user.name 'github-actions[bot]'
31-
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
3223
# Disable CC due to https://github.com/gradle/gradle/issues/22779
33-
- run: ./gradlew releaseAll --no-configuration-cache
24+
- run: ./gradlew publish publishPlugins dokkaHtml --no-configuration-cache
3425
env:
3526
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_KEY }}
3627
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_SECRET }}
37-
GITHUB_USER: ${{ github.repository_owner }}
38-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3928
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USER }}
4029
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}
4130
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }}
4231
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_KEY_PASSWORD }}
32+
- name: Deploy site
33+
run: |
34+
git config --global user.name 'github-actions[bot]'
35+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
36+
pip install mkdocs-material
37+
mkdocs gh-deploy --force
4338
- name: Extract release notes
4439
# TODO: replace this after https://github.com/ffurrer2/extract-release-notes/pull/355 is merged.
4540
uses: Goooler/extract-release-notes@6e686e7a607d03716b7cff561371a82065b22c33
4641
with:
47-
changelog_file: src/docs/changes/README.md
42+
changelog_file: docs/changes/README.md
4843
release_notes_file: RELEASE_NOTES.md
4944
- name: Create release
5045
run: gh release create ${{ github.ref_name }} --notes-file RELEASE_NOTES.md

.gitignore

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ out
1010
.gradletasknamecache
1111
.gradle-test-kit
1212
classes/
13-
node_modules/
14-
yarn-error.log
15-
src/docs/.vuepress/dist/
1613
.DS_Store
1714
jd-gui.cfg
1815
bin/
1916
.vscode/
2017
.kotlin
18+
# Generated by Dokka, it's depended on by MkDocs.
19+
docs/api/

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Gradle plugin for creating fat/uber JARs with support for package relocation.
1212
## Documentation
1313

1414
- [User Guide](https://gradleup.com/shadow/)
15-
- [CHANGELOG](src/docs/changes/README.md)
15+
- [CHANGELOG](docs/changes/README.md)
1616

1717
## Current Status
1818

RELEASING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
1. Update the `VERSION_NAME` in `gradle.properties` to the release version.
44

5-
2. Update the [changelog](src/docs/changes/README.md):
5+
2. Update the [changelog](docs/changes/README.md):
66
1. Change the `Unreleased` header to the release version.
77
2. Add a link URL to ensure the header link works.
88
3. Add a new `Unreleased` section to the top.

build-logic/build.gradle.kts

-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@ plugins {
55
dependencies {
66
implementation(libs.pluginPublish)
77
implementation(libs.mavenPublish)
8-
implementation(libs.gitPublish)
9-
implementation(libs.node)
108
implementation(libs.jetbrains.dokka)
119
}

build-logic/src/main/kotlin/shadow.convention.deploy.gradle.kts

-30
This file was deleted.

build-logic/src/main/kotlin/shadow.convention.publish.gradle.kts

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ gradlePlugin {
2828
}
2929
}
3030

31+
tasks.dokkaHtml {
32+
outputDirectory = rootDir.resolve("docs/api")
33+
}
34+
3135
tasks.publishPlugins {
3236
doFirst {
3337
if (version.toString().endsWith("SNAPSHOT")) {

build.gradle.kts

+3-15
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ plugins {
99
alias(libs.plugins.jetbrains.bcv)
1010
alias(libs.plugins.spotless)
1111
id("shadow.convention.publish")
12-
id("shadow.convention.deploy")
1312
}
1413

1514
java {
@@ -77,8 +76,8 @@ testing.suites {
7776
register<JvmTestSuite>("integrationTest") {
7877
targets.configureEach {
7978
testTask {
80-
val docsDir = file("src/docs")
81-
// Add src/docs as an input directory to trigger ManualCodeSnippetTests re-run on changes.
79+
val docsDir = file("docs")
80+
// Add docs as an input directory to trigger ManualCodeSnippetTests re-run on changes.
8281
inputs.dir(docsDir)
8382
systemProperty("DOCS_DIR", docsDir.absolutePath)
8483
}
@@ -176,16 +175,5 @@ tasks.clean {
176175
val dirs = includedBuilds.map { it.projectDir } + projectDir
177176
delete.addAll(dirs.map { it.resolve(".gradle") })
178177
delete.addAll(dirs.map { it.resolve(".kotlin") })
179-
delete.add("node_modules")
180-
}
181-
182-
tasks.register("releaseAll") {
183-
description = "Publishes the plugin to maven repos and deploys website."
184-
group = PublishingPlugin.PUBLISH_TASK_GROUP
185-
186-
dependsOn(
187-
tasks.publish,
188-
tasks.publishPlugins,
189-
tasks.gitPublishPush,
190-
)
178+
delete.add(tasks.dokkaHtml.map { it.outputDirectory })
191179
}

docs/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<div style="text-align: center;">
2+
<img src="images/logo.svg" alt="Gradle Shadow Plugin" style="max-width: 300px; height: auto;">
3+
<h1><strong>Shadow Gradle Plugin</strong></h1>
4+
<p><em>The library author's dependency toolkit</em></p>
5+
</div>
6+
7+
---
8+
9+
Previously this plugin was developed by [@johnrengelman](https://github.com/johnrengelman) and published under the ID [
10+
`com.github.johnrengelman.shadow`](https://plugins.gradle.org/plugin/com.github.johnrengelman.shadow)
11+
before maintenance was transferred to the [GradleUp organization](https://github.com/GradleUp) to ensure future
12+
development, see [#908](https://github.com/GradleUp/shadow/issues/908).
13+
14+
If you are still using the old plugin ID in your build script, we recommend to switch to the new plugin ID [
15+
`com.gradleup.shadow`](https://plugins.gradle.org/plugin/com.gradleup.shadow)
16+
and update to the latest version to receive all the latest bug fixes and improvements.
File renamed without changes.
File renamed without changes.

src/docs/changes/README.md docs/changes/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- **BREAKING CHANGE:** Rename `Transformer` to `ResourceTransformer`. ([#1288](https://github.com/GradleUp/shadow/pull/1288))
1414
Aims to better align with the name of [org.apache.maven.plugins.shade.resource.ResourceTransformer.java](https://github.com/apache/maven-shade-plugin/blob/master/src/main/java/org/apache/maven/plugins/shade/resource/ResourceTransformer.java) and to distinguish itself from [org.gradle.api.Transformer.java](https://docs.gradle.org/current/javadoc/org/gradle/api/Transformer.html).
1515
- **BREAKING CHANGE:** Mark `DefaultInheritManifest` as `internal`. ([#1303](https://github.com/GradleUp/shadow/pull/1303))
16+
- Migrate doc sites to MkDocs. ([#1302](https://github.com/GradleUp/shadow/pull/1302))
1617

1718
**Fixed**
1819

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)