org.gradle.platform.base.internal.BinarySpecInternal Java Examples
The following examples show how to use
org.gradle.platform.base.internal.BinarySpecInternal.
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: CreateSourceTransformTask.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
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); } } }); }
Example #2
Source File: LanguageBasePlugin.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
@Mutate void createLifecycleTaskForBinary(TaskContainer tasks, BinaryContainer binaries) { Task assembleTask = tasks.getByName(LifecycleBasePlugin.ASSEMBLE_TASK_NAME); for (BinarySpecInternal binary : binaries.withType(BinarySpecInternal.class)) { if (!binary.isLegacyBinary()) { Task binaryLifecycleTask = tasks.create(binary.getNamingScheme().getLifecycleTaskName()); binaryLifecycleTask.setGroup(LifecycleBasePlugin.BUILD_GROUP); binaryLifecycleTask.setDescription(String.format("Assembles %s.", binary)); binary.setBuildTask(binaryLifecycleTask); if (binary.isBuildable()) { assembleTask.dependsOn(binary); } } } }
Example #3
Source File: CreateSourceTransformTask.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
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); } } }); }
Example #4
Source File: LanguageBasePlugin.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
@Mutate void createLifecycleTaskForBinary(TaskContainer tasks, BinaryContainer binaries) { Task assembleTask = tasks.getByName(LifecycleBasePlugin.ASSEMBLE_TASK_NAME); for (BinarySpecInternal binary : binaries.withType(BinarySpecInternal.class)) { if (!binary.isLegacyBinary()) { Task binaryLifecycleTask = tasks.create(binary.getNamingScheme().getLifecycleTaskName()); binaryLifecycleTask.setGroup(LifecycleBasePlugin.BUILD_GROUP); binaryLifecycleTask.setDescription(String.format("Assembles %s.", binary)); binary.setBuildTask(binaryLifecycleTask); if (binary.isBuildable()) { assembleTask.dependsOn(binary); } } } }
Example #5
Source File: ComponentModelBasePlugin.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
@Finalize void createSourceTransformTasks(final TaskContainer tasks, final BinaryContainer binaries, LanguageRegistry languageRegistry) { for (LanguageRegistration<?> language : languageRegistry) { for (BinarySpecInternal binary : binaries.withType(BinarySpecInternal.class)) { final CreateSourceTransformTask createRule = new CreateSourceTransformTask(language); createRule.createCompileTasksForBinary(tasks, binary); } } }
Example #6
Source File: ComponentModelBasePlugin.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
@Finalize void createSourceTransformTasks(final TaskContainer tasks, final BinaryContainer binaries, LanguageRegistry languageRegistry) { for (LanguageRegistration<?> language : languageRegistry) { for (BinarySpecInternal binary : binaries.withType(BinarySpecInternal.class)) { final CreateSourceTransformTask createRule = new CreateSourceTransformTask(language); createRule.createCompileTasksForBinary(tasks, binary); } } }
Example #7
Source File: JavaBasePlugin.java From javaide with GNU General Public License v3.0 | 4 votes |
@Mutate void attachBridgedBinaries(BinaryContainer binaries, BridgedBinaries bridgedBinaries) { for (BinarySpecInternal binary : bridgedBinaries.binaries) { binaries.put(binary.getProjectScopedName(), binary); } }