diff --git a/api/build.gradle b/api/build.gradle index ecb11a4..c57efd3 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -70,3 +70,15 @@ dependencies { } compileOnly 'io.lumine.xikage:MythicMobs:4.9.1' } + +tasks.withType(JavaCompile).configureEach { + // ensure that the encoding is set to UTF-8, no matter what the system default is + // this fixes some edge cases with special characters not displaying correctly + // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html + // If Javadoc is generated, this must be specified in that task too. + it.options.encoding = "UTF-8" + + // Force warnings + options.compilerArgs << '-Xlint:all' + options.deprecation = true +} \ No newline at end of file diff --git a/api/src/main/java/net/islandearth/rpgregions/editor/ClassEditor.java b/api/src/main/java/net/islandearth/rpgregions/editor/ClassEditor.java index d9ca20f..c20c6b7 100644 --- a/api/src/main/java/net/islandearth/rpgregions/editor/ClassEditor.java +++ b/api/src/main/java/net/islandearth/rpgregions/editor/ClassEditor.java @@ -8,6 +8,10 @@ import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; +/** + * @deprecated in favour of {@link net.islandearth.rpgregions.gui.GuiEditable} + */ +@Deprecated public class ClassEditor { private final List editable = new ArrayList<>(); diff --git a/api/src/main/java/net/islandearth/rpgregions/editor/field/EditField.java b/api/src/main/java/net/islandearth/rpgregions/editor/field/EditField.java index 6c34c8d..2e9280f 100644 --- a/api/src/main/java/net/islandearth/rpgregions/editor/field/EditField.java +++ b/api/src/main/java/net/islandearth/rpgregions/editor/field/EditField.java @@ -8,6 +8,10 @@ import org.bukkit.ChatColor; import java.lang.reflect.Field; import java.lang.reflect.Modifier; +/** + * @deprecated in favour of {@link net.islandearth.rpgregions.gui.GuiEditable} + */ +@Deprecated public class EditField { private final ConfiguredRegion clazz; diff --git a/build.gradle b/build.gradle index aced65e..991b2a5 100644 --- a/build.gradle +++ b/build.gradle @@ -75,6 +75,18 @@ tasks.shadowJar { relocate 'net.wesjd', 'net.islandearth.rpgregions.libs.anvilgui' } +tasks.withType(JavaCompile).configureEach { + // ensure that the encoding is set to UTF-8, no matter what the system default is + // this fixes some edge cases with special characters not displaying correctly + // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html + // If Javadoc is generated, this must be specified in that task too. + it.options.encoding = "UTF-8" + + // Force warnings + options.compilerArgs << '-Xlint:all' + options.deprecation = true +} + build.dependsOn shadowJar import org.apache.tools.ant.filters.ReplaceTokens diff --git a/modern/build.gradle b/modern/build.gradle index e5e5bbe..675af21 100644 --- a/modern/build.gradle +++ b/modern/build.gradle @@ -49,6 +49,18 @@ compileJava { if (!ultraRegionsSupport) sourceSets.main.java.exclude "**/net/islandearth/rpgregions/api/integrations/ultraregions/UltraRegionsIntegration.java" } +tasks.withType(JavaCompile).configureEach { + // ensure that the encoding is set to UTF-8, no matter what the system default is + // this fixes some edge cases with special characters not displaying correctly + // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html + // If Javadoc is generated, this must be specified in that task too. + it.options.encoding = "UTF-8" + + // Force warnings + options.compilerArgs << '-Xlint:all' + options.deprecation = true +} + dependencies { testImplementation group: 'junit', name: 'junit', version: '4.12' implementation 'com.gitlab.samb440:languagy:2.0.3-RELEASE' // languagy diff --git a/rpgregions/build.gradle b/rpgregions/build.gradle index 3a08577..c6113a4 100644 --- a/rpgregions/build.gradle +++ b/rpgregions/build.gradle @@ -88,6 +88,18 @@ dependencies { compileOnly project(':api') } +tasks.withType(JavaCompile).configureEach { + // ensure that the encoding is set to UTF-8, no matter what the system default is + // this fixes some edge cases with special characters not displaying correctly + // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html + // If Javadoc is generated, this must be specified in that task too. + it.options.encoding = "UTF-8" + + // Force warnings + options.compilerArgs << '-Xlint:all' + options.deprecation = true +} + configurations.all { exclude group: 'commons-io' exclude group: 'commons-codec'