SimplexSS/build.gradle

70 lines
1.6 KiB
Groovy
Raw Normal View History

plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.2'
2022-12-15 00:55:47 +00:00
id 'maven-publish'
}
group = 'io.github.simplex'
2022-12-15 05:08:12 +00:00
version = '1.0.1'
repositories {
mavenCentral()
maven {
name = 'papermc-repo'
url = 'https://repo.papermc.io/repository/maven-public/'
}
maven {
name = 'sonatype'
url = 'https://oss.sonatype.org/content/groups/public/'
}
}
dependencies {
compileOnly 'io.papermc.paper:paper-api:1.19-R0.1-SNAPSHOT'
2022-12-15 00:55:47 +00:00
shadow 'io.projectreactor:reactor-core:3.4.24'
}
shadowJar {
2022-12-15 05:04:43 +00:00
relocate('reactor', "io.github.simplexdevelopment.reactor")
2022-12-15 00:55:47 +00:00
exclude('io.github.simplexdevelopment.impl')
}
def targetJavaVersion = 17
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
2022-12-15 00:55:47 +00:00
withSourcesJar()
withJavadocJar()
}
tasks.withType(JavaCompile).configureEach {
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release = targetJavaVersion
}
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}
2022-12-15 00:55:47 +00:00
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
wrapper {
gradleVersion = '7.5.1'
distributionType = Wrapper.DistributionType.ALL
}