Skip to content

Commit ccbabc1

Browse files
committed
init
0 parents  commit ccbabc1

22 files changed

+1019
-0
lines changed

.gitignore

+118
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# User-specific stuff
2+
.idea/
3+
4+
*.iml
5+
*.ipr
6+
*.iws
7+
8+
# IntelliJ
9+
out/
10+
# mpeltonen/sbt-idea plugin
11+
.idea_modules/
12+
13+
# JIRA plugin
14+
atlassian-ide-plugin.xml
15+
16+
# Compiled class file
17+
*.class
18+
19+
# Log file
20+
*.log
21+
22+
# BlueJ files
23+
*.ctxt
24+
25+
# Package Files #
26+
*.jar
27+
*.war
28+
*.nar
29+
*.ear
30+
*.zip
31+
*.tar.gz
32+
*.rar
33+
34+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
35+
hs_err_pid*
36+
37+
*~
38+
39+
# temporary files which can be created if a process still has a handle open of a deleted file
40+
.fuse_hidden*
41+
42+
# KDE directory preferences
43+
.directory
44+
45+
# Linux trash folder which might appear on any partition or disk
46+
.Trash-*
47+
48+
# .nfs files are created when an open file is removed but is still being accessed
49+
.nfs*
50+
51+
# General
52+
.DS_Store
53+
.AppleDouble
54+
.LSOverride
55+
56+
# Icon must end with two \r
57+
Icon
58+
59+
# Thumbnails
60+
._*
61+
62+
# Files that might appear in the root of a volume
63+
.DocumentRevisions-V100
64+
.fseventsd
65+
.Spotlight-V100
66+
.TemporaryItems
67+
.Trashes
68+
.VolumeIcon.icns
69+
.com.apple.timemachine.donotpresent
70+
71+
# Directories potentially created on remote AFP share
72+
.AppleDB
73+
.AppleDesktop
74+
Network Trash Folder
75+
Temporary Items
76+
.apdisk
77+
78+
# Windows thumbnail cache files
79+
Thumbs.db
80+
Thumbs.db:encryptable
81+
ehthumbs.db
82+
ehthumbs_vista.db
83+
84+
# Dump file
85+
*.stackdump
86+
87+
# Folder config file
88+
[Dd]esktop.ini
89+
90+
# Recycle Bin used on file shares
91+
$RECYCLE.BIN/
92+
93+
# Windows Installer files
94+
*.cab
95+
*.msi
96+
*.msix
97+
*.msm
98+
*.msp
99+
100+
# Windows shortcuts
101+
*.lnk
102+
103+
.gradle
104+
build/
105+
106+
# Ignore Gradle GUI config
107+
gradle-app.setting
108+
109+
# Cache of project
110+
.gradletasknamecache
111+
112+
**/build/
113+
114+
# Common working directory
115+
run/
116+
117+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
118+
!gradle-wrapper.jar

build.gradle

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
plugins {
2+
id 'java-library'
3+
id "maven-publish"
4+
id("xyz.jpenilla.run-paper") version "1.0.6"
5+
}
6+
7+
8+
// Plugin config
9+
ext.pluginNameUpper = "HamsterEcoHelper"
10+
ext.pluginNameLower = ext.pluginNameUpper.toLowerCase()
11+
ext.majorVersion = 9
12+
ext.minorVersion = 0
13+
ext.minecraftVersion = "1.18.1"
14+
sourceCompatibility = 17
15+
targetCompatibility = 17
16+
17+
// Suppiled by Jenkins
18+
ext.buildNumber = System.env.BUILD_NUMBER == null ? "x" : "$System.env.BUILD_NUMBER"
19+
ext.mavenDirectory = System.env.MAVEN_DIR == null ? "$projectDir/repo" : "$System.env.MAVEN_DIR"
20+
ext.jdDirectory = System.env.JAVADOCS_DIR == null ? null : "$System.env.JAVADOCS_DIR"
21+
22+
// Version used for distribution. Different from maven repo
23+
group = "cat.nyaa"
24+
archivesBaseName = "${pluginNameUpper}-mc$minecraftVersion"
25+
version = "$majorVersion.$minorVersion.$buildNumber".toString()
26+
27+
runServer {
28+
minecraftVersion("1.18.1")
29+
}
30+
31+
// Repositories and dependencies
32+
repositories {
33+
mavenCentral()
34+
maven { url "https://repo.dmulloy2.net/repository/public/" }
35+
maven { name 'Spigot'; url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
36+
maven { name 'Sonatype'; url 'https://oss.sonatype.org/content/groups/public' }
37+
maven { name 'NyaaCat'; url 'https://ci.nyaacat.com/maven/' }
38+
maven { name 'EssentialsX'; url 'https://repo.essentialsx.net/releases/'}
39+
maven { name "papermc"; url 'https://papermc.io/repo/repository/maven-public/'}
40+
maven { name 'aikar'; url 'https://repo.aikar.co/content/groups/aikar/' }
41+
maven { name 'jitpack'; url 'https://jitpack.io' }
42+
}
43+
44+
dependencies {
45+
implementation 'org.jetbrains:annotations:22.0.0'
46+
compileOnly "org.spigotmc:spigot-api:$minecraftVersion-R0.1-SNAPSHOT"
47+
48+
// other nyaa plugins
49+
if (gradle.hasProperty("useLocalDependencies") && gradle.useLocalDependencies) {
50+
compileOnly project(":NyaaCore")
51+
compileOnly project(":LockettePro")
52+
} else {
53+
compileOnly('cat.nyaa:nyaacore:9.0-SNAPSHOT') { transitive = true }
54+
compileOnly('me.crafter.mc:lockettepro:2.10-SNAPSHOT') { transitive = false }
55+
}
56+
57+
// 3rd party plugins
58+
compileOnly ('com.github.MilkBowl:VaultAPI:1.7')
59+
compileOnly ('net.essentialsx:EssentialsX:2.19.0')
60+
}
61+
62+
// source file modification (modify version string)
63+
processResources {
64+
filesMatching("**/plugin.yml") {
65+
expand 'version': project.version
66+
}
67+
}
68+
69+
// source file jar
70+
task sourcesJar(type: Jar) {
71+
archiveClassifier.set("sources")
72+
from sourceSets.main.allSource
73+
}
74+
75+
// javadoc generation options
76+
javadoc {
77+
// javadoc output folder
78+
if (project.jdDirectory != null) destinationDir = file("${jdDirectory}/${pluginNameLower}-${version}")
79+
(options as StandardJavadocDocletOptions).with {
80+
links 'https://docs.oracle.com/en/java/javase/16/docs/api/'
81+
links 'https://hub.spigotmc.org/javadocs/spigot/'
82+
links 'https://google.github.io/guava/releases/21.0/api/docs/'
83+
links 'https://ci.md-5.net/job/BungeeCord/ws/chat/target/apidocs/'
84+
85+
locale 'en_US'
86+
encoding 'UTF-8'
87+
docEncoding 'UTF-8'
88+
addBooleanOption('keywords', true)
89+
addStringOption('Xdoclint:none', '-quiet')
90+
91+
addBooleanOption('html5', true)
92+
93+
windowTitle = "${pluginNameUpper} Javadoc"
94+
docTitle = "${pluginNameUpper} (mc$minecraftVersion-${project.version})"
95+
}
96+
}
97+
98+
// javadoc jar
99+
task javadocJar(type: Jar, dependsOn: javadoc) {
100+
archiveClassifier.set("javadoc")
101+
from javadoc.destinationDir
102+
}
103+
104+
// compile options
105+
compileJava {
106+
options.compilerArgs += ["-Xlint:deprecation"]
107+
}
108+
109+
// maven publish
110+
publishing {
111+
publications {
112+
mavenJava(MavenPublication) {
113+
group project.group
114+
artifactId pluginNameLower
115+
version "$majorVersion.$minorVersion-SNAPSHOT"
116+
117+
from components.java
118+
artifact sourcesJar
119+
artifact javadocJar
120+
}
121+
}
122+
repositories {
123+
maven {
124+
url mavenDirectory
125+
}
126+
}
127+
}
128+

gradle.properties

Whitespace-only changes.

gradle/wrapper/gradle-wrapper.jar

58.1 KB
Binary file not shown.
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)