Enable deprecation compilation warnings
See gh-21271
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,12 +19,11 @@ package org.springframework.boot.gradle.plugin;
|
||||
import org.gradle.api.Action;
|
||||
import org.gradle.api.Plugin;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.artifacts.maven.MavenResolver;
|
||||
import org.gradle.api.plugins.MavenPlugin;
|
||||
import org.gradle.api.tasks.Upload;
|
||||
|
||||
/**
|
||||
* {@link Action} that is executed in response to the {@link MavenPlugin} being applied.
|
||||
* {@link Action} that is executed in response to the
|
||||
* {@link org.gradle.api.plugins.MavenPlugin} being applied.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@@ -37,8 +36,9 @@ final class MavenPluginAction implements PluginApplicationAction {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public Class<? extends Plugin<? extends Project>> getPluginClass() {
|
||||
return MavenPlugin.class;
|
||||
return org.gradle.api.plugins.MavenPlugin.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -50,8 +50,9 @@ final class MavenPluginAction implements PluginApplicationAction {
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void clearConfigurationMappings(Upload upload) {
|
||||
upload.getRepositories().withType(MavenResolver.class,
|
||||
upload.getRepositories().withType(org.gradle.api.artifacts.maven.MavenResolver.class,
|
||||
(resolver) -> resolver.getPom().getScopeMappings().getMappings().clear());
|
||||
}
|
||||
|
||||
|
||||
@@ -208,11 +208,13 @@ public class BootJar extends Jar implements BootArchive {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean isExcludeDevtools() {
|
||||
return this.support.isExcludeDevtools();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public void setExcludeDevtools(boolean excludeDevtools) {
|
||||
this.support.setExcludeDevtools(excludeDevtools);
|
||||
}
|
||||
|
||||
@@ -165,11 +165,13 @@ public class BootWar extends War implements BootArchive {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean isExcludeDevtools() {
|
||||
return this.support.isExcludeDevtools();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public void setExcludeDevtools(boolean excludeDevtools) {
|
||||
this.support.setExcludeDevtools(excludeDevtools);
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@ class BootWarTests extends AbstractBootArchiveTests<BootWar> {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Deprecated
|
||||
void devtoolsJarCanBeIncludedWhenItsOnTheProvidedClasspath() throws IOException {
|
||||
getTask().setMainClassName("com.example.Main");
|
||||
getTask().providedClasspath(jarFile("spring-boot-devtools-0.1.2.jar"));
|
||||
|
||||
Reference in New Issue
Block a user