api / org.gradle.language.objectivecpp / ObjectiveCppSourceSet

ObjectiveCppSourceSet

@Incubating interface ObjectiveCppSourceSet : HeaderExportingSourceSet, LanguageSourceSet, DependentSourceSet

A set of Objective-C++ source files.

An Objective-C++ source set contains a set of source files, together with an optional set of exported header files.

 apply plugin: "objective-cpp" model { components { main(NativeLibrarySpec) { sources { objcpp { source { srcDirs "src/main/objectiveCpp", "src/shared/objectiveCpp" include "**/*.mm" } exportedHeaders { srcDirs "src/main/include" } } } } } } 

Inherited Functions

getExportedHeaders

abstract fun getExportedHeaders(): SourceDirectorySet

The headers as a directory set.

getImplicitHeaders

abstract fun getImplicitHeaders(): SourceDirectorySet

The headers that are private to this source set and implicitly available. These are not explicitly made available for compilation.

getLibs

abstract fun getLibs(): MutableCollection<*>

The libraries that this source set requires.

getPreCompiledHeader

abstract fun getPreCompiledHeader(): String

Returns the pre-compiled header configured for this source set.

lib

abstract fun lib(library: Any): Unit

Adds a library that this source set requires. This method accepts the following types:

  • A org.gradle.nativeplatform.NativeLibrarySpec
  • A org.gradle.nativeplatform.NativeDependencySet
  • A LanguageSourceSet
  • A java.util.Map containing the library selector.
The Map notation supports the following String attributes:
  • project: the path to the project containing the library (optional, defaults to current project)
  • library: the name of the library (required)
  • linkage: the library linkage required ['shared'/'static'] (optional, defaults to 'shared')

setPreCompiledHeader

abstract fun setPreCompiledHeader(header: String): Unit

Sets the pre-compiled header to be used when compiling sources in this source set.