Top Description Fields Constructors Methods
com.badlogic.gdx.jnigen

public Class BuildTarget

extends Object
Class Inheritance
Imports
com.badlogic.gdx.utils.Architecture, .Os, java.util.function.BooleanSupplier

Defines the configuration for building a native shared library for a specific platform. Used with AntScriptGenerator to create Ant build files that invoke the compiler toolchain to create the shared libraries.

Field Summary

Modifier and TypeField and Description
public String[]
androidABIs

List of ABIs we wish to build for Android.

public String[]
androidAndroidMk

Extra lines which will be added to Android's Android.mk

public String[]
androidApplicationMk

Extra lines which will be added to Android's Application.mk

public Architecture
architecture

whether this is an x86, ARM or RISC-V build, not used for Android

public String
archiver

the command to use when archiving files.

public String
archiverFlags

the flags passed to the archiver, must not be null

public Architecture.Bitness
bitness

whether this is a 32-bit, 64-bit or 128-bit build, not used for Android

public String
buildFileName

the name of the generated build file for this target, defaults to "build-${target}(64)?.xml", must not be null

public BooleanSupplier
canBuild

Condition to check if build this target

public String
cCompiler

the compiler to use when compiling c files.

public String[]
cExcludes

the C files and directories to be excluded from the build, accepts Ant path format, must not be null

public String
cFlags

the flags passed to the C compiler, must not be null

public String[]
cIncludes

the C files and directories to be included in the build, accepts Ant path format, must not be null

public String
compilerPrefix

prefix for the compiler (g++, gcc), useful for cross compilation, must not be null

public String
compilerSuffix

suffix for the compiler (g++, gcc), useful for cross compilation, must not be null

public String
cppCompiler

the compiler to use when compiling c++ files.

public String[]
cppExcludes

the C++ files and directories to be excluded from the build, accepts Ant path format, must not be null

public String
cppFlags

the flags passed to the C++ compiler, must not be null

public String[]
cppIncludes

the C++ files and directories to be included in the build, accepts Ant path format, must not be null

public boolean
excludeFromMasterBuildFile

whether to exclude this build target from the master build file, useful for debugging

public String[]
headerDirs

the directories containing headers for the build, must not be null

public String
libName

The name used for the library file.

public String
libraries

the libraries to be linked to the output, specify via e.g. -ldinput -ldxguid etc.

public String
linkerFlags

the flags passed to the linker, must not be null

public String
minIOSVersion

Minimum supported iOS version, will default to iOS 11

public Os
os

the target operating system

public String
osFileName

The name used for folders for this specific target.

public String
postCompileTask

Ant Xml executed in a target after compilation

public String
preCompileTask

Ant XML executed in a target before compilation

public String
xcframeworkBundleIdentifier

ios framework bundle identifier, if null an automatically generated bundle identifier will be used

Constructor Summary

AccessConstructor and Description
public
BuildTarget(Os targetType, Architecture.Bitness bitness, String[] cIncludes, String[] cExcludes, String[] cppIncludes, String[] cppExcludes, String[] headerDirs, String compilerPrefix, String cFlags, String cppFlags, String linkerFlags)

Creates a new build target.

Method Summary

Modifier and TypeMethod and Description
public String
public String
public String
public static BuildTarget
newDefaultTarget(Os type, boolean is64Bit)

Deprecated Use newDefaultTarget method.
Creates a new default BuildTarget for the given OS, using common default values.
public static BuildTarget
newDefaultTarget(Os type, Architecture.Bitness bitness)

Creates a new default BuildTarget for the given OS, using common default values.

public static BuildTarget
newDefaultTarget(Os type, boolean is64Bit, boolean isARM)

Deprecated Use newDefaultTarget method.
Creates a new default BuildTarget for the given OS, using common default values.
public static BuildTarget
newDefaultTarget(Os type, Architecture.Bitness bitness, Architecture architecture)

Creates a new default BuildTarget for the given OS, using common default values.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

androidABIsback to summary
public String[] androidABIs

List of ABIs we wish to build for Android. Defaults to all available in current NDK. https://developer.android.com/ndk/guides/application_mk#app_abi

androidAndroidMkback to summary
public String[] androidAndroidMk

Extra lines which will be added to Android's Android.mk

androidApplicationMkback to summary
public String[] androidApplicationMk

Extra lines which will be added to Android's Application.mk

architectureback to summary
public Architecture architecture

whether this is an x86, ARM or RISC-V build, not used for Android

archiverback to summary
public String archiver

the command to use when archiving files. Usually ar, must not be null

archiverFlagsback to summary
public String archiverFlags

the flags passed to the archiver, must not be null

bitnessback to summary
public Architecture.Bitness bitness

whether this is a 32-bit, 64-bit or 128-bit build, not used for Android

buildFileNameback to summary
public String buildFileName

the name of the generated build file for this target, defaults to "build-${target}(64)?.xml", must not be null

canBuildback to summary
public BooleanSupplier canBuild

Condition to check if build this target

cCompilerback to summary
public String cCompiler

the compiler to use when compiling c files. Usually gcc or clang, must not be null

cExcludesback to summary
public String[] cExcludes

the C files and directories to be excluded from the build, accepts Ant path format, must not be null

cFlagsback to summary
public String cFlags

the flags passed to the C compiler, must not be null

cIncludesback to summary
public String[] cIncludes

the C files and directories to be included in the build, accepts Ant path format, must not be null

compilerPrefixback to summary
public String compilerPrefix

prefix for the compiler (g++, gcc), useful for cross compilation, must not be null

compilerSuffixback to summary
public String compilerSuffix

suffix for the compiler (g++, gcc), useful for cross compilation, must not be null

cppCompilerback to summary
public String cppCompiler

the compiler to use when compiling c++ files. Usually g++ or clang++, must not be null

cppExcludesback to summary
public String[] cppExcludes

the C++ files and directories to be excluded from the build, accepts Ant path format, must not be null

cppFlagsback to summary
public String cppFlags

the flags passed to the C++ compiler, must not be null

cppIncludesback to summary
public String[] cppIncludes

the C++ files and directories to be included in the build, accepts Ant path format, must not be null

excludeFromMasterBuildFileback to summary
public boolean excludeFromMasterBuildFile

whether to exclude this build target from the master build file, useful for debugging

headerDirsback to summary
public String[] headerDirs

the directories containing headers for the build, must not be null

libNameback to summary
public String libName

The name used for the library file. This is a full file name, including file extension. Default is platform specific. E.g. "lib{sharedLibName}64.so"

librariesback to summary
public String libraries

the libraries to be linked to the output, specify via e.g. -ldinput -ldxguid etc.

linkerFlagsback to summary
public String linkerFlags

the flags passed to the linker, must not be null

minIOSVersionback to summary
public String minIOSVersion

Minimum supported iOS version, will default to iOS 11

osback to summary
public Os os

the target operating system

osFileNameback to summary
public String osFileName

The name used for folders for this specific target. Defaults to "${target}(64)"

postCompileTaskback to summary
public String postCompileTask

Ant Xml executed in a target after compilation

preCompileTaskback to summary
public String preCompileTask

Ant XML executed in a target before compilation

xcframeworkBundleIdentifierback to summary
public String xcframeworkBundleIdentifier

ios framework bundle identifier, if null an automatically generated bundle identifier will be used

Constructor Detail

BuildTargetback to summary
public BuildTarget(Os targetType, Architecture.Bitness bitness, String[] cIncludes, String[] cExcludes, String[] cppIncludes, String[] cppExcludes, String[] headerDirs, String compilerPrefix, String cFlags, String cppFlags, String linkerFlags)

Creates a new build target. See members of this class for a description of the parameters.

Method Detail

getBuildFilenameback to summary
public String getBuildFilename()
getSharedLibFilenameback to summary
public String getSharedLibFilename(String sharedLibName)
getTargetFolderback to summary
public String getTargetFolder()
newDefaultTargetback to summary
public static BuildTarget newDefaultTarget(Os type, boolean is64Bit)

Deprecated

Use newDefaultTarget method.

Creates a new default BuildTarget for the given OS, using common default values.

Annotations
@Deprecated
newDefaultTargetback to summary
public static BuildTarget newDefaultTarget(Os type, Architecture.Bitness bitness)

Creates a new default BuildTarget for the given OS, using common default values.

newDefaultTargetback to summary
public static BuildTarget newDefaultTarget(Os type, boolean is64Bit, boolean isARM)

Deprecated

Use newDefaultTarget method.

Creates a new default BuildTarget for the given OS, using common default values.

Annotations
@Deprecated
newDefaultTargetback to summary
public static BuildTarget newDefaultTarget(Os type, Architecture.Bitness bitness, Architecture architecture)

Creates a new default BuildTarget for the given OS, using common default values.