Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
# Eclipse
.project
.classpath
.settings/
# Gradle
.gradle/
build/
gradle-app.setting
!gradle-wrapper.jar
!gradle-wrapper.properties

# IntelliJ
# IDE
.idea/
*.iml
*.iws
*.ipr
out/

# Maven
target/
# OS
.DS_Store
Thumbs.db

# Other
*.bat
logs/latest.log
# Run server
run/

# Patch files
*.patch
113 changes: 113 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
plugins {
`java-library`
id("xyz.jpenilla.run-paper") version "2.3.1"
id("com.diffplug.spotless") version "7.2.1"
id("io.freefair.lombok") version "9.0.0"
}

group = "nl.rutgerkok"
version = "1.14.2-SNAPSHOT"

repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://rutgerkok.nl/repo")
maven("https://repo.codemc.org/repository/maven-public/")
maven("https://maven.enginehub.org/repo/")
maven("https://repo.commandapi.jorel.dev/")
maven("https://repo.commandapi.org/")
}

dependencies {
// Paper API
compileOnly("io.papermc.paper:paper-api:1.21.10-R0.1-SNAPSHOT")
testImplementation("io.papermc.paper:paper-api:1.21.10-R0.1-SNAPSHOT")

// Third party plugins (compileOnly as they are provided at runtime)
compileOnly("com.palmergames:towny:0.96.7.0")
compileOnly("com.massivecraft:MassiveCore:2.7.5")
compileOnly("com.massivecraft:Factions:2.7.5")
compileOnly("com.gmail.nossr50.mcMMO:mcMMO:2.1.218")
compileOnly("me.glaremasters:guilds:3.5.3.5-RELEASE")
compileOnly("net.sacredlabyrinth.phaed.simpleclans:SimpleClans:2.15.1")
compileOnly("commons-lang:commons-lang:2.6")

// Testing
testImplementation("org.junit.jupiter:junit-jupiter-api:5.3.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.3.1")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.3.1")
testImplementation("com.google.code.gson:gson:2.10.1")
testImplementation("commons-lang:commons-lang:2.6")
testImplementation("org.mockito:mockito-core:2.23.0")
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}

tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}

tasks.test {
useJUnitPlatform()
}

// Resource filtering to replace @version@ in plugin.yml
tasks.processResources {
val props =
mapOf(
"project" to
mapOf(
"name" to rootProject.name,
"version" to version,
),
)
inputs.properties(props)
filteringCharset = "UTF-8"
filesMatching("plugin.yml") {
expand(props)
}
}

tasks.jar {
manifest {
attributes(
"paperweight-mappings-namespace" to "mojang",
)
}
}

// Spotless configuration (standard java config)
allprojects {
apply(plugin = "java")
apply(plugin = "com.diffplug.spotless")
apply(plugin = "io.freefair.lombok")
spotless {
java {
googleJavaFormat("1.30.0")
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
}
kotlinGradle {
ktlint()
trimTrailingWhitespace()
endWithNewline()
}
json {
gson()
target("src/main/resources/**/**/*.json")
target("src/test/resources/**/**/*.json")
// npmExecutable("C:/Program Files/nodejs/npm.cmd")
}
}
}
// Run-paper configuration
tasks {
runServer {
minecraftVersion("1.21.4")
}
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
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-9.3.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading