CSource Set
A set of C source files.
A C source set contains a set of source files, together with an optional set of exported header files.
plugins {
id 'c'
}
model {
components {
main(NativeLibrarySpec) {
sources {
c {
source {
srcDirs "src/main/cpp", "src/shared/c++"
include "**/*.c"
}
exportedHeaders {
srcDirs "src/main/include"
}
}
}
}
}
}
Content copied to clipboard
Functions
Link copied to clipboard
Link copied to clipboard
Returns a dependency which contains the tasks which build this artifact.
Link copied to clipboard
Returns the task responsible for building this component.
Link copied to clipboard
Returns a human-consumable display name for this element.
Link copied to clipboard
The headers as a directory set.
Link copied to clipboard
The headers that are private to this source set and implicitly available.
Link copied to clipboard
The libraries that this source set requires.
Link copied to clipboard
Link copied to clipboard
Returns the pre-compiled header configured for this source set.
Link copied to clipboard
The path to the project containing this component.
Link copied to clipboard
The source files.
Link copied to clipboard
Link copied to clipboard
Specifies the task responsible for building this component.
Link copied to clipboard
Sets the pre-compiled header to be used when compiling sources in this source set.