"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/LayeredSpec.java" between
spring-boot-2.7.3.tar.gz and spring-boot-2.7.4.tar.gz

About: Spring Boot helps to create Spring-powered, production-grade applications and services.

LayeredSpec.java  (spring-boot-2.7.3):LayeredSpec.java  (spring-boot-2.7.4)
/* /*
* Copyright 2012-2021 the original author or authors. * Copyright 2012-2022 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* https://www.apache.org/licenses/LICENSE-2.0 * https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
skipping to change at line 30 skipping to change at line 30
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import groovy.lang.Closure; import groovy.lang.Closure;
import org.gradle.api.Action; import org.gradle.api.Action;
import org.gradle.api.tasks.Input; import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.Optional; import org.gradle.api.tasks.Optional;
import org.gradle.util.ConfigureUtil;
import org.springframework.boot.loader.tools.Layer; import org.springframework.boot.loader.tools.Layer;
import org.springframework.boot.loader.tools.Layers; import org.springframework.boot.loader.tools.Layers;
import org.springframework.boot.loader.tools.Library; import org.springframework.boot.loader.tools.Library;
import org.springframework.boot.loader.tools.layer.ApplicationContentFilter; import org.springframework.boot.loader.tools.layer.ApplicationContentFilter;
import org.springframework.boot.loader.tools.layer.ContentFilter; import org.springframework.boot.loader.tools.layer.ContentFilter;
import org.springframework.boot.loader.tools.layer.ContentSelector; import org.springframework.boot.loader.tools.layer.ContentSelector;
import org.springframework.boot.loader.tools.layer.CustomLayers; import org.springframework.boot.loader.tools.layer.CustomLayers;
import org.springframework.boot.loader.tools.layer.IncludeExcludeContentSelector ; import org.springframework.boot.loader.tools.layer.IncludeExcludeContentSelector ;
import org.springframework.boot.loader.tools.layer.LibraryContentFilter; import org.springframework.boot.loader.tools.layer.LibraryContentFilter;
skipping to change at line 136 skipping to change at line 135
*/ */
public void application(Action<ApplicationSpec> action) { public void application(Action<ApplicationSpec> action) {
action.execute(this.application); action.execute(this.application);
} }
/** /**
* Customizes the {@link ApplicationSpec} using the given {@code closure} . * Customizes the {@link ApplicationSpec} using the given {@code closure} .
* @param closure the closure * @param closure the closure
*/ */
public void application(Closure<?> closure) { public void application(Closure<?> closure) {
application(ConfigureUtil.configureUsing(closure)); application(Closures.asAction(closure));
} }
/** /**
* Returns the {@link DependenciesSpec} that controls the layers to which dependencies * Returns the {@link DependenciesSpec} that controls the layers to which dependencies
* belong. * belong.
* @return the dependencies spec * @return the dependencies spec
*/ */
@Input @Input
public DependenciesSpec getDependencies() { public DependenciesSpec getDependencies() {
return this.dependencies; return this.dependencies;
skipping to change at line 171 skipping to change at line 170
*/ */
public void dependencies(Action<DependenciesSpec> action) { public void dependencies(Action<DependenciesSpec> action) {
action.execute(this.dependencies); action.execute(this.dependencies);
} }
/** /**
* Customizes the {@link DependenciesSpec} using the given {@code closure }. * Customizes the {@link DependenciesSpec} using the given {@code closure }.
* @param closure the closure * @param closure the closure
*/ */
public void dependencies(Closure<?> closure) { public void dependencies(Closure<?> closure) {
dependencies(ConfigureUtil.configureUsing(closure)); dependencies(Closures.asAction(closure));
} }
/** /**
* Returns the order of the layers in the archive from least to most freq uently * Returns the order of the layers in the archive from least to most freq uently
* changing. * changing.
* @return the layer order * @return the layer order
*/ */
@Input @Input
public List<String> getLayerOrder() { public List<String> getLayerOrder() {
return this.layerOrder; return this.layerOrder;
skipping to change at line 248 skipping to change at line 247
IntoLayersSpec(Function<String, IntoLayerSpec> specFactory, IntoL ayerSpec... spec) { IntoLayersSpec(Function<String, IntoLayerSpec> specFactory, IntoL ayerSpec... spec) {
this.intoLayers = new ArrayList<>(Arrays.asList(spec)); this.intoLayers = new ArrayList<>(Arrays.asList(spec));
this.specFactory = specFactory; this.specFactory = specFactory;
} }
public void intoLayer(String layer) { public void intoLayer(String layer) {
this.intoLayers.add(this.specFactory.apply(layer)); this.intoLayers.add(this.specFactory.apply(layer));
} }
public void intoLayer(String layer, Closure<?> closure) { public void intoLayer(String layer, Closure<?> closure) {
intoLayer(layer, ConfigureUtil.configureUsing(closure)); intoLayer(layer, Closures.asAction(closure));
} }
public void intoLayer(String layer, Action<IntoLayerSpec> action) { public void intoLayer(String layer, Action<IntoLayerSpec> action) {
IntoLayerSpec spec = this.specFactory.apply(layer); IntoLayerSpec spec = this.specFactory.apply(layer);
action.execute(spec); action.execute(spec);
this.intoLayers.add(spec); this.intoLayers.add(spec);
} }
<T> List<ContentSelector<T>> asSelectors(Function<IntoLayerSpec, ContentSelector<T>> selectorFactory) { <T> List<ContentSelector<T>> asSelectors(Function<IntoLayerSpec, ContentSelector<T>> selectorFactory) {
return this.intoLayers.stream().map(selectorFactory).coll ect(Collectors.toList()); return this.intoLayers.stream().map(selectorFactory).coll ect(Collectors.toList());
 End of changes. 5 change blocks. 
5 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)