GT2/GT2-Android/node_modules/xdl/build/detach/StandaloneBuildFlags.js.flow

54 lines
1.3 KiB
Plaintext
Raw Normal View History

/**
* @flow
*
* StandaloneBuildFlags is owned by a StandaloneContext and carries information about
* how to compile native code during the build step.
*/
type StandaloneBuildConfiguration = 'Debug' | 'Release';
type StandaloneBuildAndroidFlags = {
keystore: string,
keystorePassword: string,
keyAlias: string,
keyPassword: string,
outputFile: ?string,
};
type StandaloneBuildIosFlags = {
workspaceSourcePath: string,
appleTeamId: ?string,
};
class StandaloneBuildFlags {
configuration: StandaloneBuildConfiguration;
android: ?StandaloneBuildAndroidFlags;
ios: ?StandaloneBuildIosFlags;
static createEmpty = () => {
let flags = new StandaloneBuildFlags();
flags.configuration = 'Debug';
return flags;
};
static createIos = (
configuration: StandaloneBuildConfiguration,
ios: ?StandaloneBuildIosFlags
): StandaloneBuildFlags => {
let flags = new StandaloneBuildFlags();
flags.configuration = configuration;
flags.ios = ios;
return flags;
};
static createAndroid = (
configuration: StandaloneBuildConfiguration,
android: ?StandaloneBuildAndroidFlags
): StandaloneBuildFlags => {
let flags = new StandaloneBuildFlags();
flags.configuration = configuration;
flags.android = android;
return flags;
};
}
export default StandaloneBuildFlags;