diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..72b6e84 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,23 @@ +# Dependabot configuration file for GitHub + +version: 2 +updates: + # CI workflow action updates + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + commit-message: + prefix: "ci" + + # Gradle package updates + - package-ecosystem: "gradle" + directory: "/" + schedule: + interval: "weekly" + commit-message: + prefix: "deps" + ignore: + - dependency-name: 'org.spigotmc:spigot-api' + - dependency-name: 'io.papermc.paper:paper-api' + - dependency-name: 'io.papermc.paper:paper-mojangapi' \ No newline at end of file diff --git a/.github/funding.yml b/.github/funding.yml new file mode 100644 index 0000000..362350e --- /dev/null +++ b/.github/funding.yml @@ -0,0 +1,4 @@ +# Funding metadata for GitHub + +github: WiIIiam278 +custom: https://buymeacoff.ee/william278 \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0bd8d2f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +# Builds, tests and publishes to maven when a commit is pushed +name: CI Tests & Publish + +on: + push: + branches: [ 'master' ] + paths-ignore: + - 'workflows/**' + - 'README.md' + +permissions: + contents: read + checks: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: 'Checkout for CI 🛎️' + uses: actions/checkout@v4 + - name: 'Set up JDK 17 📦' + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + - name: 'Build with Gradle 🏗️' + uses: gradle/gradle-build-action@v3 + with: + arguments: build test publish + env: + SNAPSHOTS_MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + SNAPSHOTS_MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + - name: 'Publish Test Report 📊' + uses: mikepenz/action-junit-report@v4 + if: success() || failure() # always run even if the previous step fails + with: + report_paths: '**/build/test-results/test/TEST-*.xml' \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4cbc6e7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +# Builds, tests and publishes to maven when a release is published +name: Release Tests & Publish + +on: + release: + types: [ published ] + +permissions: + contents: read + checks: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: 'Checkout for CI 🛎️' + uses: actions/checkout@v4 + - name: 'Set up JDK 17 📦' + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + - name: 'Build with Gradle 🏗️' + uses: gradle/gradle-build-action@v3 + with: + arguments: build test publish + env: + RELEASES_MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + RELEASES_MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} \ No newline at end of file diff --git a/README.md b/README.md index d0b190b..68d2be2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,62 @@ -# Uniform -A cross-platform wrapper for making Brigadier commands, based on BrigadierWrapper by Tofaa2, itself inspired by emortalmcs command system. \ No newline at end of file + +

+ Claim Operations Library + + + + + + + + + +

+
+ +**Uniform** is cross-platform wrapper for making Brigadier commands, based on [`BrigadierWrapper` by Tofaa2](https://github.com/Tofaa2/BrigadierWrapper/), which itself was inspired by [EmortalMC's `command-system`](https://github.com/emortalmc/command-system). + +Uniform _currently_ targets the following platforms: + +| Platform | Version | Java | +|----------------|------------|:-----:| +| Paper | \>`1.20.4` | >`17` | +| Velocity | \>`3.3.0` | >`17` | + +Uniform _plans_ to support the following platforms: + +| Platform | Version | Java | +|----------------|------------|:-----:| +| Fabric | =`1.20.6` | >`21` | +| Spigot† | \>`1.17.1` | >`17` | + +† Brigadier commands are wrapped into Bukkit commands for Spigot. + +## Setup +Uniform is available [on Maven](https://repo.william278.net/#/releases/net/william278/uniform/). You can browse the Javadocs [here](https://repo.william278.net/javadoc/releases/net/william278/uniform/latest). + +
+Gradle setup instructions + +First, add the Maven repository to your `build.gradle` file: +```groovy +repositories { + maven { url "https://repo.william278.net/releases" } +} +``` + +Then, add the dependency itself. Replace `VERSION` with the latest release version. (e.g., `1.0`) and `PLATFORM` with the platform you are targeting (e.g., `bukkit`). If you want to target pre-release "snapshot" versions (not recommended), you should use the `/snapshots` repository instead. + +```groovy +dependencies { + implementation "net.william278.uniform:uniform-PLATFORM:VERSION" +} +``` +
+ +Using Maven/something else? There's instructions on how to include Uniform on [the repo browser](https://repo.william278.net/#/releases/net/william278/uniform). + +## Building +To build Uniform, run `clean build` in the root directory. The output JARs will be in `target/`. + +## License +Uniform is licensed under GPL v3 as it derives from BrigadierWrapper. See [LICENSE](https://github.com/WiIIiam278/Uniform/raw/master/LICENSE) for more information. \ No newline at end of file diff --git a/images/banner.png b/images/banner.png new file mode 100644 index 0000000..952e8f0 Binary files /dev/null and b/images/banner.png differ diff --git a/paper/build.gradle b/paper/build.gradle index ac4ea25..bbeca3d 100644 --- a/paper/build.gradle +++ b/paper/build.gradle @@ -7,8 +7,7 @@ dependencies { api project(path: ':common') compileOnlyApi 'io.papermc.paper:paper-mojangapi:1.20.4-R0.1-SNAPSHOT' - - compileOnly 'io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT' + compileOnlyApi 'io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT' compileOnly 'org.projectlombok:lombok:1.18.32' annotationProcessor 'org.projectlombok:lombok:1.18.32'