Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
Treat warnings as errors in _ext projects.
Browse files Browse the repository at this point in the history
  • Loading branch information
fvgh committed Oct 10, 2021
1 parent 59819eb commit d21a7bc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -146,6 +146,7 @@ private static <T> T createInstance(Class<? extends T> 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());
}
Expand All @@ -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<SpotlessEclipsePluginConfig> plugins) throws BundleException {
return setup(config -> config.applyDefault(), plugins);
}
Expand All @@ -172,6 +174,7 @@ public synchronized static boolean setup(Consumer<SpotlessEclipsePluginConfig> p
* @throws BundleException Throws exception in case the setup failed.
* @deprecated Use {@link #setup(SpotlessEclipseConfig)} instead.
*/
@Deprecated
public synchronized static boolean setup(Consumer<SpotlessEclipseServiceConfig> config, Consumer<SpotlessEclipsePluginConfig> plugins) throws BundleException {
return setup(core -> core.applyDefault(), config, plugins);
}
Expand All @@ -186,6 +189,7 @@ public synchronized static boolean setup(Consumer<SpotlessEclipseServiceConfig>
* @throws BundleException Throws exception in case the setup failed.
* @deprecated Use {@link #setup(SpotlessEclipseConfig)} instead.
*/
@Deprecated
public synchronized static boolean setup(Consumer<SpotlessEclipseCoreConfig> core, Consumer<SpotlessEclipseServiceConfig> services, Consumer<SpotlessEclipsePluginConfig> plugins) throws BundleException {
if (null != INSTANCE) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(""));
}
Expand Down
3 changes: 2 additions & 1 deletion _ext/gradle/java-setup.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d21a7bc

Please sign in to comment.