plugins { id 'java' } group = 'dev.itxiaohui.contentguard' version = '0.1.0-dev' repositories { mavenCentral() maven { url = uri('https://hub.spigotmc.org/nexus/content/repositories/snapshots/') content { includeGroup('org.spigotmc') } } } java { toolchain { languageVersion = JavaLanguageVersion.of(21) } } dependencies { compileOnly 'org.spigotmc:spigot-api:1.21.1-R0.1-SNAPSHOT' testImplementation 'org.spigotmc:spigot-api:1.21.1-R0.1-SNAPSHOT' testImplementation platform('org.junit:junit-bom:5.13.4') testImplementation 'org.junit.jupiter:junit-jupiter' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' options.release = 21 } processResources { inputs.property('version', project.version) filesMatching('plugin.yml') { expand(version: project.version) } } test { useJUnitPlatform() } sourceSets { compatProbe { compileClasspath += sourceSets.main.output + configurations.compileClasspath } } tasks.register('compatProbeJar', Jar) { archiveClassifier = 'compat-probe' from sourceSets.compatProbe.output } tasks.withType(AbstractArchiveTask).configureEach { preserveFileTimestamps = false reproducibleFileOrder = true }