Java Code Examples for org.gradle.api.internal.jvm.ClassDirectoryBinarySpecInternal#getNamingScheme()
The following examples show how to use
org.gradle.api.internal.jvm.ClassDirectoryBinarySpecInternal#getNamingScheme() .
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: LegacyJavaComponentPlugin.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
private void createProcessResourcesTaskForBinary(final ClassDirectoryBinarySpecInternal binary, final Project target) { final BinaryNamingScheme namingScheme = binary.getNamingScheme(); binary.getSource().withType(JvmResourceSet.class).all(new Action<JvmResourceSet>() { public void execute(JvmResourceSet resourceSet) { Copy resourcesTask = target.getTasks().create(namingScheme.getTaskName("process", "resources"), ProcessResources.class); resourcesTask.setDescription(String.format("Processes %s.", resourceSet)); new DslObject(resourcesTask).getConventionMapping().map("destinationDir", new Callable<File>() { public File call() throws Exception { return binary.getResourcesDir(); } }); binary.getTasks().add(resourcesTask); binary.builtBy(resourcesTask); resourcesTask.from(resourceSet.getSource()); } }); }
Example 2
Source File: LegacyJavaComponentPlugin.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
private void createProcessResourcesTaskForBinary(final ClassDirectoryBinarySpecInternal binary, final Project target) { final BinaryNamingScheme namingScheme = binary.getNamingScheme(); binary.getSource().withType(JvmResourceSet.class).all(new Action<JvmResourceSet>() { public void execute(JvmResourceSet resourceSet) { Copy resourcesTask = target.getTasks().create(namingScheme.getTaskName("process", "resources"), ProcessResources.class); resourcesTask.setDescription(String.format("Processes %s.", resourceSet)); new DslObject(resourcesTask).getConventionMapping().map("destinationDir", new Callable<File>() { public File call() throws Exception { return binary.getResourcesDir(); } }); binary.getTasks().add(resourcesTask); binary.builtBy(resourcesTask); resourcesTask.from(resourceSet.getSource()); } }); }
Example 3
Source File: LegacyJavaComponentPlugin.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private void setClassesDirConvention(ClassDirectoryBinarySpecInternal binary, final Project target) { final BinaryNamingScheme namingScheme = binary.getNamingScheme(); ConventionMapping conventionMapping = new DslObject(binary).getConventionMapping(); conventionMapping.map("classesDir", new Callable<File>() { public File call() throws Exception { return new File(new File(target.getBuildDir(), "classes"), namingScheme.getOutputDirectoryBase()); } }); }
Example 4
Source File: LegacyJavaComponentPlugin.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private void createCompileJavaTaskForBinary(final ClassDirectoryBinarySpecInternal binary, final Project target) { final BinaryNamingScheme namingScheme = binary.getNamingScheme(); binary.getSource().withType(JavaSourceSet.class).all(new Action<JavaSourceSet>() { public void execute(JavaSourceSet javaSourceSet) { JavaCompile compileTask = target.getTasks().create(namingScheme.getTaskName("compile", "java"), JavaCompile.class); configureCompileTask(compileTask, javaSourceSet, binary); binary.getTasks().add(compileTask); binary.builtBy(compileTask); } }); }
Example 5
Source File: LegacyJavaComponentPlugin.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
private void setClassesDirConvention(ClassDirectoryBinarySpecInternal binary, final Project target) { final BinaryNamingScheme namingScheme = binary.getNamingScheme(); ConventionMapping conventionMapping = new DslObject(binary).getConventionMapping(); conventionMapping.map("classesDir", new Callable<File>() { public File call() throws Exception { return new File(new File(target.getBuildDir(), "classes"), namingScheme.getOutputDirectoryBase()); } }); }
Example 6
Source File: LegacyJavaComponentPlugin.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
private void createCompileJavaTaskForBinary(final ClassDirectoryBinarySpecInternal binary, final Project target) { final BinaryNamingScheme namingScheme = binary.getNamingScheme(); binary.getSource().withType(JavaSourceSet.class).all(new Action<JavaSourceSet>() { public void execute(JavaSourceSet javaSourceSet) { JavaCompile compileTask = target.getTasks().create(namingScheme.getTaskName("compile", "java"), JavaCompile.class); configureCompileTask(compileTask, javaSourceSet, binary); binary.getTasks().add(compileTask); binary.builtBy(compileTask); } }); }