Files
Metropolis/build.gradle

90 lines
2.5 KiB
Groovy

plugins {
id 'java-library'
id 'maven-publish'
id 'org.danilopianini.git-sensitive-semantic-versioning' version '7.0.24'
}
group = 'com.majinnaibu.bukkitplugins'
description = 'Metropolis'
gitSemVer {
minimumVersion.set('0.5.0')
versionPrefix.set('v')
}
repositories {
mavenCentral()
maven { url = 'https://repo.papermc.io/repository/maven-public/' }
maven { url = 'https://maven.enginehub.org/repo/' }
mavenLocal()
}
dependencies {
compileOnly 'io.papermc.paper:paper-api:26.2.build.129-stable'
compileOnly 'com.sk89q.worldedit:worldedit-bukkit:7.4.5'
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.19'
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.4'
testImplementation 'org.mockito:mockito-junit-jupiter:5.24.0'
testImplementation 'io.papermc.paper:paper-api:26.2.build.129-stable'
testImplementation 'com.sk89q.worldedit:worldedit-bukkit:7.4.5'
testImplementation 'com.sk89q.worldguard:worldguard-bukkit:7.0.19'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.13.4'
}
sourceSets {
integrationTest {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}
configurations {
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntimeOnly.extendsFrom testRuntimeOnly
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}
tasks.named('updateDaemonJvm') {
languageVersion = JavaLanguageVersion.of(25)
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
def pluginVersion = project.version.toString()
tasks.named('processResources') {
inputs.property('version', pluginVersion)
filesMatching('plugin.yml') {
expand(version: pluginVersion)
}
}
tasks.named('test') {
useJUnitPlatform()
}
tasks.register('integrationTest', Test) {
description = 'Runs opt-in tests against a running Paper server with RCON enabled.'
group = 'verification'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
useJUnitPlatform()
shouldRunAfter tasks.named('test')
}
tasks.named('wrapper') {
gradleVersion = '9.8.0'
distributionType = Wrapper.DistributionType.BIN
distributionBase = Wrapper.PathBase.PROJECT
distributionPath = '.gradle/wrapper/dists'
archiveBase = Wrapper.PathBase.PROJECT
archivePath = '.gradle/wrapper/dists'
}