mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-08-28 08:25:56 +02:00
Compare commits
9 commits
f2f39dc326
...
3bb817aeca
| Author | SHA1 | Date | |
|---|---|---|---|
| 3bb817aeca | |||
| c820092bb5 | |||
| 8485e8f668 | |||
| 3ea16a5b44 | |||
| d806b7a6a5 | |||
| 78e27c736a | |||
| ff995b3c02 | |||
| 0a9477b3bc | |||
| 5405c6699a |
7 changed files with 34 additions and 41 deletions
49
.github/workflows/gradle.yml
vendored
49
.github/workflows/gradle.yml
vendored
|
|
@ -31,42 +31,33 @@ jobs:
|
||||||
MODRINTH_PLATFORMS: '["spigot", "paper", "purpur", "folia"]'
|
MODRINTH_PLATFORMS: '["spigot", "paper", "purpur", "folia"]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- name: Set up JDKs
|
- name: Set up JDKs
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
java-version: |
|
java-version: |
|
||||||
21
|
21
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
cache: gradle
|
|
||||||
|
|
||||||
- name: Cache Gradle root and wrapper
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.gradle/caches
|
|
||||||
~/.gradle/wrapper
|
|
||||||
key: gradle-root-${{ runner.os }}-${{ hashFiles('build.gradle*') }}
|
|
||||||
restore-keys: gradle-root-${{ runner.os }}-
|
|
||||||
|
|
||||||
# Setup paperweight cache
|
|
||||||
- name: Cache paperweight
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
./nms/*/.gradle/caches/paperweight
|
|
||||||
key: paperweight-submodules-${{ runner.os }}-${{ hashFiles('nms/*/build.gradle*') }}
|
|
||||||
restore-keys: |
|
|
||||||
paperweight-submodules-${{ runner.os }}-
|
|
||||||
|
|
||||||
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
|
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
|
||||||
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
|
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v5
|
uses: gradle/actions/setup-gradle@v6
|
||||||
|
|
||||||
- name: Make gradlew executable
|
- name: Make gradlew executable
|
||||||
run: chmod +x ./gradlew
|
run: chmod +x ./gradlew
|
||||||
|
|
||||||
|
# Setup paperweight cache
|
||||||
|
- name: Cache paperweight
|
||||||
|
uses: actions/cache@v6
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
./nms/*/.gradle/caches/paperweight
|
||||||
|
./.gradle/caches/paperweight
|
||||||
|
key: paperweight-submodules-${{ runner.os }}-${{ hashFiles('nms/*/build.gradle*') }}
|
||||||
|
restore-keys: |
|
||||||
|
paperweight-submodules-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Get small commit hash
|
- name: Get small commit hash
|
||||||
if: ${{ github.event_name != 'release' && success() }}
|
if: ${{ github.event_name != 'release' && success() }}
|
||||||
run: echo "SMALL_COMMIT_HASH=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV
|
run: echo "SMALL_COMMIT_HASH=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV
|
||||||
|
|
@ -76,7 +67,7 @@ jobs:
|
||||||
|
|
||||||
# only submit dependency on push
|
# only submit dependency on push
|
||||||
- name: Generate and submit dependency graph
|
- name: Generate and submit dependency graph
|
||||||
uses: gradle/actions/dependency-submission@v4
|
uses: gradle/actions/dependency-submission@v6
|
||||||
if: ${{ github.event_name == 'push' && success() }}
|
if: ${{ github.event_name == 'push' && success() }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
|
|
@ -92,16 +83,16 @@ jobs:
|
||||||
|
|
||||||
# upload the named jars as artifact
|
# upload the named jars as artifact
|
||||||
- name: Upload online JAR artifact
|
- name: Upload online JAR artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: CustomAnvil.jar
|
|
||||||
path: build/libs/${{ env.ONLINE_JAR_NAME }}
|
path: build/libs/${{ env.ONLINE_JAR_NAME }}
|
||||||
|
archive: false
|
||||||
|
|
||||||
- name: Upload offline JAR file
|
- name: Upload offline JAR file
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: CustomAnvil-offline.jar
|
|
||||||
path: build/libs/${{ env.OFFLINE_JAR_NAME }}
|
path: build/libs/${{ env.OFFLINE_JAR_NAME }}
|
||||||
|
archive: false
|
||||||
|
|
||||||
- name: Summarize tests results
|
- name: Summarize tests results
|
||||||
uses: jeantessier/test-summary-action@v1
|
uses: jeantessier/test-summary-action@v1
|
||||||
|
|
@ -110,7 +101,7 @@ jobs:
|
||||||
# upload the jar to release
|
# upload the jar to release
|
||||||
- name: Upload jar to release
|
- name: Upload jar to release
|
||||||
if: ${{ github.event_name == 'release' && success() }}
|
if: ${{ github.event_name == 'release' && success() }}
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v3
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
build/libs/${{ env.ONLINE_JAR_NAME }}
|
build/libs/${{ env.ONLINE_JAR_NAME }}
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,6 @@ repositories {
|
||||||
// EcoEnchants
|
// EcoEnchants
|
||||||
maven(url = "https://repo.auxilor.io/repository/maven-public/")
|
maven(url = "https://repo.auxilor.io/repository/maven-public/")
|
||||||
|
|
||||||
// ExcellentEnchants
|
|
||||||
maven(url = "https://repo.nightexpressdev.com/releases")
|
|
||||||
|
|
||||||
// ItemsAdder
|
// ItemsAdder
|
||||||
maven(url = "https://maven.devs.beer/")
|
maven(url = "https://maven.devs.beer/")
|
||||||
|
|
||||||
|
|
@ -82,11 +79,12 @@ dependencies {
|
||||||
|
|
||||||
// ExcellentEnchants
|
// ExcellentEnchants
|
||||||
implementation(project(":impl:ExcellentEnchant5_4"))
|
implementation(project(":impl:ExcellentEnchant5_4"))
|
||||||
compileOnly("su.nightexpress.excellentenchants:Core:5.1.0") {
|
compileOnly(files("libs/ExcellentEnchants/ExcellentEnchants-4.3.3-striped.jar")) // For pre v5 excellent enchants
|
||||||
exclude("org.spigotmc")
|
compileOnly(files("libs/ExcellentEnchants/ExcellentEnchants-4.1.0-striped.jar")) // For legacy excellent enchants
|
||||||
}
|
// early v5 excellent enchants
|
||||||
compileOnly(files("libs/ExcellentEnchants-4.3.3-striped.jar")) // For pre v5 excellent enchants
|
compileOnly(files("libs/ExcellentEnchants/Core-5.1.0.jar"))
|
||||||
compileOnly(files("libs/ExcellentEnchants-4.1.0-striped.jar")) // For legacy excellent enchants
|
compileOnly(files("libs/ExcellentEnchants/API-5.1.0.jar"))
|
||||||
|
compileOnly(files("libs/ExcellentEnchants/main-2.7.9.jar"))
|
||||||
|
|
||||||
// Disenchantment
|
// Disenchantment
|
||||||
compileOnly(files("libs/Disenchantment-6.1.5.jar"))
|
compileOnly(files("libs/Disenchantment-6.1.5.jar"))
|
||||||
|
|
@ -391,13 +389,15 @@ fun changelog(isOnline: Boolean): String {
|
||||||
|
|
||||||
hangarPublish {
|
hangarPublish {
|
||||||
|
|
||||||
fun HangarPublication.configure(isOnline: Boolean, devChannel: String, releaseChannel: String) {
|
fun HangarPublication.configure(isOnline: Boolean, devChannel: String?, releaseChannel: String) {
|
||||||
var versionName = effectiveVersion
|
var versionName = effectiveVersion
|
||||||
if(isPreRelease) versionName+= "-pre"
|
if(isPreRelease) versionName+= "-pre"
|
||||||
if(!isOnline) versionName+= "-offline"
|
if(!isOnline) versionName+= "-offline"
|
||||||
|
|
||||||
version.set(versionName)
|
version.set(versionName)
|
||||||
channel.set(if (isDevBuild || isPreRelease) devChannel else releaseChannel)
|
var releaseChannel = if (isDevBuild || isPreRelease) devChannel else releaseChannel
|
||||||
|
if(releaseChannel == null) return
|
||||||
|
channel.set(releaseChannel)
|
||||||
|
|
||||||
changelog.set(changelog(isOnline))
|
changelog.set(changelog(isOnline))
|
||||||
id.set("CustomAnvil")
|
id.set("CustomAnvil")
|
||||||
|
|
@ -448,8 +448,10 @@ hangarPublish {
|
||||||
configure(true, "DevSnapshot", "Release")
|
configure(true, "DevSnapshot", "Release")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!isDevBuild) {
|
||||||
publications.register("offline") {
|
publications.register("offline") {
|
||||||
configure(false, "OfflineSnapshot", "OfflineRelease")
|
configure(false, null, "OfflineRelease")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
BIN
libs/ExcellentEnchants/API-5.1.0.jar
Normal file
BIN
libs/ExcellentEnchants/API-5.1.0.jar
Normal file
Binary file not shown.
BIN
libs/ExcellentEnchants/Core-5.1.0.jar
Normal file
BIN
libs/ExcellentEnchants/Core-5.1.0.jar
Normal file
Binary file not shown.
BIN
libs/ExcellentEnchants/main-2.7.9.jar
Normal file
BIN
libs/ExcellentEnchants/main-2.7.9.jar
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue