⁠
gurwi30: Added UTF-8 encoding to Bukkit, BungeeCord & Velocity to the build.gradle (#2211 )
- plugins {
- id 'java'
- }
- group = '${GROUP_ID}'
- version = '${PLUGIN_VERSION}'
- repositories {
- mavenCentral()
- }
- dependencies {
- }
- def targetJavaVersion = ${JAVA_VERSION}
- java {
- def javaVersion = JavaVersion.toVersion(targetJavaVersion)
- sourceCompatibility = javaVersion
- targetCompatibility = javaVersion
- if (JavaVersion.current() < javaVersion) {
- toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
- }
- }
- tasks.withType(JavaCompile).configureEach {
- if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
- options.release.set(targetJavaVersion)
- }
- }
- processResources {
- def props = [version: version]
- inputs.properties props
- filteringCharset 'UTF-8'
- filesMatching('${MANIFEST_NAME}') {
- expand props
- }
- }
- plugins {
- id 'java'
- }
- group = '${GROUP_ID}'
- version = '${PLUGIN_VERSION}'
- repositories {
- mavenCentral()
- }
- dependencies {
- }
- def targetJavaVersion = ${JAVA_VERSION}
- java {
- def javaVersion = JavaVersion.toVersion(targetJavaVersion)
- sourceCompatibility = javaVersion
- targetCompatibility = javaVersion
- if (JavaVersion.current() < javaVersion) {
- toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
- }
- }
- tasks.withType(JavaCompile).configureEach {
- options.encoding = 'UTF-8'
- if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
- options.release.set(targetJavaVersion)
- }
- }
- processResources {
- def props = [version: version]
- inputs.properties props
- filteringCharset 'UTF-8'
- filesMatching('${MANIFEST_NAME}') {
- expand props
- }
- }