Skip to content
This repository has been archived by the owner on Sep 24, 2023. It is now read-only.

Commit

Permalink
Update to Nova 0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
NichtStudioCode committed Jun 11, 2023
1 parent 2c87d47 commit 01be401
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 53 deletions.
23 changes: 0 additions & 23 deletions .github/scripts/buildtools.sh

This file was deleted.

24 changes: 16 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,30 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set Up JDK 17
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: 17
distribution: adopt

- name: Run BuildTools
run: . .github/scripts/buildtools.sh

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
cache-disabled: true

- name: Build Spigot-Mapped
run: ./gradlew clean addonJar "-DoutDir=artifacts/"
uses: gradle/gradle-build-action@v2
with:
arguments: |
addonJar
-PoutDir=artifacts
-PxenondevsNms
--scan
env:
ORG_GRADLE_PROJECT_xenondevsNmsUsername: ${{ secrets.XENONDEVS_NMS_USERNAME }}
ORG_GRADLE_PROJECT_xenondevsNmsPassword: ${{ secrets.XENONDEVS_NMS_PASSWORD }}

- name: Upload Artifacts
id: upload
Expand All @@ -36,10 +44,10 @@ jobs:
name: Artifacts
path: ./artifacts/*.jar

- name: Publish Artifacts
- name: Attach Artifacts to Release
if: github.event_name == 'release'
uses: skx/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: ./artifacts/*.jar
args: ./artifacts/*.jar
31 changes: 17 additions & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,28 +1,36 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

group = "xyz.xenondevs"
version = "1.0"
version = "1.1-RC.1"

val mojangMapped = project.hasProperty("mojang-mapped") || System.getProperty("mojang-mapped") != null
val mojangMapped = project.hasProperty("mojang-mapped")

@Suppress("DSL_SCOPE_VIOLATION")
plugins {
kotlin("jvm") version "1.8.20"
id("xyz.xenondevs.specialsource-gradle-plugin") version "1.0.0"
id("xyz.xenondevs.string-remapper-gradle-plugin") version "1.0"
id("xyz.xenondevs.nova.nova-gradle-plugin") version libs.versions.nova
alias(libs.plugins.kotlin)
alias(libs.plugins.nova)
alias(libs.plugins.stringremapper)
alias(libs.plugins.specialsource)
`maven-publish`
}

repositories {
mavenLocal()
mavenCentral()
maven("https://repo.xenondevs.xyz/releases")
mavenLocal { content { includeGroup("org.spigotmc") } }

// include xenondevs-nms repository if requested
if (project.hasProperty("xenondevsNms")) {
maven("https://repo.papermc.io/repository/maven-public/") // authlib, brigadier, etc.
maven {
name = "xenondevsNms"
url = uri("https://repo.xenondevs.xyz/nms/")
credentials(PasswordCredentials::class)
}
}
}

dependencies {
implementation(libs.nova)
implementation(variantOf(libs.spigot) { classifier("remapped-mojang") })
}

addon {
Expand All @@ -32,21 +40,16 @@ addon {
novaVersion.set(libs.versions.nova)
main.set("xyz.xenondevs.simpleupgrades.SimpleUpgrades")
authors.add("StudioCode")
// spigotResourceId.set(12345) TODO: Set your spigot resource id
}

spigotRemap {
spigotVersion.set(libs.versions.spigot.get().substringBefore('-'))
sourceJarTask.set(tasks.jar)
spigotJarClassifier.set("")
}

remapStrings {
remapGoal.set(if (mojangMapped) "mojang" else "spigot")
spigotVersion.set(libs.versions.spigot.get())
classes.set(listOf(
// Put your classes to string-remap here
))
}

tasks {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down
26 changes: 22 additions & 4 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,37 @@ rootProject.name = "simple-upgrades"
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
version("nova", "0.13")
version("spigot", "1.19.4-R0.1-SNAPSHOT")
version("nova", "0.14-alpha.1")
version("spigot", "1.20-R0.1-SNAPSHOT")
version("kotlin", "1.8.20")

plugin("kotlin", "org.jetbrains.kotlin.jvm").versionRef("kotlin")
plugin("nova", "xyz.xenondevs.nova.nova-gradle-plugin").versionRef("nova")
plugin("stringremapper", "xyz.xenondevs.string-remapper-gradle-plugin").version("1.3")
plugin("specialsource", "xyz.xenondevs.specialsource-gradle-plugin").version("1.1")

library("nova", "xyz.xenondevs.nova", "nova").versionRef("nova")
library("spigot", "org.spigotmc", "spigot").versionRef("spigot")
}
}
}

pluginManagement {
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
maven("https://repo.xenondevs.xyz/releases")
mavenLocal { content { includeGroup("org.spigotmc") } }
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") // for nova-gradle-plugin
}
}

plugins {
id("com.gradle.enterprise") version "3.13"
}

gradleEnterprise {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package xyz.xenondevs.simpleupgrades

import xyz.xenondevs.nova.addon.Addon
import xyz.xenondevs.nova.update.ProjectDistributor

object SimpleUpgrades : Addon()
object SimpleUpgrades : Addon() {

override val projectDistributors = listOf(ProjectDistributor.hangar("xenondevs/Simple-Upgrades"))

}

0 comments on commit 01be401

Please sign in to comment.