generated from ybw0014/GuizhanSlimefunAddon
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
2,379 additions
and
10,573 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,20 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.yml] | ||
indent_size = 2 | ||
|
||
[*.json] | ||
indent_size = 2 | ||
indent_style = tab |
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,32 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
if: startsWith(github.event.head_commit.message, '[CI skip]') == false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 21 | ||
distribution: temurin | ||
|
||
- name: Validate Gradle wrapper | ||
uses: gradle/actions/wrapper-validation@v4 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew clean shadowJar |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,113 +1,24 @@ | ||
# User-specific stuff | ||
.idea/ | ||
|
||
*.iml | ||
*.ipr | ||
*.iws | ||
|
||
# IntelliJ | ||
out/ | ||
|
||
# Compiled class file | ||
*.class | ||
|
||
# Log file | ||
*.log | ||
|
||
# BlueJ files | ||
*.ctxt | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
|
||
*~ | ||
|
||
# temporary files which can be created if a process still has a handle open of a deleted file | ||
.fuse_hidden* | ||
|
||
# KDE directory preferences | ||
.directory | ||
|
||
# Linux trash folder which might appear on any partition or disk | ||
.Trash-* | ||
.gradle | ||
**/build/ | ||
!src/**/build/ | ||
|
||
# .nfs files are created when an open file is removed but is still being accessed | ||
.nfs* | ||
# Ignore Gradle GUI config | ||
gradle-app.setting | ||
|
||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) | ||
!gradle-wrapper.jar | ||
|
||
# Icon must end with two \r | ||
Icon | ||
# Avoid ignore Gradle wrappper properties | ||
!gradle-wrapper.properties | ||
|
||
# Thumbnails | ||
._* | ||
# Cache of project | ||
.gradletasknamecache | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
# Eclipse Gradle plugin generated files | ||
# Eclipse Core | ||
.project | ||
# JDT-specific (Eclipse Java Development Tools) | ||
.classpath | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
# Windows thumbnail cache files | ||
Thumbs.db | ||
Thumbs.db:encryptable | ||
ehthumbs.db | ||
ehthumbs_vista.db | ||
|
||
# Dump file | ||
*.stackdump | ||
|
||
# Folder config file | ||
[Dd]esktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msix | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
target/ | ||
|
||
pom.xml.tag | ||
pom.xml.releaseBackup | ||
pom.xml.versionsBackup | ||
pom.xml.next | ||
|
||
release.properties | ||
dependency-reduced-pom.xml | ||
buildNumber.properties | ||
.mvn/timing.properties | ||
.mvn/wrapper/maven-wrapper.jar | ||
.flattened-pom.xml | ||
|
||
# Common working directory | ||
run/ | ||
.idea/ | ||
.env |
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,148 @@ | ||
group = "net.guizhanss" | ||
val mainPackage = "net.guizhanss.minecraft.guizhanlib" | ||
|
||
plugins { | ||
java | ||
`java-library` | ||
`maven-publish` | ||
signing | ||
id("io.freefair.lombok") version "8.7.1" | ||
id("com.gradleup.shadow") version "8.3.0" | ||
id("net.minecrell.plugin-yml.bukkit") version "0.6.0" | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven(url = "https://jitpack.io/") | ||
maven(url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/") | ||
maven(url = "https://papermc.io/repo/repository/maven-public") | ||
maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots/") | ||
} | ||
|
||
dependencies { | ||
fun compileOnlyAndTestImplementation(dependencyNotation: Any) { | ||
compileOnly(dependencyNotation) | ||
testImplementation(dependencyNotation) | ||
} | ||
|
||
implementation("net.guizhanss:guizhanlib-all:2.0.0") | ||
implementation("org.bstats:bstats-bukkit:3.1.0") | ||
implementation("com.google.code.findbugs:jsr305:3.0.2") | ||
api("com.github.houbb:pinyin:0.4.0") | ||
|
||
compileOnlyAndTestImplementation("io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT") | ||
compileOnlyAndTestImplementation("com.github.Slimefun:Slimefun4:RC-37") | ||
|
||
// mockbukkit | ||
testImplementation("com.github.MockBukkit:MockBukkit:c7cc678834") | ||
// junit | ||
testImplementation(platform("org.junit:junit-bom:5.11.1")) | ||
testImplementation("org.junit.jupiter:junit-jupiter-api") | ||
testRuntimeOnly("org.junit.platform:junit-platform-launcher") | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_21 | ||
targetCompatibility = JavaVersion.VERSION_21 | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
tasks.compileJava { | ||
options.encoding = "UTF-8" | ||
} | ||
|
||
tasks.javadoc { | ||
options.encoding = "UTF-8" | ||
} | ||
|
||
tasks.test { | ||
useJUnitPlatform() | ||
} | ||
|
||
tasks.shadowJar { | ||
fun doRelocate(from: String, to: String? = null) { | ||
val last = to ?: from.split(".").last() | ||
relocate(from, "$mainPackage.libs.$last") | ||
} | ||
|
||
doRelocate("io.papermc.lib", "paperlib") | ||
doRelocate("com.github.houbb") | ||
doRelocate("org.bstats") | ||
archiveClassifier = "" | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("maven") { | ||
project.shadow.component(this) | ||
|
||
artifact(tasks.named("javadocJar").get()) | ||
artifact(tasks.named("sourcesJar").get()) | ||
|
||
groupId = rootProject.group as String | ||
artifactId = project.name | ||
version = rootProject.version as String | ||
|
||
pom { | ||
name.set("GuizhanLibPlugin") | ||
description.set("A library plugin for Slimefun addon development.") | ||
url.set("https://github.com/ybw0014/GuizhanLibPlugin") | ||
|
||
licenses { | ||
license { | ||
name.set("GPL-3.0 license") | ||
url.set("https://github.com/ybw0014/GuizhanLibPlugin/blob/master/LICENSE") | ||
distribution.set("repo") | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
name.set("ybw0014") | ||
url.set("https://ybw0014.dev/") | ||
} | ||
} | ||
|
||
scm { | ||
connection.set("scm:git:git://github.com/ybw0014/GuizhanLibPlugin.git") | ||
developerConnection.set("scm:git:ssh://github.com:ybw0014/GuizhanLibPlugin.git") | ||
url.set("https://github.com/ybw0014/guizhanlibplugin/tree/master") | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
name = "CentralRelease" | ||
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
credentials { | ||
username = System.getProperty("OSSRH_USERNAME", "") | ||
password = System.getProperty("OSSRH_PASSWORD", "") | ||
} | ||
} | ||
maven { | ||
name = "CentralSnapshot" | ||
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") | ||
credentials { | ||
username = System.getProperty("OSSRH_USERNAME", "") | ||
password = System.getProperty("OSSRH_PASSWORD", "") | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
useGpgCmd() | ||
sign(configurations.runtimeElements.get()) | ||
} | ||
|
||
bukkit { | ||
main = "$mainPackage.GuizhanLib" | ||
apiVersion = "1.18" | ||
authors = listOf("ybw0014") | ||
description = "A library plugin for Simplified Chinese Slimefun addons." | ||
website = "https://github.com/ybw0014/GuizhanLibPlugin" | ||
depend = listOf("Slimefun") | ||
} |
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 @@ | ||
version=2.0.0 |
Binary file not shown.
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.5-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.