9
0
mirror of https://gitlab.com/SamB440/rpgregions-2.git synced 2025-12-26 18:29:16 +00:00

Force warnings on compile

This commit is contained in:
SamB440
2021-06-12 19:19:03 +01:00
parent 13c401caaf
commit d547a29cff
6 changed files with 56 additions and 0 deletions

View File

@@ -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
}

View File

@@ -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<EditField> editable = new ArrayList<>();

View File

@@ -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;

View File

@@ -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

View File

@@ -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

View File

@@ -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'