Remove APIs deprecated for removal in 3.5

Closes gh-43788
This commit is contained in:
Andy Wilkinson
2025-01-14 12:34:43 +00:00
parent f301b2a123
commit 2f29a49a1d
61 changed files with 29 additions and 3522 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2024 the original author or authors.
* Copyright 2012-2025 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.
@@ -154,10 +154,8 @@ public abstract class BootJar extends Jar implements BootArchive {
jarmodeToolsLocation);
}
@SuppressWarnings("removal")
private boolean isIncludeJarmodeTools() {
return Boolean.TRUE.equals(this.getIncludeTools().get())
&& Boolean.TRUE.equals(this.layered.getIncludeLayerTools().get());
return Boolean.TRUE.equals(this.getIncludeTools().get());
}
@Override

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2024 the original author or authors.
* Copyright 2012-2025 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.
@@ -128,10 +128,8 @@ public abstract class BootWar extends War implements BootArchive {
layerResolver, jarmodeToolsLocation);
}
@SuppressWarnings("removal")
private boolean isIncludeJarmodeTools() {
return Boolean.TRUE.equals(this.getIncludeTools().get())
&& Boolean.TRUE.equals(this.layered.getIncludeLayerTools().get());
return Boolean.TRUE.equals(this.getIncludeTools().get());
}
@Override

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2024 the original author or authors.
* Copyright 2012-2025 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.
@@ -64,20 +64,8 @@ public abstract class LayeredSpec {
this.application = objects.newInstance(ApplicationSpec.class);
this.dependencies = objects.newInstance(DependenciesSpec.class);
getEnabled().convention(true);
getIncludeLayerTools().convention(true);
}
/**
* Returns whether the layer tools should be included as a dependency in the layered
* archive.
* @return whether the layer tools should be included
* @since 3.0.0
* @deprecated since 3.3.0 for removal in 3.5.0 in favor of {@code includeTools}.
*/
@Input
@Deprecated(since = "3.3.0", forRemoval = true)
public abstract Property<Boolean> getIncludeLayerTools();
/**
* Returns whether the layers.idx should be included in the archive.
* @return whether the layers.idx should be included

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2024 the original author or authors.
* Copyright 2012-2025 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.
@@ -321,18 +321,6 @@ abstract class AbstractBootArchiveIntegrationTests {
.getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
}
@TestTemplate
void notUpToDateWhenBuiltWithLayerToolsAndThenWithoutLayerTools() {
assertThat(this.gradleBuild.scriptProperty("layerTools", "")
.build(this.taskName)
.task(":" + this.taskName)
.getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
assertThat(this.gradleBuild.scriptProperty("layerTools", "includeLayerTools = false")
.build(this.taskName)
.task(":" + this.taskName)
.getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
}
@TestTemplate
void notUpToDateWhenBuiltWithToolsAndThenWithoutTools() {
assertThat(this.gradleBuild.scriptProperty("includeTools", "")

View File

@@ -626,14 +626,6 @@ abstract class AbstractBootArchiveTests<T extends Jar & BootArchive> {
assertThat(entryNames).isNotEmpty().contains(this.libPath + JarModeLibrary.TOOLS.getName());
}
@Test
@SuppressWarnings("removal")
void whenArchiveIsLayeredAndIncludeLayerToolsIsFalseThenLayerToolsAreNotAddedToTheJar() throws IOException {
List<String> entryNames = getEntryNames(
createLayeredJar((configuration) -> configuration.getIncludeLayerTools().set(false)));
assertThat(entryNames).isNotEmpty().doesNotContain(this.libPath + JarModeLibrary.TOOLS.getName());
}
@Test
void whenIncludeToolsIsFalseThenToolsAreNotAddedToTheJar() throws IOException {
this.task.getIncludeTools().set(false);

View File

@@ -1,11 +0,0 @@
plugins {
id 'java'
id 'org.springframework.boot' version '{version}'
}
bootJar {
mainClass = 'com.example.Application'
layered {
{layerTools}
}
}

View File

@@ -1,12 +0,0 @@
plugins {
id 'java'
id 'org.springframework.boot' version '{version}'
id 'war'
}
bootWar {
mainClass = 'com.example.Application'
layered {
{layerTools}
}
}