• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java LanguageSourceSet类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.gradle.language.base.LanguageSourceSet的典型用法代码示例。如果您正苦于以下问题:Java LanguageSourceSet类的具体用法?Java LanguageSourceSet怎么用?Java LanguageSourceSet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

LanguageSourceSet类属于org.gradle.language.base包,在下文中一共展示了LanguageSourceSet类的40个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: attachTestedBinarySourcesToTestBinaries

点赞 3

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
@Finalize
void attachTestedBinarySourcesToTestBinaries(@Each final NativeTestSuiteBinarySpecInternal testSuiteBinary) {
    final BinarySpec testedBinary = testSuiteBinary.getTestedBinary();
    testSuiteBinary.getInputs().withType(DependentSourceSet.class).all(new Action<DependentSourceSet>() {
        @Override
        public void execute(DependentSourceSet testSource) {
            testSource.lib(testedBinary.getInputs());
        }
    });
    testedBinary.getInputs().all(new Action<LanguageSourceSet>() {
        @Override
        public void execute(LanguageSourceSet testedSource) {
            testSuiteBinary.getInputs().add(testedSource);
        }
    });
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:17,
代码来源:NativeBinariesTestPlugin.java

示例2: collectDependencies

点赞 3

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
public static List<DependencySpec> collectDependencies(final BinarySpec binary, @Nullable final SourceComponentSpec owner, final Collection<DependencySpec>... specificDependencies) {
    List<DependencySpec> dependencies = Lists.newArrayList();
    if (specificDependencies!=null) {
        for (Collection<DependencySpec> deps : specificDependencies) {
            dependencies.addAll(deps);
        }
    }
    Collection<LanguageSourceSet> binarySources = binary.getSources().values();
    Iterable<LanguageSourceSet> sourceSets = owner != null ? Iterables.concat(owner.getSources().values(), binarySources) : binarySources;
    for (LanguageSourceSet sourceSet : sourceSets) {
        if (sourceSet instanceof DependentSourceSet) {
            dependencies.addAll(((DependentSourceSet) sourceSet).getDependencies().getDependencies());
        }
    }
    return dependencies;
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:17,
代码来源:DefaultJvmBinarySpec.java

示例3: configurePreCompiledHeaderCompileTasks

点赞 3

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
@Mutate
void configurePreCompiledHeaderCompileTasks(final TaskContainer tasks, BinaryContainer binaries, final LanguageTransformContainer languageTransforms, final ServiceRegistry serviceRegistry) {
    for (final NativeBinarySpecInternal nativeBinarySpec : binaries.withType(NativeBinarySpecInternal.class)) {
        for (final PchEnabledLanguageTransform<?> transform : languageTransforms.withType(PchEnabledLanguageTransform.class)) {
            nativeBinarySpec.getInputs().withType(transform.getSourceSetType(), new Action<LanguageSourceSet>() {
                @Override
                public void execute(final LanguageSourceSet languageSourceSet) {
                    final DependentSourceSet dependentSourceSet = (DependentSourceSet) languageSourceSet;
                    if (dependentSourceSet.getPreCompiledHeader() != null) {
                        nativeBinarySpec.addPreCompiledHeaderFor(dependentSourceSet);
                        final SourceTransformTaskConfig pchTransformTaskConfig = transform.getPchTransformTask();
                        String pchTaskName = pchTransformTaskConfig.getTaskPrefix() + StringUtils.capitalize(nativeBinarySpec.getProjectScopedName()) + StringUtils.capitalize(dependentSourceSet.getName()) + "PreCompiledHeader";
                        Task pchTask = tasks.create(pchTaskName, pchTransformTaskConfig.getTaskType(), new Action<DefaultTask>() {
                            @Override
                            public void execute(DefaultTask task) {
                                pchTransformTaskConfig.configureTask(task, nativeBinarySpec, dependentSourceSet, serviceRegistry);
                            }
                        });
                        nativeBinarySpec.getTasks().add(pchTask);
                    }
                }
            });
        }
    }
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:26,
代码来源:NativeComponentModelPlugin.java

示例4: getTransformTask

点赞 3

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
@Override
public SourceTransformTaskConfig getTransformTask() {
    return new SourceTransformTaskConfig() {
        public String getTaskPrefix() {
            return "process";
        }

        public Class<? extends DefaultTask> getTaskType() {
            return ProcessResources.class;
        }

        public void configureTask(Task task, BinarySpec binary, LanguageSourceSet sourceSet, ServiceRegistry serviceRegistry) {
            ProcessResources resourcesTask = (ProcessResources) task;
            JvmResourceSet resourceSet = (JvmResourceSet) sourceSet;
            resourcesTask.from(resourceSet.getSource());

            // The first directory is the one created by JvmComponentPlugin.configureJvmBinaries()
            // to be used as the default output directory for processed resources
            JvmAssembly assembly = ((WithJvmAssembly) binary).getAssembly();
            resourcesTask.setDestinationDir(first(assembly.getResourceDirectories()));

            assembly.builtBy(resourcesTask);
        }
    };
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:26,
代码来源:JvmResourcesPlugin.java

示例5: renderSourceSetDirectories

点赞 3

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
private void renderSourceSetDirectories(LanguageSourceSet sourceSet, TextReportBuilder builder) {
    Set<File> srcDirs = sourceSet.getSource().getSrcDirs();
    if (srcDirs.isEmpty()) {
        builder.item("No source directories");
    } else {
        for (File file : srcDirs) {
            builder.item("srcDir", file);
        }
        SourceDirectorySet source = sourceSet.getSource();
        Set<String> includes = source.getIncludes();
        if (!includes.isEmpty()) {
            builder.item("includes", includes);
        }
        Set<String> excludes = source.getExcludes();
        if (!excludes.isEmpty()) {
            builder.item("excludes", excludes);
        }
        Set<String> filterIncludes = source.getFilter().getIncludes();
        if (!filterIncludes.isEmpty()) {
            builder.item("limit to", filterIncludes);
        }
    }
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:24,
代码来源:SourceSetRenderer.java

示例6: setDefaultSrcDir

点赞 3

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
/**
 * Set the default directory for each source sets if it is empty.
 */
public void setDefaultSrcDir() {
    all(new Action<FunctionalSourceSet>() {
        @Override
        public void execute(final FunctionalSourceSet functionalSourceSet) {
            functionalSourceSet.all(
                    new Action<LanguageSourceSet>() {
                        @Override
                        public void execute(LanguageSourceSet languageSourceSet) {
                            SourceDirectorySet source = languageSourceSet.getSource();
                            if (source.getSrcDirs().isEmpty()) {
                                source.srcDir("src/" + functionalSourceSet.getName() + "/" + languageSourceSet.getName());
                            }
                        }
                    });
        }
    });
}
 

开发者ID:jskierbi,
项目名称:intellij-ce-playground,
代码行数:21,
代码来源:AndroidComponentModelSourceSet.java

示例7: addDefaultAndroidSourceSet

点赞 3

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
@Mutate
public void addDefaultAndroidSourceSet(
        @Path("android.sources") AndroidComponentModelSourceSet sources) {
    sources.addDefaultSourceSet("resources", AndroidLanguageSourceSet.class);
    sources.addDefaultSourceSet("java", AndroidLanguageSourceSet.class);
    sources.addDefaultSourceSet("manifest", AndroidLanguageSourceSet.class);
    sources.addDefaultSourceSet("res", AndroidLanguageSourceSet.class);
    sources.addDefaultSourceSet("assets", AndroidLanguageSourceSet.class);
    sources.addDefaultSourceSet("aidl", AndroidLanguageSourceSet.class);
    sources.addDefaultSourceSet("renderscript", AndroidLanguageSourceSet.class);
    sources.addDefaultSourceSet("jniLibs", AndroidLanguageSourceSet.class);

    sources.all(new Action<FunctionalSourceSet>() {
        @Override
        public void execute(FunctionalSourceSet functionalSourceSet) {
            LanguageSourceSet manifest = functionalSourceSet.getByName("manifest");
            manifest.getSource().setIncludes(ImmutableList.of("AndroidManifest.xml"));
        }
    });
}
 

开发者ID:jskierbi,
项目名称:intellij-ce-playground,
代码行数:21,
代码来源:BaseComponentModelPlugin.java

示例8: convertSourceFile

点赞 3

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
/**
 * Convert a FunctionalSourceSet to an AndroidSourceFile.
 */
private static void convertSourceFile(
        AndroidSourceFile androidFile,
        FunctionalSourceSet source,
        String sourceName) {
    LanguageSourceSet languageSourceSet = source.findByName(sourceName);
    if (languageSourceSet == null) {
        return;
    }
    SourceDirectorySet dir = languageSourceSet.getSource();
    if (dir == null) {
        return;
    }
    // We use the first file in the file tree until Gradle has a way to specify one source file
    // instead of an entire source set.
    Set<File> files = dir.getAsFileTree().getFiles();
    if (!files.isEmpty()) {
        androidFile.srcFile(Iterables.getOnlyElement(files));
    }
}
 

开发者ID:jskierbi,
项目名称:intellij-ce-playground,
代码行数:23,
代码来源:AndroidConfigAdaptor.java

示例9: convertSourceSet

点赞 3

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
/**
 * Convert a FunctionalSourceSet to an AndroidSourceDirectorySet.
 */
private static void convertSourceSet(
        AndroidSourceDirectorySet androidDir,
        FunctionalSourceSet source,
        String sourceName) {
    LanguageSourceSet languageSourceSet = source.findByName(sourceName);
    if (languageSourceSet == null) {
        return;
    }
    SourceDirectorySet dir = languageSourceSet.getSource();
    if (dir == null) {
        return;
    }
    androidDir.setSrcDirs(dir.getSrcDirs());
    androidDir.include(dir.getIncludes());
    androidDir.exclude(dir.getExcludes());
}
 

开发者ID:jskierbi,
项目名称:intellij-ce-playground,
代码行数:20,
代码来源:AndroidConfigAdaptor.java

示例10: createCompileTasksForBinary

点赞 3

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
public void createCompileTasksForBinary(final TaskContainer tasks, BinarySpec binarySpec) {
    final BinarySpecInternal binary = (BinarySpecInternal) binarySpec;
    if (binary.isLegacyBinary() || !language.applyToBinary(binary)) {
        return;
    }

    final SourceTransformTaskConfig taskConfig = language.getTransformTask();
    binary.getSource().withType(language.getSourceSetType(), new Action<LanguageSourceSet>() {
        public void execute(LanguageSourceSet languageSourceSet) {
            LanguageSourceSetInternal sourceSet = (LanguageSourceSetInternal) languageSourceSet;
            if (sourceSet.getMayHaveSources()) {
                String taskName = binary.getNamingScheme().getTaskName(taskConfig.getTaskPrefix(), sourceSet.getFullName());
                Task task = tasks.create(taskName, taskConfig.getTaskType());

                taskConfig.configureTask(task, binary, sourceSet);

                task.dependsOn(sourceSet);
                binary.getTasks().add(task);
            }
        }
    });
}
 

开发者ID:Pushjet,
项目名称:Pushjet-Android,
代码行数:23,
代码来源:CreateSourceTransformTask.java

示例11: AbstractNativeBinarySpec

点赞 3

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
protected AbstractNativeBinarySpec(NativeComponentSpec owner, Flavor flavor, NativeToolChain toolChain, PlatformToolProvider toolProvider, NativePlatform targetPlatform,
                                   BuildType buildType, BinaryNamingScheme namingScheme, NativeDependencyResolver resolver) {
    this.component = owner;
    this.toolProvider = toolProvider;
    this.namingScheme = namingScheme;
    this.flavor = flavor;
    this.toolChain = toolChain;
    this.targetPlatform = targetPlatform;
    this.buildType = buildType;
    this.buildable = true;
    this.resolver = resolver;
    component.getSource().all(new Action<LanguageSourceSet>() {
        public void execute(LanguageSourceSet sourceSet) {
            sourceSets.add(sourceSet);
        }
    });
}
 

开发者ID:Pushjet,
项目名称:Pushjet-Android,
代码行数:18,
代码来源:AbstractNativeBinarySpec.java

示例12: getTransformTask

点赞 3

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
public SourceTransformTaskConfig getTransformTask() {
    return new SourceTransformTaskConfig() {
        public String getTaskPrefix() {
            return "process";
        }

        public Class<? extends DefaultTask> getTaskType() {
            return ProcessResources.class;
        }

        public void configureTask(Task task, BinarySpec binary, LanguageSourceSet sourceSet) {
            ProcessResources resourcesTask = (ProcessResources) task;
            JvmResourceSet resourceSet = (JvmResourceSet) sourceSet;
            JvmBinarySpec jvmBinary = (JvmBinarySpec) binary;
            resourcesTask.from(resourceSet.getSource());
            resourcesTask.setDestinationDir(jvmBinary.getResourcesDir());
            jvmBinary.getTasks().getJar().dependsOn(resourcesTask);
        }
    };
}
 

开发者ID:Pushjet,
项目名称:Pushjet-Android,
代码行数:21,
代码来源:JvmResourcesPlugin.java

示例13: execute

点赞 3

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
public void execute(ProjectInternal project) {
    ProjectSourceSet projectSourceSet = project.getExtensions().getByType(ProjectSourceSet.class);
    for (FunctionalSourceSet functionalSourceSet : projectSourceSet) {
        for (LanguageSourceSet languageSourceSet : functionalSourceSet) {
            // Only apply default locations when none explicitly configured
            if (languageSourceSet.getSource().getSrcDirs().isEmpty()) {
                languageSourceSet.getSource().srcDir(String.format("src/%s/%s", functionalSourceSet.getName(), languageSourceSet.getName()));
            }
        }
        for (HeaderExportingSourceSet headerSourceSet : functionalSourceSet.withType(HeaderExportingSourceSet.class)) {
            // Only apply default locations when none explicitly configured
            if (headerSourceSet.getExportedHeaders().getSrcDirs().isEmpty()) {
                headerSourceSet.getExportedHeaders().srcDir(String.format("src/%s/headers", functionalSourceSet.getName()));
            }

            headerSourceSet.getImplicitHeaders().setSrcDirs(headerSourceSet.getSource().getSrcDirs());
            headerSourceSet.getImplicitHeaders().include("**/*.h");
        }
    }
}
 

开发者ID:Pushjet,
项目名称:Pushjet-Android,
代码行数:21,
代码来源:ApplySourceSetConventions.java

示例14: AbstractProjectNativeBinary

点赞 3

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
protected AbstractProjectNativeBinary(ProjectNativeComponent owner, Flavor flavor, ToolChainInternal toolChain, Platform targetPlatform, BuildType buildType,
                                      BinaryNamingScheme namingScheme, NativeDependencyResolver resolver) {
    this.component = owner;
    this.namingScheme = namingScheme;
    this.flavor = flavor;
    this.toolChain = toolChain;
    this.targetPlatform = targetPlatform;
    this.buildType = buildType;
    this.buildable = true;
    this.resolver = resolver;
    owner.getSource().all(new Action<LanguageSourceSet>() {
        public void execute(LanguageSourceSet sourceSet) {
            source.add(sourceSet);
        }
    });
}
 

开发者ID:Pushjet,
项目名称:Pushjet-Android,
代码行数:17,
代码来源:AbstractProjectNativeBinary.java

示例15: apply

点赞 3

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
public void apply(final CUnitTestSuite cUnitTestSuite, final BinaryContainer binaries) {
    cUnitTestSuite.getTestedComponent().getBinaries().withType(ProjectNativeBinaryInternal.class).all(new Action<ProjectNativeBinaryInternal>() {
        public void execute(ProjectNativeBinaryInternal testedBinary) {
            final ProjectNativeBinary cunitExe = createTestBinary(cUnitTestSuite, testedBinary, project);
            ((ExtensionAware) cunitExe).getExtensions().create("cCompiler", DefaultPreprocessingTool.class);

            cUnitTestSuite.getBinaries().add(cunitExe);
            binaries.add(cunitExe);

            testedBinary.getSource().all(new Action<LanguageSourceSet>() {
                public void execute(LanguageSourceSet languageSourceSet) {
                    cunitExe.source(languageSourceSet);
                }
            });
        }
    });
}
 

开发者ID:Pushjet,
项目名称:Pushjet-Android,
代码行数:18,
代码来源:CreateCUnitBinaries.java

示例16: SourceSetDependencyResolvingClasspath

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
public SourceSetDependencyResolvingClasspath(
    BinarySpecInternal binarySpec,
    LanguageSourceSet sourceSet,
    Iterable<DependencySpec> dependencies,
    ArtifactDependencyResolver dependencyResolver,
    VariantsMetaData binaryVariants,
    List<ResolutionAwareRepository> remoteRepositories, AttributesSchema attributesSchema) {
    super(binarySpec,
        "source set '" + sourceSet.getDisplayName() + "'",
        dependencyResolver,
        remoteRepositories,
        new JvmLibraryResolveContext(binarySpec.getId(), binaryVariants, dependencies, UsageKind.API, sourceSet.getDisplayName()), attributesSchema);
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:14,
代码来源:SourceSetDependencyResolvingClasspath.java

示例17: getSourcesToCompile

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
private Set<LanguageSourceSetInternal> getSourcesToCompile(BinarySpecInternal binary) {
    LinkedHashSet<LanguageSourceSetInternal> sourceSets = Sets.newLinkedHashSet();
    for (LanguageSourceSet languageSourceSet : binary.getInputs()) {
        LanguageSourceSetInternal languageSourceSetInternal = (LanguageSourceSetInternal) languageSourceSet;
        if (languageSourceSetInternal.getMayHaveSources()) {
            sourceSets.add(languageSourceSetInternal);
        }
    }
    return sourceSets;
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:11,
代码来源:BinarySourceTransformations.java

示例18: create

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
public static <T extends LanguageSourceSet> T create(Class<? extends LanguageSourceSet> publicType, Class<T> implementationType, ComponentSpecIdentifier componentId, SourceDirectorySetFactory sourceDirectorySetFactory) {
    NEXT_SOURCE_SET_INFO.set(new SourceSetInfo(componentId, publicType, sourceDirectorySetFactory));
    try {
        try {
            return DirectInstantiator.INSTANCE.newInstance(implementationType);
        } catch (ObjectInstantiationException e) {
            throw new ModelInstantiationException(String.format("Could not create LanguageSourceSet of type %s", publicType.getSimpleName()), e.getCause());
        }
    } finally {
        NEXT_SOURCE_SET_INFO.set(null);
    }
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:13,
代码来源:BaseLanguageSourceSet.java

示例19: applyFallbackSourceConventions

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
@Finalize
void applyFallbackSourceConventions(@Each LanguageSourceSet languageSourceSet, ProjectIdentifier projectIdentifier) {
    // Only apply default locations when none explicitly configured
    if (languageSourceSet.getSource().getSourceDirectories().isEmpty()) {
        File baseDir = projectIdentifier.getProjectDir();
        String defaultSourceDir = Joiner.on(File.separator).skipNulls().join(baseDir.getPath(), "src", emptyToNull(languageSourceSet.getParentName()), emptyToNull(languageSourceSet.getName()));
        languageSourceSet.getSource().srcDir(defaultSourceDir);
    }
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:10,
代码来源:ComponentModelBasePlugin.java

示例20: addComponentSourcesSetsToProjectSourceSet

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
@Defaults
// TODO:LPTR We should collect all source sets in the project source set, however this messes up ComponentReportRenderer
void addComponentSourcesSetsToProjectSourceSet(@Each SourceComponentSpec component, final ProjectSourceSet projectSourceSet) {
    component.getSources().afterEach(new Action<LanguageSourceSet>() {
        @Override
        public void execute(LanguageSourceSet languageSourceSet) {
            projectSourceSet.add(languageSourceSet);
        }
    });
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:11,
代码来源:ComponentModelBasePlugin.java

示例21: getIncludePaths

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
public List<File> getIncludePaths() {
    Set<File> includes = new LinkedHashSet<File>();

    for (LanguageSourceSet sourceSet : binary.getInputs()) {
        if (sourceSet instanceof HeaderExportingSourceSet) {
            includes.addAll(((HeaderExportingSourceSet) sourceSet).getExportedHeaders().getSrcDirs());
        }
    }

    for (NativeDependencySet lib : binary.getLibs()) {
        includes.addAll(lib.getIncludeRoots().getFiles());
    }

    return new ArrayList<File>(includes);
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:16,
代码来源:VisualStudioProjectConfiguration.java

示例22: getSourceFiles

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
public List<File> getSourceFiles() {
    Set<File> allSource = new LinkedHashSet<File>();
    allSource.addAll(additionalFiles);

    for(LanguageSourceSet sourceSet : sources) {
        if (!(sourceSet instanceof WindowsResourceSet)) {
            allSource.addAll(sourceSet.getSource().getFiles());
        }
    }

    return new ArrayList<File>(allSource);
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:13,
代码来源:DefaultVisualStudioProject.java

示例23: getResourceFiles

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
public List<File> getResourceFiles() {
    Set<File> allResources = new LinkedHashSet<File>();

    for(LanguageSourceSet sourceSet : sources) {
        if (sourceSet instanceof WindowsResourceSet) {
            allResources.addAll(sourceSet.getSource().getFiles());
        }
    }
    return new ArrayList<File>(allResources);
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:11,
代码来源:DefaultVisualStudioProject.java

示例24: getHeaderFiles

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
public List<File> getHeaderFiles() {
    Set<File> allHeaders = new LinkedHashSet<File>();

    for(LanguageSourceSet sourceSet : sources) {
        if (sourceSet instanceof HeaderExportingSourceSet) {
            HeaderExportingSourceSet exportingSourceSet = (HeaderExportingSourceSet) sourceSet;
            allHeaders.addAll(exportingSourceSet.getExportedHeaders().getFiles());
            allHeaders.addAll(exportingSourceSet.getImplicitHeaders().getFiles());
        }
    }

    return new ArrayList<File>(allHeaders);
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:14,
代码来源:DefaultVisualStudioProject.java

示例25: resolve

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
@Override
public void resolve(NativeBinaryResolveResult nativeBinaryResolveResult) {
    for (NativeBinaryRequirementResolveResult resolution : nativeBinaryResolveResult.getPendingResolutions()) {
        if (resolution.getInput() instanceof LanguageSourceSet) {
            LanguageSourceSet input = (LanguageSourceSet) resolution.getInput();
            resolution.setNativeDependencySet(createNativeDependencySet(input));
        }
    }
    delegate.resolve(nativeBinaryResolveResult);
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:11,
代码来源:SourceSetNativeDependencyResolver.java

示例26: hasExportedSymbols

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
private boolean hasExportedSymbols() {
    for (LanguageSourceSet languageSourceSet : getInputs()) {
        if (!(languageSourceSet instanceof NativeResourceSet)) {
            if (!languageSourceSet.getSource().isEmpty()) {
                return true;
            }
        }
    }
    return false;
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:11,
代码来源:DefaultSharedLibraryBinarySpec.java

示例27: hasSources

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
protected boolean hasSources() {
    for (LanguageSourceSet sourceSet : getInputs()) {
        if (!sourceSet.getSource().isEmpty()) {
            return true;
        }
        if (sourceSet.hasBuildDependencies()) {
            return true;
        }
    }
    return false;
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:12,
代码来源:AbstractNativeLibraryBinarySpec.java

示例28: renderOwnedSourceSets

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
protected void renderOwnedSourceSets(T binary, TextReportBuilder builder) {
    if (((BinarySpecInternal) binary).isLegacyBinary()) {
        return;
    }
    ModelMap<LanguageSourceSet> sources = binary.getSources();
    if (!sources.isEmpty()) {
        SourceSetRenderer sourceSetRenderer = new SourceSetRenderer();
        builder.collection("source sets", sources.values(), sourceSetRenderer, "source sets");
    }
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:11,
代码来源:AbstractBinaryRenderer.java

示例29: renderSourceSetDependencies

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
private void renderSourceSetDependencies(LanguageSourceSet sourceSet, TextReportBuilder builder) {
    if (sourceSet instanceof DependentSourceSet) {
        DependencySpecContainer dependencies = ((DependentSourceSet) sourceSet).getDependencies();
        if (!dependencies.isEmpty()) {
            builder.collection("dependencies", dependencies.getDependencies(), new ReportRenderer<DependencySpec, TextReportBuilder>() {
                @Override
                public void render(DependencySpec model, TextReportBuilder output) throws IOException {
                    if (model instanceof ProjectDependencySpec) {
                        output.item(model.getDisplayName());
                    }
                }
            }, "dependencies");
        }
    }
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:16,
代码来源:SourceSetRenderer.java

示例30: configureTask

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
@Override
public void configureTask(Task task, BinarySpec binary, LanguageSourceSet sourceSet, ServiceRegistry serviceRegistry) {
    final PlatformJavaCompile compile = (PlatformJavaCompile) task;
    JavaSourceSet javaSourceSet = (JavaSourceSet) sourceSet;
    JvmAssembly assembly = ((WithJvmAssembly) binary).getAssembly();
    assembly.builtBy(compile);

    compile.setDescription("Compiles " + javaSourceSet + ".");
    compile.setDestinationDir(conventionalCompilationOutputDirFor(assembly));
    DeprecationLogger.whileDisabled(new Runnable() {
        @Override
        @SuppressWarnings("deprecation")
        public void run() {
            compile.setDependencyCacheDir(new File(compile.getProject().getBuildDir(), "jvm-dep-cache"));
        }
    });
    compile.dependsOn(javaSourceSet);
    compile.setSource(javaSourceSet.getSource());

    JavaPlatform targetPlatform = assembly.getTargetPlatform();
    String targetCompatibility = targetPlatform.getTargetCompatibility().toString();
    compile.setPlatform(targetPlatform);
    compile.setToolChain(assembly.getToolChain());
    compile.setTargetCompatibility(targetCompatibility);
    compile.setSourceCompatibility(targetCompatibility);

    SourceSetDependencyResolvingClasspath classpath = classpathFor(binary, javaSourceSet, serviceRegistry, schemaStore);
    compile.setClasspath(classpath);
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:30,
代码来源:JavaLanguagePlugin.java

示例31: addSourceSetSpecificDependencies

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
private static void addSourceSetSpecificDependencies(List<DependencySpec> dependencies, ModelMap<LanguageSourceSet> sources) {
    for (LanguageSourceSet sourceSet : sources) {
        if (sourceSet instanceof DependentSourceSet) {
            dependencies.addAll(((DependentSourceSet) sourceSet).getDependencies().getDependencies());
        }
    }
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:8,
代码来源:JvmTestSuiteBasePlugin.java

示例32: addGeneratedScala

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
@Override
public void addGeneratedScala(LanguageSourceSet input, SourceDirectorySetFactory sourceDirectorySetFactory) {
    String lssName = input.getName() + "ScalaSources";
    // TODO: To get rid of this, we need a `FunctionalSourceSet` instance here, and that's surprisingly difficult to get.
    ScalaLanguageSourceSet generatedScalaSources = BaseLanguageSourceSet.create(ScalaLanguageSourceSet.class, DefaultScalaLanguageSourceSet.class, getIdentifier().child(lssName), sourceDirectorySetFactory);
    generatedScalaSources.builtBy();
    generatedScala.put(input, generatedScalaSources);
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:9,
代码来源:DefaultPlayApplicationBinarySpec.java

示例33: addGeneratedJavaScript

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
@Override
public void addGeneratedJavaScript(LanguageSourceSet input, SourceDirectorySetFactory sourceDirectorySetFactory) {
    String lssName = input.getName() + "JavaScript";
    JavaScriptSourceSet javaScript = BaseLanguageSourceSet.create(JavaScriptSourceSet.class, DefaultJavaScriptSourceSet.class, getIdentifier().child(lssName), sourceDirectorySetFactory);
    javaScript.builtBy();
    generatedJavaScript.put(input, javaScript);
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:8,
代码来源:DefaultPlayApplicationBinarySpec.java

示例34: getTransformTask

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
@Override
public SourceTransformTaskConfig getTransformTask() {
    return new SourceTransformTaskConfig() {
        public String getTaskPrefix() {
            return "minify";
        }

        public Class<? extends DefaultTask> getTaskType() {
            return JavaScriptMinify.class;
        }

        public void configureTask(Task task, BinarySpec binarySpec, LanguageSourceSet sourceSet, ServiceRegistry serviceRegistry) {
            PlayApplicationBinarySpecInternal binary = (PlayApplicationBinarySpecInternal) binarySpec;
            JavaScriptSourceSet javaScriptSourceSet = (JavaScriptSourceSet) sourceSet;
            JavaScriptMinify javaScriptMinify = (JavaScriptMinify) task;

            javaScriptMinify.setDescription("Minifies javascript for the " + javaScriptSourceSet.getDisplayName() + ".");

            File generatedSourceDir = binary.getNamingScheme().getOutputDirectory(task.getProject().getBuildDir(), "src");
            File outputDirectory = new File(generatedSourceDir, javaScriptMinify.getName());
            javaScriptMinify.setDestinationDir(outputDirectory);

            javaScriptMinify.setSource(javaScriptSourceSet.getSource());
            javaScriptMinify.setPlayPlatform(binary.getTargetPlatform());
            javaScriptMinify.dependsOn(javaScriptSourceSet);
            binary.getAssets().addAssetDir(outputDirectory);

            binary.getAssets().builtBy(javaScriptMinify);
        }
    };
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:32,
代码来源:PlayJavaScriptPlugin.java

示例35: getTransformTask

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
@Override
public SourceTransformTaskConfig getTransformTask() {
    return new SourceTransformTaskConfig() {
        public String getTaskPrefix() {
            return "compile";
        }

        public Class<? extends DefaultTask> getTaskType() {
            return PlayCoffeeScriptCompile.class;
        }

        public void configureTask(Task task, BinarySpec binarySpec, LanguageSourceSet sourceSet, ServiceRegistry serviceRegistry) {
            PlayApplicationBinarySpecInternal binary = (PlayApplicationBinarySpecInternal) binarySpec;
            CoffeeScriptSourceSet coffeeScriptSourceSet = (CoffeeScriptSourceSet) sourceSet;
            PlayCoffeeScriptCompile coffeeScriptCompile = (PlayCoffeeScriptCompile) task;
            JavaScriptSourceSet javaScriptSourceSet = binary.getGeneratedJavaScript().get(coffeeScriptSourceSet);

            coffeeScriptCompile.setDescription("Compiles coffeescript for the " + coffeeScriptSourceSet.getDisplayName() + ".");

            File generatedSourceDir = binary.getNamingScheme().getOutputDirectory(task.getProject().getBuildDir(), "src");
            File outputDirectory = new File(generatedSourceDir, javaScriptSourceSet.getName());
            coffeeScriptCompile.setDestinationDir(outputDirectory);
            coffeeScriptCompile.setSource(coffeeScriptSourceSet.getSource());

            javaScriptSourceSet.getSource().srcDir(outputDirectory);
            javaScriptSourceSet.builtBy(coffeeScriptCompile);
        }
    };
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:30,
代码来源:PlayCoffeeScriptPlugin.java

示例36: createGeneratedScalaSourceSets

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
@Mutate
void createGeneratedScalaSourceSets(@Path("binaries") ModelMap<PlayApplicationBinarySpecInternal> binaries, final SourceDirectorySetFactory sourceDirectorySetFactory) {
    binaries.all(new Action<PlayApplicationBinarySpecInternal>() {
        @Override
        public void execute(PlayApplicationBinarySpecInternal playApplicationBinarySpec) {
            for (LanguageSourceSet languageSourceSet : playApplicationBinarySpec.getInputs().withType(RoutesSourceSet.class)) {
                playApplicationBinarySpec.addGeneratedScala(languageSourceSet, sourceDirectorySetFactory);
            }
        }
    });
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:12,
代码来源:PlayRoutesPlugin.java

示例37: getTransformTask

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
@Override
public SourceTransformTaskConfig getTransformTask() {
    return new SourceTransformTaskConfig() {
        public String getTaskPrefix() {
            return "compile";
        }

        public Class<? extends DefaultTask> getTaskType() {
            return RoutesCompile.class;
        }

        public void configureTask(Task task, BinarySpec binarySpec, LanguageSourceSet sourceSet, ServiceRegistry serviceRegistry) {
            PlayApplicationBinarySpecInternal binary = (PlayApplicationBinarySpecInternal) binarySpec;
            RoutesSourceSet routesSourceSet = (RoutesSourceSet) sourceSet;
            RoutesCompile routesCompile = (RoutesCompile) task;
            ScalaLanguageSourceSet routesScalaSources = binary.getGeneratedScala().get(routesSourceSet);
            File generatedSourceDir = binary.getNamingScheme().getOutputDirectory(task.getProject().getBuildDir(), "src");
            File routesCompileOutputDirectory = new File(generatedSourceDir, routesScalaSources.getName());

            routesCompile.setDescription("Generates routes for the '" + routesSourceSet.getName() + "' source set.");
            routesCompile.setPlatform(binary.getTargetPlatform());
            routesCompile.setAdditionalImports(new ArrayList<String>());
            routesCompile.setSource(routesSourceSet.getSource());
            routesCompile.setOutputDirectory(routesCompileOutputDirectory);
            routesCompile.setInjectedRoutesGenerator(binary.getApplication().getInjectedRoutesGenerator());

            routesScalaSources.getSource().srcDir(routesCompileOutputDirectory);
            routesScalaSources.builtBy(routesCompile);
        }
    };
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:32,
代码来源:PlayRoutesPlugin.java

示例38: createGeneratedScalaSourceSets

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
@Mutate
void createGeneratedScalaSourceSets(@Path("binaries") ModelMap<PlayApplicationBinarySpecInternal> binaries, final SourceDirectorySetFactory sourceDirectorySetFactory) {
    binaries.all(new Action<PlayApplicationBinarySpecInternal>() {
        @Override
        public void execute(PlayApplicationBinarySpecInternal playApplicationBinarySpec) {
            for (LanguageSourceSet languageSourceSet : playApplicationBinarySpec.getInputs().withType(TwirlSourceSet.class)) {
                playApplicationBinarySpec.addGeneratedScala(languageSourceSet, sourceDirectorySetFactory);
            }
        }
    });
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:12,
代码来源:PlayTwirlPlugin.java

示例39: getTransformTask

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
@Override
public SourceTransformTaskConfig getTransformTask() {
    return new SourceTransformTaskConfig() {
        public String getTaskPrefix() {
            return "compile";
        }

        public Class<? extends DefaultTask> getTaskType() {
            return TwirlCompile.class;
        }

        public void configureTask(Task task, BinarySpec binarySpec, LanguageSourceSet sourceSet, ServiceRegistry serviceRegistry) {
            PlayApplicationBinarySpecInternal binary = (PlayApplicationBinarySpecInternal) binarySpec;
            TwirlSourceSet twirlSourceSet = (TwirlSourceSet) sourceSet;
            TwirlCompile twirlCompile = (TwirlCompile) task;
            ScalaLanguageSourceSet twirlScalaSources = binary.getGeneratedScala().get(twirlSourceSet);

            File generatedSourceDir = binary.getNamingScheme().getOutputDirectory(task.getProject().getBuildDir(), "src");
            File twirlCompileOutputDirectory = new File(generatedSourceDir, twirlScalaSources.getName());

            twirlCompile.setDescription("Compiles twirl templates for the '" + twirlSourceSet.getName() + "' source set.");
            twirlCompile.setPlatform(binary.getTargetPlatform());
            twirlCompile.setSource(twirlSourceSet.getSource());
            twirlCompile.setOutputDirectory(twirlCompileOutputDirectory);
            twirlCompile.setDefaultImports(twirlSourceSet.getDefaultImports());

            twirlScalaSources.getSource().srcDir(twirlCompileOutputDirectory);
            twirlScalaSources.builtBy(twirlCompile);
        }
    };
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:32,
代码来源:PlayTwirlPlugin.java

示例40: registerLanguage

点赞 2

import org.gradle.language.base.LanguageSourceSet; //导入依赖的package包/类
public <T extends LanguageSourceSet> void registerLanguage(final LanguageRegistration<T> languageRegistration) {
    // Hardcoding registered language sets and default source sets for now.
    all(new Action<FunctionalSourceSet>() {
        @Override
        public void execute(final FunctionalSourceSet functionalSourceSet) {
            functionalSourceSet.registerFactory(
                    languageRegistration.getSourceSetType(),
                    languageRegistration.getSourceSetFactory(functionalSourceSet.getName()));
        }
    });
}
 

开发者ID:jskierbi,
项目名称:intellij-ce-playground,
代码行数:12,
代码来源:AndroidComponentModelSourceSet.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)