mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-08-28 16:35:57 +02:00
Compare commits
No commits in common. "3bb817aeca9e051371f3421fc00598cf6955e0e6" and "f2f39dc326775e06ad458f41257b44acdbd690f4" have entirely different histories.
3bb817aeca
...
f2f39dc326
7 changed files with 41 additions and 34 deletions
49
.github/workflows/gradle.yml
vendored
49
.github/workflows/gradle.yml
vendored
|
|
@ -31,33 +31,42 @@ jobs:
|
||||||
MODRINTH_PLATFORMS: '["spigot", "paper", "purpur", "folia"]'
|
MODRINTH_PLATFORMS: '["spigot", "paper", "purpur", "folia"]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v4
|
||||||
- name: Set up JDKs
|
- name: Set up JDKs
|
||||||
uses: actions/setup-java@v5
|
uses: actions/setup-java@v4
|
||||||
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@v6
|
uses: gradle/actions/setup-gradle@v5
|
||||||
|
|
||||||
- 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
|
||||||
|
|
@ -67,7 +76,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@v6
|
uses: gradle/actions/dependency-submission@v4
|
||||||
if: ${{ github.event_name == 'push' && success() }}
|
if: ${{ github.event_name == 'push' && success() }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
|
|
@ -83,16 +92,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@v7
|
uses: actions/upload-artifact@v4
|
||||||
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@v7
|
uses: actions/upload-artifact@v4
|
||||||
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
|
||||||
|
|
@ -101,7 +110,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@v3
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
build/libs/${{ env.ONLINE_JAR_NAME }}
|
build/libs/${{ env.ONLINE_JAR_NAME }}
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,9 @@ 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/")
|
||||||
|
|
||||||
|
|
@ -79,12 +82,11 @@ dependencies {
|
||||||
|
|
||||||
// ExcellentEnchants
|
// ExcellentEnchants
|
||||||
implementation(project(":impl:ExcellentEnchant5_4"))
|
implementation(project(":impl:ExcellentEnchant5_4"))
|
||||||
compileOnly(files("libs/ExcellentEnchants/ExcellentEnchants-4.3.3-striped.jar")) // For pre v5 excellent enchants
|
compileOnly("su.nightexpress.excellentenchants:Core:5.1.0") {
|
||||||
compileOnly(files("libs/ExcellentEnchants/ExcellentEnchants-4.1.0-striped.jar")) // For legacy excellent enchants
|
exclude("org.spigotmc")
|
||||||
// early v5 excellent enchants
|
}
|
||||||
compileOnly(files("libs/ExcellentEnchants/Core-5.1.0.jar"))
|
compileOnly(files("libs/ExcellentEnchants-4.3.3-striped.jar")) // For pre v5 excellent enchants
|
||||||
compileOnly(files("libs/ExcellentEnchants/API-5.1.0.jar"))
|
compileOnly(files("libs/ExcellentEnchants-4.1.0-striped.jar")) // For legacy excellent enchants
|
||||||
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"))
|
||||||
|
|
@ -389,15 +391,13 @@ 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)
|
||||||
var releaseChannel = if (isDevBuild || isPreRelease) devChannel else releaseChannel
|
channel.set(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,10 +448,8 @@ hangarPublish {
|
||||||
configure(true, "DevSnapshot", "Release")
|
configure(true, "DevSnapshot", "Release")
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!isDevBuild) {
|
|
||||||
publications.register("offline") {
|
publications.register("offline") {
|
||||||
configure(false, null, "OfflineRelease")
|
configure(false, "OfflineSnapshot", "OfflineRelease")
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue