org.gradle.api.internal.DefaultDomainObjectSet Java Examples
The following examples show how to use
org.gradle.api.internal.DefaultDomainObjectSet.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultConfiguration.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public DefaultConfiguration(String path, String name, ConfigurationsProvider configurationsProvider, ConfigurationResolver resolver, ListenerManager listenerManager, DependencyMetaDataProvider metaDataProvider, ResolutionStrategyInternal resolutionStrategy) { this.path = path; this.name = name; this.configurationsProvider = configurationsProvider; this.resolver = resolver; this.listenerManager = listenerManager; this.metaDataProvider = metaDataProvider; this.resolutionStrategy = resolutionStrategy; resolutionListenerBroadcast = listenerManager.createAnonymousBroadcaster(DependencyResolutionListener.class); DefaultDomainObjectSet<Dependency> ownDependencies = new DefaultDomainObjectSet<Dependency>(Dependency.class); ownDependencies.beforeChange(new VetoContainerChangeAction()); dependencies = new DefaultDependencySet(String.format("%s dependencies", getDisplayName()), ownDependencies); inheritedDependencies = new CompositeDomainObjectSet<Dependency>(Dependency.class).addCollection(ownDependencies); allDependencies = new DefaultDependencySet(String.format("%s all dependencies", getDisplayName()), inheritedDependencies); DefaultDomainObjectSet<PublishArtifact> ownArtifacts = new DefaultDomainObjectSet<PublishArtifact>(PublishArtifact.class); ownArtifacts.beforeChange(new VetoContainerChangeAction()); artifacts = new DefaultPublishArtifactSet(String.format("%s artifacts", getDisplayName()), ownArtifacts); inheritedArtifacts = new CompositeDomainObjectSet<PublishArtifact>(PublishArtifact.class, ownArtifacts); allArtifacts = new DefaultPublishArtifactSet(String.format("%s all artifacts", getDisplayName()), inheritedArtifacts); }
Example #2
Source File: AbstractNativeComponentSpec.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public AbstractNativeComponentSpec(ComponentSpecIdentifier id, FunctionalSourceSet mainSourceSet) { this.mainSourceSet = mainSourceSet; sourceSets.addMainSources(mainSourceSet); this.id = id; this.binaries = new DefaultDomainObjectSet<BinarySpec>(NativeBinarySpec.class); this.nativeBinaries = this.binaries.withType(NativeBinarySpec.class); this.inputTypes.add(ObjectFile.class); }
Example #3
Source File: ProjectLibraryBinaryLocator.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public DomainObjectSet<NativeLibraryBinary> getBinaries(NativeLibraryRequirement requirement) { Project project = findProject(requirement); ComponentSpecContainer componentSpecContainer = project.getExtensions().findByType(ComponentSpecContainer.class); if (componentSpecContainer == null) { throw new LibraryResolveException(String.format("Project does not have a libraries container: '%s'", project.getPath())); } DomainObjectSet<NativeBinarySpec> projectBinaries = componentSpecContainer.withType(NativeLibrarySpec.class).getByName(requirement.getLibraryName()).getNativeBinaries(); DomainObjectSet<NativeLibraryBinary> binaries = new DefaultDomainObjectSet<NativeLibraryBinary>(NativeLibraryBinary.class); // TODO:DAZ Convert, don't cast for (NativeBinarySpec nativeBinarySpec : projectBinaries) { binaries.add((NativeLibraryBinary) nativeBinarySpec); } return binaries; }
Example #4
Source File: DefaultJvmLibrarySpec.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public DefaultJvmLibrarySpec(ComponentSpecIdentifier identifier, FunctionalSourceSet mainSourceSet) { this.identifier = identifier; this.mainSourceSet = mainSourceSet; sourceSets.addMainSources(mainSourceSet); this.languageOutputs.add(JvmResources.class); this.languageOutputs.add(JvmByteCode.class); this.binaries = new DefaultDomainObjectSet<BinarySpec>(JvmBinarySpec.class); this.jvmBinaries = this.binaries.withType(JvmBinarySpec.class); }
Example #5
Source File: DefaultConfiguration.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
public DefaultConfiguration(String path, String name, ConfigurationsProvider configurationsProvider, ConfigurationResolver resolver, ListenerManager listenerManager, DependencyMetaDataProvider metaDataProvider, ResolutionStrategyInternal resolutionStrategy) { this.path = path; this.name = name; this.configurationsProvider = configurationsProvider; this.resolver = resolver; this.listenerManager = listenerManager; this.metaDataProvider = metaDataProvider; this.resolutionStrategy = resolutionStrategy; resolutionListenerBroadcast = listenerManager.createAnonymousBroadcaster(DependencyResolutionListener.class); DefaultDomainObjectSet<Dependency> ownDependencies = new DefaultDomainObjectSet<Dependency>(Dependency.class); ownDependencies.beforeChange(new VetoContainerChangeAction()); dependencies = new DefaultDependencySet(String.format("%s dependencies", getDisplayName()), ownDependencies); inheritedDependencies = new CompositeDomainObjectSet<Dependency>(Dependency.class, ownDependencies); allDependencies = new DefaultDependencySet(String.format("%s all dependencies", getDisplayName()), inheritedDependencies); DefaultDomainObjectSet<PublishArtifact> ownArtifacts = new DefaultDomainObjectSet<PublishArtifact>(PublishArtifact.class); ownArtifacts.beforeChange(new VetoContainerChangeAction()); artifacts = new DefaultPublishArtifactSet(String.format("%s artifacts", getDisplayName()), ownArtifacts); inheritedArtifacts = new CompositeDomainObjectSet<PublishArtifact>(PublishArtifact.class, ownArtifacts); allArtifacts = new DefaultPublishArtifactSet(String.format("%s all artifacts", getDisplayName()), inheritedArtifacts); }
Example #6
Source File: DefaultConfiguration.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public DefaultConfiguration(String path, String name, ConfigurationsProvider configurationsProvider, ConfigurationResolver resolver, ListenerManager listenerManager, DependencyMetaDataProvider metaDataProvider, ResolutionStrategyInternal resolutionStrategy) { this.path = path; this.name = name; this.configurationsProvider = configurationsProvider; this.resolver = resolver; this.listenerManager = listenerManager; this.metaDataProvider = metaDataProvider; this.resolutionStrategy = resolutionStrategy; resolutionListenerBroadcast = listenerManager.createAnonymousBroadcaster(DependencyResolutionListener.class); DefaultDomainObjectSet<Dependency> ownDependencies = new DefaultDomainObjectSet<Dependency>(Dependency.class); ownDependencies.beforeChange(new VetoContainerChangeAction()); dependencies = new DefaultDependencySet(String.format("%s dependencies", getDisplayName()), ownDependencies); inheritedDependencies = new CompositeDomainObjectSet<Dependency>(Dependency.class, ownDependencies); allDependencies = new DefaultDependencySet(String.format("%s all dependencies", getDisplayName()), inheritedDependencies); DefaultDomainObjectSet<PublishArtifact> ownArtifacts = new DefaultDomainObjectSet<PublishArtifact>(PublishArtifact.class); ownArtifacts.beforeChange(new VetoContainerChangeAction()); artifacts = new DefaultPublishArtifactSet(String.format("%s artifacts", getDisplayName()), ownArtifacts); inheritedArtifacts = new CompositeDomainObjectSet<PublishArtifact>(PublishArtifact.class, ownArtifacts); allArtifacts = new DefaultPublishArtifactSet(String.format("%s all artifacts", getDisplayName()), inheritedArtifacts); }
Example #7
Source File: ProjectLibraryBinaryLocator.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
public DomainObjectSet<NativeLibraryBinary> getBinaries(NativeLibraryRequirement requirement) { Project project = findProject(requirement); ComponentSpecContainer componentSpecContainer = project.getExtensions().findByType(ComponentSpecContainer.class); if (componentSpecContainer == null) { throw new LibraryResolveException(String.format("Project does not have a libraries container: '%s'", project.getPath())); } DomainObjectSet<NativeBinarySpec> projectBinaries = componentSpecContainer.withType(NativeLibrarySpec.class).getByName(requirement.getLibraryName()).getNativeBinaries(); DomainObjectSet<NativeLibraryBinary> binaries = new DefaultDomainObjectSet<NativeLibraryBinary>(NativeLibraryBinary.class); // TODO:DAZ Convert, don't cast for (NativeBinarySpec nativeBinarySpec : projectBinaries) { binaries.add((NativeLibraryBinary) nativeBinarySpec); } return binaries; }
Example #8
Source File: DefaultJvmLibrarySpec.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
public DefaultJvmLibrarySpec(ComponentSpecIdentifier identifier, FunctionalSourceSet mainSourceSet) { this.identifier = identifier; this.mainSourceSet = mainSourceSet; sourceSets.addMainSources(mainSourceSet); this.languageOutputs.add(JvmResources.class); this.languageOutputs.add(JvmByteCode.class); this.binaries = new DefaultDomainObjectSet<BinarySpec>(JvmBinarySpec.class); this.jvmBinaries = this.binaries.withType(JvmBinarySpec.class); }
Example #9
Source File: DefaultConfiguration.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
public DefaultConfiguration(String path, String name, ConfigurationsProvider configurationsProvider, ConfigurationResolver resolver, ListenerManager listenerManager, DependencyMetaDataProvider metaDataProvider, ResolutionStrategyInternal resolutionStrategy) { this.path = path; this.name = name; this.configurationsProvider = configurationsProvider; this.resolver = resolver; this.listenerManager = listenerManager; this.metaDataProvider = metaDataProvider; this.resolutionStrategy = resolutionStrategy; resolutionListenerBroadcast = listenerManager.createAnonymousBroadcaster(DependencyResolutionListener.class); DefaultDomainObjectSet<Dependency> ownDependencies = new DefaultDomainObjectSet<Dependency>(Dependency.class); ownDependencies.beforeChange(new VetoContainerChangeAction()); dependencies = new DefaultDependencySet(String.format("%s dependencies", getDisplayName()), ownDependencies); inheritedDependencies = new CompositeDomainObjectSet<Dependency>(Dependency.class).addCollection(ownDependencies); allDependencies = new DefaultDependencySet(String.format("%s all dependencies", getDisplayName()), inheritedDependencies); DefaultDomainObjectSet<PublishArtifact> ownArtifacts = new DefaultDomainObjectSet<PublishArtifact>(PublishArtifact.class); ownArtifacts.beforeChange(new VetoContainerChangeAction()); artifacts = new DefaultPublishArtifactSet(String.format("%s artifacts", getDisplayName()), ownArtifacts); inheritedArtifacts = new CompositeDomainObjectSet<PublishArtifact>(PublishArtifact.class, ownArtifacts); allArtifacts = new DefaultPublishArtifactSet(String.format("%s all artifacts", getDisplayName()), inheritedArtifacts); }
Example #10
Source File: AbstractNativeComponentSpec.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
public AbstractNativeComponentSpec(ComponentSpecIdentifier id, FunctionalSourceSet mainSourceSet) { this.mainSourceSet = mainSourceSet; sourceSets.addMainSources(mainSourceSet); this.id = id; this.binaries = new DefaultDomainObjectSet<BinarySpec>(NativeBinarySpec.class); this.nativeBinaries = this.binaries.withType(NativeBinarySpec.class); this.inputTypes.add(ObjectFile.class); }
Example #11
Source File: WrapUtil.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
/** * Wraps the given items in a mutable domain object set. */ public static <T> DomainObjectSet<T> toDomainObjectSet(Class<T> type, T... items) { return new DefaultDomainObjectSet<T>(type, toSet(items)); }
Example #12
Source File: DefaultPrebuiltLibrary.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultPrebuiltLibrary(String name, FileResolver fileResolver) { this.name = name; headers = new DefaultSourceDirectorySet("headers", fileResolver); binaries = new DefaultDomainObjectSet<NativeBinary>(NativeBinary.class); }
Example #13
Source File: AbstractProjectNativeComponent.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public AbstractProjectNativeComponent(NativeProjectComponentIdentifier id) { this.id = id; this.sourceSets = new DefaultDomainObjectSet<LanguageSourceSet>(LanguageSourceSet.class); binaries = new DefaultDomainObjectSet<NativeBinary>(NativeBinary.class); }
Example #14
Source File: WrapUtil.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
/** * Wraps the given items in a mutable domain object set. */ public static <T> DomainObjectSet<T> toDomainObjectSet(Class<T> type, T... items) { return new DefaultDomainObjectSet<T>(type, toSet(items)); }
Example #15
Source File: DefaultPrebuiltLibrary.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultPrebuiltLibrary(String name, FileResolver fileResolver) { this.name = name; headers = new DefaultSourceDirectorySet("headers", fileResolver); binaries = new DefaultDomainObjectSet<NativeLibraryBinary>(NativeLibraryBinary.class); }
Example #16
Source File: WrapUtil.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
/** * Wraps the given items in a mutable domain object set. */ public static <T> DomainObjectSet<T> toDomainObjectSet(Class<T> type, T... items) { return new DefaultDomainObjectSet<T>(type, toSet(items)); }
Example #17
Source File: DefaultPrebuiltLibrary.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultPrebuiltLibrary(String name, FileResolver fileResolver) { this.name = name; headers = new DefaultSourceDirectorySet("headers", fileResolver); binaries = new DefaultDomainObjectSet<NativeBinary>(NativeBinary.class); }
Example #18
Source File: AbstractProjectNativeComponent.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public AbstractProjectNativeComponent(NativeProjectComponentIdentifier id) { this.id = id; this.sourceSets = new DefaultDomainObjectSet<LanguageSourceSet>(LanguageSourceSet.class); binaries = new DefaultDomainObjectSet<NativeBinary>(NativeBinary.class); }
Example #19
Source File: WrapUtil.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
/** * Wraps the given items in a mutable domain object set. */ public static <T> DomainObjectSet<T> toDomainObjectSet(Class<T> type, T... items) { return new DefaultDomainObjectSet<T>(type, toSet(items)); }
Example #20
Source File: DefaultPrebuiltLibrary.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultPrebuiltLibrary(String name, FileResolver fileResolver) { this.name = name; headers = new DefaultSourceDirectorySet("headers", fileResolver); binaries = new DefaultDomainObjectSet<NativeLibraryBinary>(NativeLibraryBinary.class); }
Example #21
Source File: LibraryExtension.java From javaide with GNU General Public License v3.0 | 2 votes |
/** * Returns the list of library variants. Since the collections is built after evaluation, it * should be used with Gradle's <code>all</code> iterator to process future items. */ public DefaultDomainObjectSet<LibraryVariant> getLibraryVariants() { return libraryVariantList; }
Example #22
Source File: AppExtension.java From javaide with GNU General Public License v3.0 | 2 votes |
/** * Returns the list of Application variants. Since the collections is built after evaluation, it * should be used with Gradle's <code>all</code> iterator to process future items. */ public DefaultDomainObjectSet<ApplicationVariant> getApplicationVariants() { return applicationVariantList; }