Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.gradle.nativebinaries.language.c.tasks
[Groovy] Class AbstractNativeCompileTask

    java.lang.Object
      org.gradle.api.internal.AbstractTask
          org.gradle.api.DefaultTask
              org.gradle.nativebinaries.language.c.tasks.AbstractNativeCompileTask

    @Incubating
    abstract class AbstractNativeCompileTask
    extends DefaultTask

Compiles native source files into object files.

Property Summary
`List` | `compilerArgs` Additional arguments to provide to the compiler.
`FileCollection` | `includes` Returns the header directories to be used for compilation.
`Map` | `macros` Macros that should be defined for the compiler.
`File` | `objectFileDir` The directory where object files will be generated.
`boolean` | `positionIndependentCode` Should the compiler generate position independent code?
`FileCollection` | `source` Returns the source files to be compiled.
`Platform` | `targetPlatform` The platform being targeted.
`ToolChain` | `toolChain` The tool chain used for compilation.

Constructor Summary
`AbstractNativeCompileTask(CacheRepository cacheRepository)`

Method Summary
`void` | `compile(IncrementalTaskInputs inputs)`
`protected NativeCompileSpec` | `createCompileSpec()`
`protected Compiler` | `createCompiler(PlatformToolChain toolChain)`
`def` | `getOutputType()`
`void` | `includes(SourceDirectorySet dirs)` Add locations where the compiler should search for header files.
`void` | `includes(FileCollection includeRoots)` Add directories where the compiler should search for header files.
`void` | `source(Object sourceFiles)` Adds a set of source files to be compiled.

Property Detail

### compilerArgs

    @Input
    List compilerArgs

  Additional arguments to provide to the compiler.

### includes

    @InputFiles
    FileCollection includes

  Returns the header directories to be used for compilation.

### macros

    @Input
    Map macros

  Macros that should be defined for the compiler.

### objectFileDir

    @OutputDirectory
    File objectFileDir

  The directory where object files will be generated.

### positionIndependentCode

    @Input
    boolean positionIndependentCode

  Should the compiler generate position independent code?

### source

    @InputFiles
    FileCollection source

  Returns the source files to be compiled.

### targetPlatform

    Platform targetPlatform

  The platform being targeted.

### toolChain

    ToolChain toolChain

  The tool chain used for compilation.

Constructor Detail

### AbstractNativeCompileTask

    @Inject
    AbstractNativeCompileTask(CacheRepository cacheRepository)

Method Detail

### compile

    @TaskAction
    void compile(IncrementalTaskInputs inputs)

### createCompileSpec

    protected NativeCompileSpec createCompileSpec()

### createCompiler

    protected Compiler createCompiler(PlatformToolChain toolChain)

### getOutputType

    @Input
    def getOutputType()

### includes

    void includes(SourceDirectorySet dirs)

  Add locations where the compiler should search for header files.

### includes

    void includes(FileCollection includeRoots)

  Add directories where the compiler should search for header files.

### source

    void source(Object sourceFiles)

  Adds a set of source files to be compiled. The provided sourceFiles object is evaluated as per Project.files.

Gradle API 1.10