diff --git a/_ext/eclipse-base/src/main/java/com/diffplug/spotless/extra/eclipse/base/SpotlessEclipseFramework.java b/_ext/eclipse-base/src/main/java/com/diffplug/spotless/extra/eclipse/base/SpotlessEclipseFramework.java index 5159ea9ad2..7d9379e63a 100644 --- a/_ext/eclipse-base/src/main/java/com/diffplug/spotless/extra/eclipse/base/SpotlessEclipseFramework.java +++ b/_ext/eclipse-base/src/main/java/com/diffplug/spotless/extra/eclipse/base/SpotlessEclipseFramework.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 DiffPlug + * Copyright 2016-2021 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -146,6 +146,7 @@ private static T createInstance(Class clazz) { * @throws BundleException Throws exception in case the setup failed. * @deprecated Use {@link #setup(SpotlessEclipseConfig)} instead. */ + @Deprecated public synchronized static boolean setup() throws BundleException { return setup(plugins -> plugins.applyDefault()); } @@ -159,6 +160,7 @@ public synchronized static boolean setup() throws BundleException { * @throws BundleException Throws exception in case the setup failed. * @deprecated Use {@link #setup(SpotlessEclipseConfig)} instead. */ + @Deprecated public synchronized static boolean setup(Consumer plugins) throws BundleException { return setup(config -> config.applyDefault(), plugins); } @@ -172,6 +174,7 @@ public synchronized static boolean setup(Consumer p * @throws BundleException Throws exception in case the setup failed. * @deprecated Use {@link #setup(SpotlessEclipseConfig)} instead. */ + @Deprecated public synchronized static boolean setup(Consumer config, Consumer plugins) throws BundleException { return setup(core -> core.applyDefault(), config, plugins); } @@ -186,6 +189,7 @@ public synchronized static boolean setup(Consumer * @throws BundleException Throws exception in case the setup failed. * @deprecated Use {@link #setup(SpotlessEclipseConfig)} instead. */ + @Deprecated public synchronized static boolean setup(Consumer core, Consumer services, Consumer plugins) throws BundleException { if (null != INSTANCE) { return false; diff --git a/_ext/eclipse-jdt/src/main/java/com/diffplug/spotless/extra/eclipse/java/EclipseJdtFormatterStepImpl.java b/_ext/eclipse-jdt/src/main/java/com/diffplug/spotless/extra/eclipse/java/EclipseJdtFormatterStepImpl.java index 63c738ff86..b3fb7acaf3 100644 --- a/_ext/eclipse-jdt/src/main/java/com/diffplug/spotless/extra/eclipse/java/EclipseJdtFormatterStepImpl.java +++ b/_ext/eclipse-jdt/src/main/java/com/diffplug/spotless/extra/eclipse/java/EclipseJdtFormatterStepImpl.java @@ -56,6 +56,7 @@ public void activatePlugins(SpotlessEclipsePluginConfig config) { } /** @deprecated Use {@link #format(String, File)} instead. */ + @Deprecated public String format(String raw) throws Exception { return format(raw, new File("")); } diff --git a/_ext/gradle/java-setup.gradle b/_ext/gradle/java-setup.gradle index b777a08523..598077d73c 100644 --- a/_ext/gradle/java-setup.gradle +++ b/_ext/gradle/java-setup.gradle @@ -8,10 +8,11 @@ apply from: rootProject.file('gradle/java-setup.gradle') // Allow declaration of api/compile dependencies apply plugin: 'java-library' -// Show warning locations +// Show warning locations, fail on warnings tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:unchecked" options.compilerArgs << "-Xlint:deprecation" + options.compilerArgs << "-Werror" } //Currently testlib is not used by _ext. Hence the external dependencies are added here.