Skip to content

Commit

Permalink
Remove usage of deprecated ConfigureUtil
Browse files Browse the repository at this point in the history
  • Loading branch information
vierbergenlars committed Aug 6, 2024
1 parent f71175f commit ddf5b58
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 65 deletions.
47 changes: 0 additions & 47 deletions src/main/java/eu/xenit/gradle/alfrescosdk/tasks/Amp.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import static eu.xenit.gradle.alfrescosdk.internal.DeprecationHelper.warnDeprecationOnce;

import groovy.lang.Closure;
import java.io.File;
import java.util.concurrent.Callable;
import java.util.function.Supplier;
Expand All @@ -20,7 +19,6 @@
import org.gradle.api.tasks.Internal;
import org.gradle.api.tasks.Optional;
import org.gradle.api.tasks.bundling.Zip;
import org.gradle.util.ConfigureUtil;

/**
* Assembles an AMP archive.
Expand Down Expand Up @@ -313,51 +311,6 @@ public void setConfig(Supplier<File> config) {
}
//</editor-fold>

//<editor-fold desc="Groovy closure support">
/**
* @param web supplier of the directory that will be copied to the {@code /web} directory
* @deprecated since 0.2.0, use {@link #web(Action)} instead.
*/
@Deprecated
public void setWeb(Closure<File> web) {
setWeb(web::call);
}

/**
* @param config supplier of the directory that will be copied to the {@code /config} directory
* @deprecated since 0.2.0, use {@link #config(Action)} instead
*/
@Deprecated
public void setConfig(Closure<File> config) {
setConfig(config::call);
}

/**
* @param moduleProperties supplier of the file that will be copied to {@code /module.properties}
* @see #setModuleProperties(Supplier)
*/
public void setModuleProperties(Closure<File> moduleProperties) {
setModuleProperties(moduleProperties::call);
}

/**
* @param fileMappingProperties supplier of the file that will be copied to {@code /file-mapping.properties}
* @see #setFileMappingProperties(Supplier)
*/
public void setFileMappingProperties(Closure<File> fileMappingProperties) {
setFileMappingProperties(fileMappingProperties::call);
}

/**
* @see #de(Action)
* @param configureClosure action that configures the {@link CopySpec} for {@code /config/dynamic-extensions/bundles}
* @deprecated since 0.2.0. Use {@link #getDeBundles()} or {@link #setDeBundles(FileCollection)} instead.
*/
@Deprecated
public void de(Closure configureClosure) {
ConfigureUtil.configure(configureClosure, getDe());
}
//</editor-fold>

//<editor-fold desc="Deprecation support helpers">
private Supplier<Supplier<File>> _web = () -> web;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package eu.xenit.gradle.alfrescosdk.tasks;

import groovy.lang.Closure;
import org.gradle.api.Action;
import org.gradle.api.Named;
import org.gradle.api.NonNullApi;
import org.gradle.api.tasks.SourceSet;
import org.gradle.util.ConfigureUtil;

@NonNullApi
public interface AmpSourceSet extends Named {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
package eu.xenit.gradle.alfrescosdk.tasks;

import groovy.lang.Closure;
import java.io.File;
import java.util.Map;
import java.util.Properties;
import org.gradle.api.Action;
import org.gradle.api.NonNullApi;
import org.gradle.api.file.SourceDirectorySet;
import org.gradle.api.tasks.SourceSet;
import org.gradle.util.ConfigureUtil;

@NonNullApi
public interface AmpSourceSetConfiguration {
Expand Down Expand Up @@ -36,11 +33,6 @@ default AmpSourceSetConfiguration fileMapping(Map<String, String> fileMappingPro

SourceDirectorySet getConfig();

default AmpSourceSetConfiguration config(Closure configureClosure) {
ConfigureUtil.configure(configureClosure, getConfig());
return this;
}

default AmpSourceSetConfiguration config(Action<? super SourceDirectorySet> configure) {
configure.execute(getConfig());
return this;
Expand All @@ -49,12 +41,6 @@ default AmpSourceSetConfiguration config(Action<? super SourceDirectorySet> conf

SourceDirectorySet getWeb();

default AmpSourceSetConfiguration web(Closure configureClosure) {
ConfigureUtil.configure(configureClosure, getWeb());
return this;
}


default AmpSourceSetConfiguration web(Action<? super SourceDirectorySet> configure) {
configure.execute(getWeb());
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import static org.junit.Assert.assertTrue;

import eu.xenit.gradle.alfrescosdk.tasks.Amp;
import eu.xenit.gradle.alfrescosdk.tasks.AmpSourceSet;
import eu.xenit.gradle.alfrescosdk.tasks.AmpSourceSetConfiguration;
import java.io.File;
import java.io.IOException;
Expand Down

0 comments on commit ddf5b58

Please sign in to comment.