Merge branch '4.1.x'

Closes gh-52054
This commit is contained in:
Stéphane Nicoll
2026-10-07 10:15:24 +02:00
2 changed files with 7 additions and 1 deletions
@@ -73,6 +73,8 @@ import org.gradle.jvm.toolchain.JavaLanguageVersion;
import org.springframework.boot.build.architecture.ArchitecturePlugin;
import org.springframework.boot.build.classpath.CheckClasspathForProhibitedDependencies;
import org.springframework.boot.build.optional.OptionalDependenciesPlugin;
import org.springframework.boot.build.properties.BuildProperties;
import org.springframework.boot.build.properties.BuildType;
import org.springframework.boot.build.springframework.CheckAotFactories;
import org.springframework.boot.build.springframework.CheckSpringFactories;
import org.springframework.boot.build.testing.TestFailuresPlugin;
@@ -172,12 +174,16 @@ class JavaConventions {
}
private void configureJarManifestConventions(Project project) {
BuildType buildType = BuildProperties.get(project).buildType();
String license = (buildType == BuildType.OPEN_SOURCE) ? "Apache License, Version 2.0"
: "Broadcom Foundation License";
TaskProvider<ExtractResources> extractLegalResources = project.getTasks()
.register("extractLegalResources", ExtractResources.class, (task) -> {
task.getPackageName().set("org.springframework.boot.build.legal");
task.getDestinationDirectory().set(project.getLayout().getBuildDirectory().dir("legal"));
task.getResourceNames().set(Arrays.asList("LICENSE.txt", "NOTICE.txt"));
task.getProperties().put("version", project.getVersion().toString());
task.getProperties().put("license", license);
});
SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class);
Set<String> sourceJarTaskNames = sourceSets.stream()
@@ -1,6 +1,6 @@
Spring Boot ${version}
Copyright (c) 2012-2026 VMware, Inc.
This product is licensed to you under the Apache License, Version 2.0
This product is licensed to you under the ${license}
(the "License"). You may not use this product except in compliance with
the License.