@@ -16,6 +16,8 @@ import org.gradle.api.internal.file.FileResolver
16
16
import org.gradle.api.internal.file.copy.CopySpecInternal
17
17
import org.gradle.api.internal.file.copy.DefaultCopySpec
18
18
import org.gradle.api.internal.project.ProjectInternal
19
+ import org.gradle.api.internal.provider.DefaultPropertyFactory
20
+ import org.gradle.api.internal.provider.PropertyHost
19
21
import org.gradle.api.specs.Spec
20
22
import org.gradle.api.tasks.util.PatternSet
21
23
import org.gradle.api.tasks.util.internal.PatternSets
@@ -44,7 +46,11 @@ class ProjectPackagingExtension extends SystemPackagingExtension {
44
46
public ProjectPackagingExtension (Project project ) {
45
47
FileResolver resolver = ((ProjectInternal ) project). getFileResolver();
46
48
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' )) {
48
54
FileCollectionFactory fileCollectionFactory = ((ProjectInternal ) project). getServices(). get(FileCollectionFactory . class);
49
55
Factory<PatternSet > patternSetFactory = new PatternSets.PatternSetFactory (PatternSpecFactory . INSTANCE )
50
56
delegateCopySpec = new DefaultCopySpec (fileCollectionFactory, project. objects, instantiator, patternSetFactory);
0 commit comments