Java Code Examples for org.gradle.api.tasks.compile.AbstractCompile#setDescription()

The following examples show how to use org.gradle.api.tasks.compile.AbstractCompile#setDescription() . 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: JavaBasePlugin.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 7 votes vote down vote up
public void configureForSourceSet(final SourceSet sourceSet, AbstractCompile compile) {
    ConventionMapping conventionMapping;
    compile.setDescription(String.format("Compiles the %s.", sourceSet.getJava()));
    conventionMapping = compile.getConventionMapping();
    compile.setSource(sourceSet.getJava());
    conventionMapping.map("classpath", new Callable<Object>() {
        public Object call() throws Exception {
            return sourceSet.getCompileClasspath();
        }
    });
    conventionMapping.map("destinationDir", new Callable<Object>() {
        public Object call() throws Exception {
            return sourceSet.getOutput().getClassesDir();
        }
    });
}
 
Example 2
Source File: LegacyJavaComponentPlugin.java    From pushfish-android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
/**
 * Preconfigures the specified compile task based on the specified source set and class directory binary.
 *
 * @param compile the compile task to be preconfigured
 * @param sourceSet the source set for the compile task
 * @param binary the binary for the compile task
 */
public void configureCompileTask(AbstractCompile compile, final JavaSourceSet sourceSet, final ClassDirectoryBinarySpec binary) {
    compile.setDescription(String.format("Compiles %s.", sourceSet));
    compile.setSource(sourceSet.getSource());
    compile.dependsOn(sourceSet);
    ConventionMapping conventionMapping = compile.getConventionMapping();
    conventionMapping.map("classpath", new Callable<Object>() {
        public Object call() throws Exception {
            return sourceSet.getCompileClasspath().getFiles();
        }
    });
    conventionMapping.map("destinationDir", new Callable<Object>() {
        public Object call() throws Exception {
            return binary.getClassesDir();
        }
    });
}
 
Example 3
Source File: JavaBasePlugin.java    From pushfish-android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public void configureForSourceSet(final SourceSet sourceSet, AbstractCompile compile) {
    ConventionMapping conventionMapping;
    compile.setDescription(String.format("Compiles the %s.", sourceSet.getJava()));
    conventionMapping = compile.getConventionMapping();
    compile.setSource(sourceSet.getJava());
    conventionMapping.map("classpath", new Callable<Object>() {
        public Object call() throws Exception {
            return sourceSet.getCompileClasspath();
        }
    });
    conventionMapping.map("destinationDir", new Callable<Object>() {
        public Object call() throws Exception {
            return sourceSet.getOutput().getClassesDir();
        }
    });
}
 
Example 4
Source File: JavaLanguagePlugin.java    From pushfish-android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
/**
 * Preconfigures the specified compile task based on the specified source set and class directory binary.
 *
 * @param compile the compile task to be preconfigured
 * @param sourceSet the source set for the compile task
 * @param binary the binary for the compile task
 */
public void configureCompileTask(AbstractCompile compile, final JavaSourceSet sourceSet, final ClassDirectoryBinary binary) {
    compile.setDescription(String.format("Compiles %s.", sourceSet));
    compile.setSource(sourceSet.getSource());
    compile.dependsOn(sourceSet);
    ConventionMapping conventionMapping = compile.getConventionMapping();
    conventionMapping.map("classpath", new Callable<Object>() {
        public Object call() throws Exception {
            return sourceSet.getCompileClasspath().getFiles();
        }
    });
    conventionMapping.map("destinationDir", new Callable<Object>() {
        public Object call() throws Exception {
            return binary.getClassesDir();
        }
    });
}
 
Example 5
Source File: JavaBasePlugin.java    From pushfish-android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public void configureForSourceSet(final SourceSet sourceSet, AbstractCompile compile) {
    ConventionMapping conventionMapping;
    compile.setDescription(String.format("Compiles the %s.", sourceSet.getJava()));
    conventionMapping = compile.getConventionMapping();
    compile.setSource(sourceSet.getJava());
    conventionMapping.map("classpath", new Callable<Object>() {
        public Object call() throws Exception {
            return sourceSet.getCompileClasspath();
        }
    });
    conventionMapping.map("destinationDir", new Callable<Object>() {
        public Object call() throws Exception {
            return sourceSet.getOutput().getClassesDir();
        }
    });
}
 
Example 6
Source File: JavaBasePlugin.java    From javaide with GNU General Public License v3.0 6 votes vote down vote up
public void configureForSourceSet(final SourceSet sourceSet, AbstractCompile compile) {
    ConventionMapping conventionMapping;
    compile.setDescription("Compiles the " + sourceSet.getJava() + ".");
    conventionMapping = compile.getConventionMapping();
    compile.setSource(sourceSet.getJava());
    conventionMapping.map("classpath", new Callable<Object>() {
        public Object call() throws Exception {
            return sourceSet.getCompileClasspath();
        }
    });
    conventionMapping.map("destinationDir", new Callable<Object>() {
        public Object call() throws Exception {
            return sourceSet.getOutput().getClassesDir();
        }
    });
}
 
Example 7
Source File: LegacyJavaComponentPlugin.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
/**
 * Preconfigures the specified compile task based on the specified source set and class directory binary.
 *
 * @param compile the compile task to be preconfigured
 * @param sourceSet the source set for the compile task
 * @param binary the binary for the compile task
 */
public void configureCompileTask(AbstractCompile compile, final JavaSourceSet sourceSet, final ClassDirectoryBinarySpec binary) {
    compile.setDescription(String.format("Compiles %s.", sourceSet));
    compile.setSource(sourceSet.getSource());
    compile.dependsOn(sourceSet);
    ConventionMapping conventionMapping = compile.getConventionMapping();
    conventionMapping.map("classpath", new Callable<Object>() {
        public Object call() throws Exception {
            return sourceSet.getCompileClasspath().getFiles();
        }
    });
    conventionMapping.map("destinationDir", new Callable<Object>() {
        public Object call() throws Exception {
            return binary.getClassesDir();
        }
    });
}
 
Example 8
Source File: JavaBasePlugin.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public void configureForSourceSet(final SourceSet sourceSet, AbstractCompile compile) {
    ConventionMapping conventionMapping;
    compile.setDescription(String.format("Compiles the %s.", sourceSet.getJava()));
    conventionMapping = compile.getConventionMapping();
    compile.setSource(sourceSet.getJava());
    conventionMapping.map("classpath", new Callable<Object>() {
        public Object call() throws Exception {
            return sourceSet.getCompileClasspath();
        }
    });
    conventionMapping.map("destinationDir", new Callable<Object>() {
        public Object call() throws Exception {
            return sourceSet.getOutput().getClassesDir();
        }
    });
}
 
Example 9
Source File: JavaLanguagePlugin.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
/**
 * Preconfigures the specified compile task based on the specified source set and class directory binary.
 *
 * @param compile the compile task to be preconfigured
 * @param sourceSet the source set for the compile task
 * @param binary the binary for the compile task
 */
public void configureCompileTask(AbstractCompile compile, final JavaSourceSet sourceSet, final ClassDirectoryBinary binary) {
    compile.setDescription(String.format("Compiles %s.", sourceSet));
    compile.setSource(sourceSet.getSource());
    compile.dependsOn(sourceSet);
    ConventionMapping conventionMapping = compile.getConventionMapping();
    conventionMapping.map("classpath", new Callable<Object>() {
        public Object call() throws Exception {
            return sourceSet.getCompileClasspath().getFiles();
        }
    });
    conventionMapping.map("destinationDir", new Callable<Object>() {
        public Object call() throws Exception {
            return binary.getClassesDir();
        }
    });
}