org.gradle.platform.base

## Annotation Type BinaryTasks

-     @Retention(value=RUNTIME)
      @Target(value=METHOD)
      @Incubating
      public @interface BinaryTasks

  Declares the tasks to build a custom `BinarySpec` binary. The following example demonstrates how to register multiple tasks for custom binary using a plugin with a `BinaryTasks` annotation.

       import org.gradle.model.*
       import org.gradle.model.collection.*

       interface SampleComponent extends ComponentSpec {}
       interface SampleBinary extends BinarySpec {}
       class DefaultSampleBinary extends BaseBinarySpec implements SampleBinary {}

       apply plugin: MyCustomBinariesPlugin

       class MyCustomBinaryCreationTask extends DefaultTask{
            @TaskAction void build(){
                //building the binary
            }
       }

       class MyCustomBinariesPlugin implements Plugin {
           void apply(final Project project) {

           }

           @RuleSource
           static class Rules {

                @BinaryType
                void register(BinaryTypeBuilder builder) {
                   builder.defaultImplementation(DefaultSampleBinary)
                }

                @BinaryTasks
                void createBinaryTasks(CollectionBuilder tasks, SampleBinary binary) {
                   tasks.create("${binary.name}Task1", MyCustomBinaryCreationTask)
                   tasks.create("${binary.name}Task2"){
                        dependsOn "${binary.name}Task1"
                   }
                }
           }
       }