-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* v2 rewrite * untested commands! * more tweaks? * hmmm * finish it
- Loading branch information
1 parent
8ce7648
commit 0bd48b9
Showing
21 changed files
with
988 additions
and
332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Publish to GitHub Packages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
packages: write | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "zulu" | ||
java-version: "17" | ||
|
||
- name: Grant execute permission for Gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew build | ||
|
||
- name: Publish to GitHub Packages | ||
run: ./gradlew publish | ||
env: | ||
USERNAME: ${{ github.actor }} | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} | ||
GPG_KEY: ${{ secrets.GPG_KEY }} | ||
GPG_KEY_PASSWORD: ${{ secrets.GPG_KEY_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | ||
|
||
plugins { | ||
id("java") | ||
id("java-library") | ||
id("maven-publish") | ||
id("signing") | ||
id("com.gradleup.shadow") version "8.3.0" | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") | ||
maven("https://nexus.scarsz.me/content/groups/public/") | ||
maven("https://papermc.io/repo/repository/maven-public/") | ||
maven("https://repo1.maven.org/maven2/") | ||
maven("https://repo.codemc.org/repository/maven-public/") | ||
} | ||
|
||
dependencies { | ||
compileOnly("com.discordsrv:discordsrv:1.28.0") | ||
compileOnly("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT") | ||
implementation("commons-io:commons-io:2.16.1") | ||
implementation("dev.jorel:commandapi-bukkit-shade:9.5.2") | ||
} | ||
|
||
tasks.withType<ShadowJar> { | ||
dependencies { | ||
include(dependency("dev.jorel:commandapi-bukkit-shade:9.5.2")) | ||
include(dependency("org.bstats:bstats-bukkit:3.0.3")) | ||
} | ||
|
||
relocate("dev.jorel.commandapi", "com.buape.kiaimc.commandapi") | ||
} | ||
|
||
tasks.named<ShadowJar>("shadowJar") { | ||
archiveClassifier.set("") | ||
} | ||
|
||
tasks.build { | ||
dependsOn("shadowJar") | ||
} | ||
|
||
group = "com.buape" | ||
version = "2.0.0" | ||
description = "KiaiMC - Integrating Kiai's extensive leveling system with Minecraft servers" | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_21 | ||
targetCompatibility = JavaVersion.VERSION_21 | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("mavenJava") { | ||
from(components["java"]) | ||
|
||
pom { | ||
name.set("KiaiMC API") | ||
description.set("KiaiMC - Integrating Kiai's extensive leveling system with Minecraft servers") | ||
url.set("https://github.com/buape/kiaimc") | ||
|
||
licenses { | ||
license { | ||
name.set("GNU General Public License, Version 3.0") | ||
url.set("https://www.gnu.org/licenses/gpl-3.0.html") | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id.set("buape") | ||
name.set("Buape Studios") | ||
email.set("[email protected]") | ||
} | ||
developer { | ||
id.set("thewilloftheshadow") | ||
name.set("Shadow") | ||
email.set("[email protected]") | ||
} | ||
} | ||
|
||
scm { | ||
connection.set("scm:git:git://github.com/buape/kiaimc.git") | ||
developerConnection.set("scm:git:ssh://github.com:buape/kiaimc.git") | ||
url.set("https://github.com/buape/kiaimc") | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
name = "GitHubPackages" | ||
url = uri("https://maven.pkg.github.com/buape/kiaimc") | ||
credentials { | ||
username = System.getenv("USERNAME") | ||
password = System.getenv("TOKEN") | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
useInMemoryPgpKeys( | ||
System.getenv("GPG_KEY_ID"), | ||
System.getenv("GPG_KEY"), | ||
System.getenv("GPG_KEY_PASSWORD") | ||
) | ||
sign(publishing.publications["mavenJava"]) | ||
} | ||
|
||
tasks.processResources { | ||
filesMatching("plugin.yml") { | ||
expand("version" to project.version) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#This file is generated by updateDaemonJvm | ||
toolchainVersion=21 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# This file was generated by the Gradle 'init' task. | ||
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format | ||
|
||
[versions] | ||
com-discordsrv-discordsrv = "1.28.0" | ||
com-fasterxml-jackson-core-jackson-databind = "2.17.1" | ||
commons-io-commons-io = "2.16.1" | ||
io-papermc-paper-paper-api = "1.20-R0.1-SNAPSHOT" | ||
org-bstats-bstats-bukkit = "3.0.2" | ||
|
||
[libraries] | ||
com-discordsrv-discordsrv = { module = "com.discordsrv:discordsrv", version.ref = "com-discordsrv-discordsrv" } | ||
com-fasterxml-jackson-core-jackson-databind = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "com-fasterxml-jackson-core-jackson-databind" } | ||
commons-io-commons-io = { module = "commons-io:commons-io", version.ref = "commons-io-commons-io" } | ||
io-papermc-paper-paper-api = { module = "io.papermc.paper:paper-api", version.ref = "io-papermc-paper-paper-api" } | ||
org-bstats-bstats-bukkit = { module = "org.bstats:bstats-bukkit", version.ref = "org-bstats-bstats-bukkit" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.