make jakarta tasks cacheable

This commit is contained in:
Steve Ebersole 2021-07-19 10:18:52 -05:00
parent 4f265ee8ce
commit fc91131278
2 changed files with 4 additions and 0 deletions

View File

@ -12,6 +12,7 @@ import javax.inject.Inject;
import org.gradle.api.DefaultTask; import org.gradle.api.DefaultTask;
import org.gradle.api.file.DirectoryProperty; import org.gradle.api.file.DirectoryProperty;
import org.gradle.api.model.ObjectFactory; import org.gradle.api.model.ObjectFactory;
import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.InputDirectory; import org.gradle.api.tasks.InputDirectory;
import org.gradle.api.tasks.OutputDirectory; import org.gradle.api.tasks.OutputDirectory;
import org.gradle.api.tasks.TaskAction; import org.gradle.api.tasks.TaskAction;
@ -21,6 +22,7 @@ import static org.hibernate.orm.jakarta.JakartaPlugin.JAKARTA;
/** /**
* @author Steve Ebersole * @author Steve Ebersole
*/ */
@CacheableTask
public abstract class JakartaDirectoryTransformation extends DefaultTask { public abstract class JakartaDirectoryTransformation extends DefaultTask {
private final DirectoryProperty sourceDirectory; private final DirectoryProperty sourceDirectory;
private final DirectoryProperty targetDirectory; private final DirectoryProperty targetDirectory;

View File

@ -11,6 +11,7 @@ import javax.inject.Inject;
import org.gradle.api.DefaultTask; import org.gradle.api.DefaultTask;
import org.gradle.api.file.RegularFileProperty; import org.gradle.api.file.RegularFileProperty;
import org.gradle.api.model.ObjectFactory; import org.gradle.api.model.ObjectFactory;
import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.InputFile; import org.gradle.api.tasks.InputFile;
import org.gradle.api.tasks.OutputFile; import org.gradle.api.tasks.OutputFile;
import org.gradle.api.tasks.TaskAction; import org.gradle.api.tasks.TaskAction;
@ -20,6 +21,7 @@ import static org.hibernate.orm.jakarta.JakartaPlugin.JAKARTA;
/** /**
* @author Steve Ebersole * @author Steve Ebersole
*/ */
@CacheableTask
public abstract class JakartaJarTransformation extends DefaultTask { public abstract class JakartaJarTransformation extends DefaultTask {
private final RegularFileProperty sourceJar; private final RegularFileProperty sourceJar;
private final RegularFileProperty targetJar; private final RegularFileProperty targetJar;