From 3ec09405c45c8ad3d4cb77dbf20c128031816280 Mon Sep 17 00:00:00 2001 From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com> Date: Tue, 14 May 2024 17:56:44 +0300 Subject: [PATCH] add api publishing --- .github/workflows/build.yml | 6 ++- README.md | 58 ++++++++++++++++++--- docs/docs/index.md | 58 ++++++++++++++++++--- patches/api/0005-DivineMC-API-Publish.patch | 25 +++++++++ 4 files changed, 132 insertions(+), 15 deletions(-) create mode 100644 patches/api/0005-DivineMC-API-Publish.patch diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a98ee6d..35acc62 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: - name: Setup Gradle uses: gradle/gradle-build-action@v2 - - name: Setup JDK 17 + - name: Setup JDK 21 uses: actions/setup-java@v3 with: distribution: temurin @@ -41,6 +41,10 @@ jobs: - name: Create Mojmap Jar run: ./gradlew createMojmapPaperclipJar --stacktrace + - name: Publish API + continue-on-error: true + run: ./gradlew publish -PdivinemcUsername=${{ secrets.REPO_USERNAME }} -PdivinemcPassword=${{ secrets.REPO_SECRET }} + - name: Upload Artifacts if: env.debug == 'true' || github.ref_name != env.branch uses: actions/upload-artifact@main diff --git a/README.md b/README.md index 2fb2511..859474f 100644 --- a/README.md +++ b/README.md @@ -28,13 +28,6 @@ In normal case, you can download the latest JAR file from releases tab [here](ht **Please note:** Java >= 21 is required. -## 📦 Building -In order to distribute and use this server software, you need a paperclip file: - -```bash -./gradlew applyPatches && ./gradlew createReobfPaperclipJar -``` - ## ⚖️ License Patches are licensed under GPL-3.0. All other files are licensed under MIT. @@ -43,4 +36,55 @@ All other files are licensed under MIT. [![bStats](https://bstats.org/signatures/server-implementation/DivineMC.svg)](https://bstats.org/plugin/server-implementation/DivineMC) +## API +### [Javadoc](https://repo.bx-team.space/javadoc/snapshots/space/bxteam/divinemc/divinemc-api/1.20.6-R0.1-SNAPSHOT) + +### Dependency Information + +#### Maven +```xml + + bx-team + https://repo.bx-team.space/snapshots + +``` +```xml + + space.bxteam.divinemc + divinemc-api + 1.20.6-R0.1-SNAPSHOT + provided + +``` + +#### Gradle +```groovy +repositories { + maven("https://repo.bx-team.space/snapshots") +} +``` +```groovy +dependencies { + compileOnly("space.bxteam.divinemc:divinemc-api:1.20.6-R0.1-SNAPSHOT") +} +``` + +## 📦 Building and setting up +### Initial setup +First, clone this repository (do not download it) and the run the following command in the root directory: +```bash +./gradlew applyPatches +``` +After that, project is ready to use and editing it. + +### Creating a patch +Patches are effectively just commits in either `DivineMC-API` or `DivineMC-Server`. To create one, just add a commit to either repo and run `./gradlew rebuildPatches`, and a patch will be placed in the patches folder. Modifying commits will also modify its corresponding patch file. + +Read our [documentation](https://divinemc.bx-team.space/docs/dev/contributing) to learn more about patches + +### Compiling +Use the command `./gradlew build` to build the API and server. Compiled JARs will be placed under `DivineMC-API/build/libs` and `DivineMC-Server/build/libs`. **These JARs are not used to start a server**. + +To compile a server-ready paperclip jar, run `./gradlew createReobfPaperclipJar`. The compiled paperclip jar will be in `build/libs/` in the main root. + ###### We don't steal logo from YatopiaMC! [List of all forks](https://gist.github.com/NONPLAYT/48742353af8ae36bcef5d1c36de9730a) diff --git a/docs/docs/index.md b/docs/docs/index.md index 11cca02..b642d37 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -25,13 +25,6 @@ In normal case, you can download the latest JAR file from releases tab [here](ht **Please note:** Java >= 21 is required. -## 📦 Building -In order to distribute and use this server software, you need a paperclip file: - -```bash -./gradlew applyPatches && ./gradlew createReobfPaperclipJar -``` - ## ⚖️ License Patches are licensed under GPL-3.0. All other files are licensed under MIT. @@ -40,4 +33,55 @@ All other files are licensed under MIT. [![bStats](https://bstats.org/signatures/server-implementation/DivineMC.svg)](https://bstats.org/plugin/server-implementation/DivineMC) +## API +### [Javadoc](https://repo.bx-team.space/javadoc/snapshots/space/bxteam/divinemc/divinemc-api/1.20.6-R0.1-SNAPSHOT) + +### Dependency Information + +#### Maven +```xml + + bx-team + https://repo.bx-team.space/snapshots + +``` +```xml + + space.bxteam.divinemc + divinemc-api + 1.20.6-R0.1-SNAPSHOT + provided + +``` + +#### Gradle +```groovy +repositories { + maven("https://repo.bx-team.space/snapshots") +} +``` +```groovy +dependencies { + compileOnly("space.bxteam.divinemc:divinemc-api:1.20.6-R0.1-SNAPSHOT") +} +``` + +## 📦 Building and setting up +### Initial setup +First, clone this repository (do not download it) and the run the following command in the root directory: +```bash +./gradlew applyPatches +``` +After that, project is ready to use and editing it. + +### Creating a patch +Patches are effectively just commits in either `DivineMC-API` or `DivineMC-Server`. To create one, just add a commit to either repo and run `./gradlew rebuildPatches`, and a patch will be placed in the patches folder. Modifying commits will also modify its corresponding patch file. + +Read our [documentation](https://divinemc.bx-team.space/docs/dev/contributing) to learn more about patches + +### Compiling +Use the command `./gradlew build` to build the API and server. Compiled JARs will be placed under `DivineMC-API/build/libs` and `DivineMC-Server/build/libs`. **These JARs are not used to start a server**. + +To compile a server-ready paperclip jar, run `./gradlew createReobfPaperclipJar`. The compiled paperclip jar will be in `build/libs/` in the main root. + ###### We don't steal logo from YatopiaMC! [List of all forks](https://gist.github.com/NONPLAYT/48742353af8ae36bcef5d1c36de9730a) diff --git a/patches/api/0005-DivineMC-API-Publish.patch b/patches/api/0005-DivineMC-API-Publish.patch new file mode 100644 index 0000000..88eac8d --- /dev/null +++ b/patches/api/0005-DivineMC-API-Publish.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com> +Date: Tue, 14 May 2024 17:22:39 +0300 +Subject: [PATCH] DivineMC API Publish + + +diff --git a/build.gradle.kts b/build.gradle.kts +index 6aef83558a5ef7e84873b127c3bb43a6468c9a24..78cae5a080f65646494e7d1d8a52df969db6d3b1 100644 +--- a/build.gradle.kts ++++ b/build.gradle.kts +@@ -222,3 +222,14 @@ tasks.check { + dependsOn(scanJarForOldGeneratedCode) + } + // Paper end ++ ++// DivineMC start - publish to GitHub Packages ++publishing { ++ repositories { ++ maven("https://repo.bx-team.space/snapshots") { ++ name = "divinemc" ++ credentials(PasswordCredentials::class) ++ } ++ } ++} ++// DivineMC end