Groovy Documentation

org.gradle.nativecode.language.base.tasks
[Groovy] Class AbstractNativeCompileTask

java.lang.Object
  org.gradle.api.internal.AbstractTask
      org.gradle.api.DefaultTask
          org.gradle.nativecode.language.base.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

List 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?

ToolChain toolChain

 
Constructor Summary
AbstractNativeCompileTask()

 
Method Summary
void compile()

protected NativeCompileSpec createCompileSpec()

protected WorkResult execute(ToolChainInternal toolChain, NativeCompileSpec spec)

def getOutputType()

FileCollection getSource()

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


macros

@Input
List 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?


toolChain

ToolChain toolChain


 
Constructor Detail

AbstractNativeCompileTask

@Inject
AbstractNativeCompileTask()


 
Method Detail

compile

@TaskAction
void compile()


createCompileSpec

protected NativeCompileSpec createCompileSpec()


execute

protected WorkResult execute(ToolChainInternal toolChain, NativeCompileSpec spec)


getOutputType

@Input
def getOutputType()


getSource

@InputFiles
@SkipWhenEmpty // Workaround for GRADLE-2026
FileCollection getSource()


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.8