Remove deprecated code flagged for removal

Closes gh-27303
This commit is contained in:
Stephane Nicoll
2021-07-14 11:49:52 +02:00
parent 46ad4c6f98
commit dc5acb0019
82 changed files with 183 additions and 2508 deletions

View File

@@ -4,7 +4,7 @@ plugins {
}
bootJar {
mainClassName 'com.example.ExampleApplication'
mainClass = 'com.example.ExampleApplication'
}
// tag::env-runtime[]

View File

@@ -4,7 +4,7 @@ plugins {
}
bootJar {
mainClassName 'com.example.ExampleApplication'
mainClass = 'com.example.ExampleApplication'
}
// tag::publish[]

View File

@@ -7,7 +7,7 @@ plugins {
}
tasks.getByName<BootJar>("bootJar") {
mainClassName = "com.example.ExampleApplication"
mainClass.set("com.example.ExampleApplication")
}
// tag::publish[]

View File

@@ -20,7 +20,6 @@ import java.io.File;
import org.gradle.api.Action;
import org.gradle.api.Project;
import org.gradle.api.model.ReplacedBy;
import org.gradle.api.plugins.BasePlugin;
import org.gradle.api.plugins.JavaPlugin;
import org.gradle.api.plugins.JavaPluginConvention;
@@ -65,28 +64,6 @@ public class SpringBootExtension {
return this.mainClass;
}
/**
* Returns the fully-qualified main class name of the application.
* @return the fully-qualified name of the application's main class
* @deprecated since 2.4.0 for removal in 2.6.0 in favor of {@link #getMainClass()}.
*/
@Deprecated
@ReplacedBy("mainClass")
public String getMainClassName() {
return this.mainClass.getOrNull();
}
/**
* Sets the fully-qualified main class name of the application.
* @param mainClassName the fully-qualified name of the application's main class
* @deprecated since 2.4.0 for removal in 2.6.0 in favor of {@link #getMainClass} and
* {@link Property#set(Object)}
*/
@Deprecated
public void setMainClassName(String mainClassName) {
this.mainClass.set(mainClassName);
}
/**
* Creates a new {@link BuildInfo} task named {@code bootBuildInfo} and configures the
* Java plugin's {@code classes} task to depend upon it.

View File

@@ -21,7 +21,6 @@ import org.gradle.api.Project;
import org.gradle.api.Task;
import org.gradle.api.file.FileCollection;
import org.gradle.api.file.FileTreeElement;
import org.gradle.api.model.ReplacedBy;
import org.gradle.api.provider.Property;
import org.gradle.api.specs.Spec;
import org.gradle.api.tasks.Classpath;
@@ -44,24 +43,6 @@ public interface BootArchive extends Task {
@Input
Property<String> getMainClass();
/**
* Returns the fully-qualified main class name of the application.
* @return the fully-qualified name of the application's main class
* @deprecated since 2.4.0 for removal in 2.6.0 in favor of {@link #getMainClass()}.
*/
@Deprecated
@ReplacedBy("mainClass")
String getMainClassName();
/**
* Sets the fully-qualified main class name of the application.
* @param mainClassName the fully-qualified name of the application's main class
* @deprecated since 2.4.0 for removal in 2.6.0 in favor of {@link #getMainClass} and
* {@link Property#set(Object)}
*/
@Deprecated
void setMainClassName(String mainClassName);
/**
* Adds Ant-style patterns that identify files that must be unpacked from the archive
* when it is launched.

View File

@@ -133,18 +133,6 @@ public class BootJar extends Jar implements BootArchive {
return this.mainClass;
}
@Override
@Deprecated
public String getMainClassName() {
return this.mainClass.getOrNull();
}
@Override
@Deprecated
public void setMainClassName(String mainClassName) {
this.mainClass.set(mainClassName);
}
@Override
public void requiresUnpack(String... patterns) {
this.support.requiresUnpack(patterns);
@@ -180,15 +168,6 @@ public class BootJar extends Jar implements BootArchive {
return this.layered;
}
/**
* Configures the jar to be layered using the default layering.
* @since 2.3.0
* @deprecated since 2.4.0 for removal in 2.6.0 as layering as now enabled by default.
*/
@Deprecated
public void layered() {
}
/**
* Configures the jar's layering using the given {@code action}.
* @param action the action to apply

View File

@@ -115,18 +115,6 @@ public class BootWar extends War implements BootArchive {
return this.mainClass;
}
@Override
@Deprecated
public String getMainClassName() {
return this.mainClass.getOrNull();
}
@Override
@Deprecated
public void setMainClassName(String mainClassName) {
this.mainClass.set(mainClassName);
}
@Override
public void requiresUnpack(String... patterns) {
this.support.requiresUnpack(patterns);

View File

@@ -4,6 +4,6 @@ plugins {
}
bootJar {
mainClassName = 'com.example.Application'
mainClass = 'com.example.Application'
launchScript()
}