@@ -16,6 +16,8 @@ import org.gradle.api.internal.file.FileResolver
1616import org.gradle.api.internal.file.copy.CopySpecInternal
1717import org.gradle.api.internal.file.copy.DefaultCopySpec
1818import org.gradle.api.internal.project.ProjectInternal
19+ import org.gradle.api.internal.provider.DefaultPropertyFactory
20+ import org.gradle.api.internal.provider.PropertyHost
1921import org.gradle.api.specs.Spec
2022import org.gradle.api.tasks.util.PatternSet
2123import org.gradle.api.tasks.util.internal.PatternSets
@@ -44,7 +46,11 @@ class ProjectPackagingExtension extends SystemPackagingExtension {
4446 public ProjectPackagingExtension (Project project ) {
4547 FileResolver resolver = ((ProjectInternal ) project). getFileResolver();
4648 Instantiator instantiator = ((ProjectInternal ) project). getServices(). get(Instantiator . class);
47- if (GradleVersion . current(). baseVersion >= GradleVersion . version(" 8.3" ) || GradleVersion . current(). version. startsWith(' 8.3' )) {
49+ if (GradleVersion . current(). baseVersion >= GradleVersion . version(" 8.13-rc-1" )) {
50+ FileCollectionFactory fileCollectionFactory = ((ProjectInternal ) project). getServices(). get(FileCollectionFactory . class);
51+ Factory<PatternSet > patternSetFactory = new PatternSets.PatternSetFactory (PatternSpecFactory . INSTANCE )
52+ delegateCopySpec = new DefaultCopySpec (fileCollectionFactory, new DefaultPropertyFactory (PropertyHost . NO_OP ), instantiator, patternSetFactory);
53+ } else if (GradleVersion . current(). baseVersion >= GradleVersion . version(" 8.3" ) || GradleVersion . current(). version. startsWith(' 8.3' )) {
4854 FileCollectionFactory fileCollectionFactory = ((ProjectInternal ) project). getServices(). get(FileCollectionFactory . class);
4955 Factory<PatternSet > patternSetFactory = new PatternSets.PatternSetFactory (PatternSpecFactory . INSTANCE )
5056 delegateCopySpec = new DefaultCopySpec (fileCollectionFactory, project. objects, instantiator, patternSetFactory);
0 commit comments