Java Code Examples for org.gradle.api.tasks.Sync#from()

The following examples show how to use org.gradle.api.tasks.Sync#from() . 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: ProcessJavaResConfigAction.java    From javaide with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void execute(@NonNull Sync processResources) {
    scope.getVariantData().processJavaResourcesTask = processResources;

    // set the input
    processResources.from(((AndroidSourceSet) scope.getVariantConfiguration().getDefaultSourceSet()).getResources().getSourceFiles());
    processResources.from(((AndroidSourceSet) scope.getVariantConfiguration().getBuildTypeSourceSet()).getResources().getSourceFiles());
    if (scope.getVariantConfiguration().hasFlavors()) {
        for (SourceProvider flavorSourceSet : scope.getVariantConfiguration().getFlavorSourceProviders()) {
            processResources.from(((AndroidSourceSet) flavorSourceSet).getResources().getSourceFiles());
        }

    }
    processResources.setDestinationDir(new File(scope.getSourceFoldersJavaResDestinationDir(), "src"));
}
 
Example 2
Source File: PackageTPatchConfigAction.java    From atlas with Apache License 2.0 4 votes vote down vote up
@Override
public void execute(@NonNull Sync packageRenderscript) {
    packageRenderscript.from(getAppVariantOutputContext().getApkOutputFile(true));
    packageRenderscript.from(((AppVariantContext)variantContext).getAwbApkFiles());
}