}
public void apply(final Project target) {
target.apply(Collections.singletonMap("plugin", LanguageBasePlugin.class));
BinaryContainer binaryContainer = target.getExtensions().getByType(BinaryContainer.class);
binaryContainer.registerFactory(ClassDirectoryBinarySpec.class, new NamedDomainObjectFactory<ClassDirectoryBinarySpec>() {
public ClassDirectoryBinarySpec create(String name) {
return instantiator.newInstance(DefaultClassDirectoryBinarySpec.class, name, toolChain, new DefaultJavaPlatform(JavaVersion.current()));
}
});
binaryContainer.withType(ClassDirectoryBinarySpecInternal.class).all(new Action<ClassDirectoryBinarySpecInternal>() {
public void execute(ClassDirectoryBinarySpecInternal binary) {
createBinaryLifecycleTask(binary, target);
setClassesDirConvention(binary, target);
createProcessResourcesTaskForBinary(binary, target);
createCompileJavaTaskForBinary(binary, target);