Java Code Examples for org.gradle.api.file.SourceDirectorySet#srcDir()

The following examples show how to use org.gradle.api.file.SourceDirectorySet#srcDir() . 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: Web3jPlugin.java    From web3j-gradle-plugin with Apache License 2.0 6 votes vote down vote up
private SourceDirectorySet buildSourceDirectorySet(final SourceSet sourceSet) {

        final String displayName = capitalize((CharSequence) sourceSet.getName()) + " Solidity ABI";

        final SourceDirectorySet directorySet =
                new DefaultSourceDirectorySet(
                        sourceSet.getName(),
                        displayName,
                        new IdentityFileResolver(),
                        new DefaultDirectoryFileTreeFactory());

        directorySet.srcDir(buildOutputDir(sourceSet));
        directorySet.include("**/*.abi");

        return directorySet;
    }
 
Example 2
Source File: PlayApplicationPlugin.java    From playframework with Apache License 2.0 6 votes vote down vote up
private void configureJavaAndScalaSourceSet(Project project) {
    SourceSet mainSourceSet = PlayPluginHelper.getMainJavaSourceSet(project);
    SourceDirectorySet mainResourcesDirectorySet = mainSourceSet.getResources();
    mainResourcesDirectorySet.setSrcDirs(Arrays.asList("conf"));

    SourceDirectorySet mainScalaSourceDirectorySet = PlayPluginHelper.getMainScalaSourceDirectorySet(project);
    mainScalaSourceDirectorySet.setSrcDirs(Arrays.asList("app"));
    mainScalaSourceDirectorySet.include("**/*.scala", "**/*.java");

    mainScalaSourceDirectorySet.srcDir(getTwirlCompileTask(project).flatMap(task -> task.getOutputDirectory()));
    mainScalaSourceDirectorySet.srcDir(getRoutesCompileTask(project).flatMap(task -> task.getOutputDirectory()));

    SourceDirectorySet testScalaSourceDirectorySet = PlayPluginHelper.getTestScalaSourceDirectorySet(project);
    testScalaSourceDirectorySet.setSrcDirs(Arrays.asList("test"));
    testScalaSourceDirectorySet.include("**/*.scala", "**/*.java");
}
 
Example 3
Source File: ConfigureGeneratedSourceSets.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private void maybeSetSourceDir(SourceDirectorySet sourceSet, Task task, String propertyName) {
    // TODO:DAZ Handle multiple output directories
    Object value = task.property(propertyName);
    if (value != null) {
        sourceSet.srcDir(value);
    }
}
 
Example 4
Source File: ConfigureGeneratedSourceSets.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private void maybeSetSourceDir(SourceDirectorySet sourceSet, Task task, String propertyName) {
    // TODO:DAZ Handle multiple output directories
    Object value = task.property(propertyName);
    if (value != null) {
        sourceSet.srcDir(value);
    }
}
 
Example 5
Source File: NativeComponentModelPlugin.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
private void maybeSetSourceDir(SourceDirectorySet sourceSet, Task task, String propertyName) {
    Object value = task.property(propertyName);
    if (value != null) {
        sourceSet.srcDir(value);
    }
}
 
Example 6
Source File: NativeComponentModelPlugin.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
private void maybeSetSourceDir(SourceDirectorySet sourceSet, Task task, String propertyName) {
    Object value = task.property(propertyName);
    if (value != null) {
        sourceSet.srcDir(value);
    }
}