71 lines
1.5 KiB
Groovy
71 lines
1.5 KiB
Groovy
plugins {
|
|
id 'com.diffplug.spotless' version '6.22.0'
|
|
id 'java-library'
|
|
id 'maven-publish'
|
|
id 'net.researchgate.release' version '3.1.0'
|
|
}
|
|
|
|
group = 'com.majinnaibu.minecraft.plugins'
|
|
description = "ScoreKeeper"
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
options.encoding = 'UTF-8'
|
|
// options.compilerArgs << "-Xlint:deprecation"
|
|
}
|
|
|
|
tasks.withType(Javadoc).configureEach {
|
|
options.encoding = 'UTF-8'
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly 'io.papermc.paper:paper-api:1.21.7-R0.1-SNAPSHOT'
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(21)
|
|
}
|
|
}
|
|
|
|
processResources {
|
|
inputs.property "version", project.version
|
|
filesMatching('plugin.yml') {
|
|
expand(project.properties)
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
maven(MavenPublication) {
|
|
from components.java
|
|
}
|
|
}
|
|
}
|
|
|
|
release {
|
|
buildTasks ['spotlessCheck', 'build']
|
|
failOnSnapshotDependencies = true
|
|
ignoredSnapshotDependencies = [
|
|
"io.papermc.paper:paper-api"
|
|
]
|
|
revertOnFail = true
|
|
tagTemplate = 'v$version'
|
|
versionPropertyFile = 'gradle.properties'
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url = 'https://repo.papermc.io/repository/maven-public/' }
|
|
}
|
|
|
|
spotless {
|
|
java {
|
|
googleJavaFormat()
|
|
importOrder 'java', 'javax', 'com', 'net', 'org', ''
|
|
licenseHeaderFile 'config/license-header.txt'
|
|
target 'src/**/*.java'
|
|
removeUnusedImports()
|
|
toggleOffOn()
|
|
}
|
|
}
|