Skip to content

Commit 281e49a

Browse files
author
mdxd44
committed
Split projects.
1 parent 6dda513 commit 281e49a

31 files changed

+3787
-0
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[BUG] "
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Set '...' in config to '...'
16+
2. Do in game '....'
17+
3. See error
18+
19+
**Expected behavior**
20+
A clear and concise description of what you expected to happen.
21+
22+
**Screenshots**
23+
If applicable, add screenshots to help explain your problem.
24+
25+
**Server Info (please complete the following information):**
26+
- LimboAPI Version [e.g. 1.0.1-rc2, downloaded from https://github.com/Elytrium/LimboAPI/actions/runs/1354021163]
27+
- /velocity dump link [e.g. https://dump.velocitypowered.com/dotihadufu.json]
28+
29+
**Additional context**
30+
Add any other context about the problem here.

.github/workflows/build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Java CI with Gradle
2+
3+
on: [ push ]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
java: [ 11, 16 ]
11+
fail-fast: true
12+
steps:
13+
- name: Checkout
14+
uses: actions/[email protected]
15+
- name: Set up JDK ${{ matrix.java }}
16+
uses: actions/[email protected]
17+
with:
18+
distribution: adopt
19+
java-version: ${{ matrix.java }}
20+
- name: Cache gradle
21+
uses: actions/[email protected]
22+
with:
23+
path: ~/.gradle
24+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
25+
restore-keys: ${{ runner.os }}-gradle-
26+
- name: Build plugins
27+
run: ./gradlew build
28+
- name: Upload LimboFilter
29+
uses: actions/[email protected]
30+
with:
31+
name: LimboFilter Built On ${{ matrix.java }} JDK
32+
path: "build/libs/limbofilter*.jar"

.github/workflows/test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Java CI with Gradle [PR tests]
2+
3+
on: [ pull_request ]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
java: [ 11, 16 ]
11+
fail-fast: true
12+
steps:
13+
- name: Checkout
14+
uses: actions/[email protected]
15+
- name: Set up JDK ${{ matrix.java }}
16+
uses: actions/[email protected]
17+
with:
18+
distribution: adopt
19+
java-version: ${{ matrix.java }}
20+
- name: Cache gradle
21+
uses: actions/[email protected]
22+
with:
23+
path: ~/.gradle
24+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
25+
restore-keys: ${{ runner.os }}-gradle-
26+
- name: Build plugins
27+
run: ./gradlew build
28+
- name: Upload LimboFilter
29+
uses: actions/[email protected]
30+
with:
31+
name: LimboFilter Built On ${{ matrix.java }} JDK
32+
path: "build/libs/limbofilter*.jar"

.gitignore

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
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+
.gradle
105+
build/
106+
107+
# Ignore Gradle GUI config
108+
gradle-app.setting
109+
110+
# Cache of project
111+
.gradletasknamecache
112+
113+
# Gradle Patch
114+
**/build/
115+
116+
# Common working directory
117+
run/
118+
119+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
120+
!gradle-wrapper.jar

HEADER.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Copyright (C) 2021 Elytrium
2+
3+
This program is free software: you can redistribute it and/or modify
4+
it under the terms of the GNU Affero General Public License as published by
5+
the Free Software Foundation, either version 3 of the License, or
6+
(at your option) any later version.
7+
8+
This program is distributed in the hope that it will be useful,
9+
but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
GNU Affero General Public License for more details.
12+
13+
You should have received a copy of the GNU Affero General Public License
14+
along with this program. If not, see <http://www.gnu.org/licenses/>.

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.0.2

build.gradle

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
//file:noinspection GroovyAssignabilityCheck
2+
3+
import com.github.spotbugs.snom.SpotBugsTask
4+
5+
plugins {
6+
id "java"
7+
id "checkstyle"
8+
id "com.github.spotbugs" version "4.7.9"
9+
id "org.cadixdev.licenser" version "0.6.1"
10+
}
11+
12+
group = "net.elytrium"
13+
version = "1.0.3-SNAPSHOT"
14+
15+
compileJava.options.encoding = "UTF-8"
16+
17+
java {
18+
sourceCompatibility = JavaVersion.VERSION_11
19+
targetCompatibility = JavaVersion.VERSION_11
20+
}
21+
22+
repositories {
23+
mavenCentral()
24+
25+
maven {
26+
name = "velocitypowered-repo"
27+
url = "https://repo.velocitypowered.com/snapshots/"
28+
}
29+
maven {
30+
name = "elytrium-repo"
31+
url = "https://maven.elytrium.net/repo/"
32+
}
33+
}
34+
35+
dependencies {
36+
compileOnly("net.elytrium:limboapi-api:1.0.3-SNAPSHOT")
37+
38+
compileOnly("com.velocitypowered:velocity-api:3.1.0")
39+
annotationProcessor("com.velocitypowered:velocity-api:3.1.0")
40+
compileOnly("com.velocitypowered:velocity-proxy:3.1.0") // From Elytrium Repo
41+
42+
// Needs for some velocity methods
43+
compileOnly("io.netty:netty-codec:4.1.70.Final")
44+
45+
compileOnly("com.github.spotbugs:spotbugs-annotations:4.5.0")
46+
}
47+
48+
license {
49+
header = project.rootProject.file("HEADER.txt")
50+
}
51+
52+
checkstyle {
53+
toolVersion "9.0.1"
54+
configFile file("${project.rootDir}/config/checkstyle/checkstyle.xml")
55+
configProperties = [configDirectory: "${project.rootDir}/config/checkstyle"]
56+
57+
// The build should immediately fail if we have errors.
58+
maxErrors = 0
59+
maxWarnings = 0
60+
}
61+
62+
tasks.withType(SpotBugsTask) {
63+
reports {
64+
html {
65+
enabled = true
66+
destination = file("$buildDir/reports/spotbugs/main/spotbugs.html")
67+
stylesheet = "fancy-hist.xsl"
68+
}
69+
}
70+
}
71+
72+
sourceSets.main.java.srcDir(tasks.register("generateTemplates", Copy) { task ->
73+
task.inputs.properties "version": project.version
74+
75+
task.from file("src/main/templates")
76+
task.into layout.buildDirectory.dir("../build/generated/sources/templates")
77+
task.expand "version": project.version
78+
}.map {
79+
it.outputs
80+
})

0 commit comments

Comments
 (0)