AbstractNativeSourceCompileTask

將原生原始碼檔案編譯成物件檔案。

屬性

屬性描述
compilerArgs

額外引數,提供給編譯器。

debuggable

編譯器是否應產生可偵錯的程式碼?

includes

編譯時要使用的標頭目錄。

macros

應為編譯器定義的巨集。

objectFileDir

將產生物件檔案的目錄。

optimized

編譯器是否應產生最佳化程式碼?

positionIndependentCode

編譯器是否應產生位置獨立程式碼?

source

要編譯的原始碼檔案。

systemIncludes

編譯時要使用的系統包含目錄。

targetPlatform

要編譯的目標平台。

toolChain

編譯時使用的工具鏈。

方法

方法描述
includes(includeRoots)

新增編譯器應搜尋標頭檔的目錄。

source(sourceFiles)

新增一組要編譯的原始碼檔案。提供的 sourceFiles 物件會依照 Project.files(java.lang.Object[]) 進行評估。

腳本區塊

無腳本區塊

屬性詳細資訊

ListProperty<String> compilerArgs

額外引數,提供給編譯器。

boolean debuggable

編譯器是否應產生可偵錯的程式碼?

ConfigurableFileCollection includes (唯讀)

編譯時要使用的標頭目錄。

Map<String, String> macros

應為編譯器定義的巨集。

DirectoryProperty objectFileDir

將產生物件檔案的目錄。

boolean optimized

編譯器是否應產生最佳化程式碼?

boolean positionIndependentCode

編譯器是否應產生位置獨立程式碼?

要編譯的原始碼檔案。

ConfigurableFileCollection systemIncludes (唯讀)

編譯時要使用的系統包含目錄。

Property<NativePlatform> targetPlatform

要編譯的目標平台。

編譯時使用的工具鏈。

方法詳細資訊

void includes(Object includeRoots)

新增編譯器應搜尋標頭檔的目錄。

void source(Object sourceFiles)

新增一組要編譯的原始碼檔案。提供的 sourceFiles 物件會依照 Project.files(java.lang.Object[]) 進行評估。