public class Configuration extends Object
This class is currently being reviewed and refactored. See CMP-471 as the master bug for the tasks.
Steps to refactor:
cfgXXX
to setXXX
, and annotate the setter.getXXXInfo()
static method.Modifier and Type | Field and Description |
---|---|
static String |
AIR_HOME_TOKEN |
static String |
AS3 |
String |
date |
static String |
DEFAULT_OUTPUT_DIRECTORY_TOKEN |
static String |
ES |
Map<String,String> |
includeFilesNamePath
include-file name path [...]
|
Set<String> |
langs |
static int |
MXML_CURRENT_VERSION |
static int |
MXML_EARLIEST_MAJOR_VERSION |
static int |
MXML_LATEST_MAJOR_VERSION |
static int |
MXML_LATEST_MINOR_VERSION |
static int |
MXML_VERSION_2_0 |
static int |
MXML_VERSION_2_0_1 |
static int |
MXML_VERSION_3_0 |
static int |
MXML_VERSION_4_0 |
static int |
MXML_VERSION_4_5 |
static int |
MXML_VERSION_4_6 |
static int |
MXML_VERSION_4_7 |
static String |
PLAYERGLOBAL_HOME_TOKEN |
static String |
STRICT |
static String |
SWC_AIRGLOBAL |
static int |
TARGET_PLAYER_MAJOR_VERSION_MIN
The major part the earliest player version that this compiler can target.
|
static int |
TARGET_PLAYER_MINOR_VERSION_MIN
The minor part the earliest player version that this compiler can target.
|
Constructor and Description |
---|
Configuration() |
public static final String DEFAULT_OUTPUT_DIRECTORY_TOKEN
public static final String SWC_AIRGLOBAL
public static final int TARGET_PLAYER_MAJOR_VERSION_MIN
public static final int TARGET_PLAYER_MINOR_VERSION_MIN
public static final String PLAYERGLOBAL_HOME_TOKEN
public static final String AIR_HOME_TOKEN
public static final String STRICT
public static final String AS3
public static final String ES
public String date
public static final int MXML_VERSION_4_7
public static final int MXML_VERSION_4_6
public static final int MXML_VERSION_4_5
public static final int MXML_VERSION_4_0
public static final int MXML_VERSION_3_0
public static final int MXML_VERSION_2_0_1
public static final int MXML_VERSION_2_0
public static final int MXML_CURRENT_VERSION
public static final int MXML_EARLIEST_MAJOR_VERSION
public static final int MXML_LATEST_MAJOR_VERSION
public static final int MXML_LATEST_MINOR_VERSION
public void validate(ConfigurationBuffer configurationBuffer) throws ConfigurationException
configurationBuffer
- Configuration buffer.ConfigurationException
- Error.public static void validateNoCompcOnlyOptions(ConfigurationBuffer configurationBuffer) throws ConfigurationException
configurationBuffer
- the configuration buffer to check for compc-only options.ConfigurationException
- if a compc-only option is found in the configuration buffer.protected String getOutputPath(ConfigurationValue cv, String fileName)
cv
- fileName
- public void setPathResolver(IPathResolver pathResolver)
pathResolver
- a path resolver for this configuration. May not be null.public String getMainDefinition()
mxmlc
only takes one file in the source list. The main
definition name is the main source file name.public void setMainDefinition(String mainDefinition)
public void setBenchmark(ConfigurationValue cv, boolean b)
public String getDebugPassword()
public void setDebugPassword(ConfigurationValue cv, String debugPassword)
public int getDefaultBackgroundColor()
public void setDefaultBackgroundColor(ConfigurationValue cv, int backgroundColor)
public int getDefaultFrameRate()
public void setDefaultFrameRate(ConfigurationValue cv, int rate) throws ConfigurationException
ConfigurationException
public int getScriptTimeLimit()
public int getScriptRecursionLimit()
public boolean scriptLimitsSet()
public void setDefaultScriptLimits(ConfigurationValue cv, int scriptLimit, int scriptRecursionLimit) throws ConfigurationException
ConfigurationException
public int getDefaultWidth()
public int getDefaultHeight()
public void setDefaultSize(ConfigurationValue cv, int width, int height) throws ConfigurationException
ConfigurationException
public void setExterns(ConfigurationValue cfgval, List<String> vals)
public void setIncludes(ConfigurationValue cfgval, List<String> vals)
public void setFramework(ConfigurationValue cfgval, String value)
public File getLinkReport()
public void setLinkReport(ConfigurationValue cv, String filename)
def
tags,
pre
tags and ext
tags showing linker dependencies in the final SWF file. The file format output
by this command can be used to write a file for input to the load-externs
option.public File getSizeReport()
public void setSizeReport(ConfigurationValue cv, String filename)
public void setLoadExterns(ConfigurationValue cfgval, String filename) throws ConfigurationException
This option provides compile-time link checking for external components that are dynamically linked.
ConfigurationException
public String getRawMetadata()
public void setRawMetadata(ConfigurationValue cv, String xml) throws ConfigurationException
ConfigurationException
public String getResourceBundleList()
public List<String> getIncludeResourceBundles()
public void setIncludeResourceBundles(ConfigurationValue cv, List<String> values)
Qualified name of a properties file is determined by its relative path to its parent source folder. Such as:
Source path: locale/{locale}
Path of properties file 1: locale/en_US/A.properties Qualified name of properties file 1: A
Path of properties file 2: locale/en_US/com/resources/B.properties Qualified name of properties file 1: com.resources.B
Note: Source folders of all the properties files passed using this argument should be in the project's source path list.
cv
- configuration value objectsvalues
- list of resource bundles to include in the swc or swfpublic void setResourceBundleList(ConfigurationValue cv, String filename)
public void setRuntimeSharedLibraries(ConfigurationValue cfgval, List<String> urls) throws ConfigurationException
You specify the location of the SWF file relative to the deployment location of the application. For example, if you store a file named library.swf file in the web_root/libraries directory on the web server, and the application in the web root, you specify libraries/library.swf.
ConfigurationException
public boolean getUseNetwork()
public void setUseNetwork(ConfigurationValue cv, boolean b)
The default value is true.
When the use-network property is set to false, the application can access the local filesystem (for example, use the XML.load() method with file: URLs) but not network services. In most circumstances, the value of this property should be true.
public List<RuntimeSharedLibraryPathInfo> getRslPathInfo()
The list will be empty if -static-link-runtime-shared-libraries=true.
TODO Verify if this is still true and make the code do what it says.
public void setRuntimeSharedLibraryPath(ConfigurationValue cfgval, List<String> urls) throws ConfigurationException
The path-element argument is the location of the SWC file or open directory to compile against. For example, c:\flexsdk\frameworks\libs\framework.swc. This is the equivalent of the using the external-library-path option when compiling against an RSL using the runtime-shared-libraries option.
The rsl-url argument is the URL of the RSL that will be used to load the RSL at runtime. The compiler does not verify the existence of the SWF file at this location at compile time. It does store this string in the application, however, and uses it at run time. As a result, the SWF file must be available at run time but necessarily not at compile time.
The policy-file-url is the location of the crossdomain.xml file that gives permission to read the RSL from the server. This might be necessary because the RSL can be on a separate server as the application. For example, http://www.mydomain.com/rsls/crossdomain.xml.
The failover-url and second policy-file-url arguments specify the location of the secondary RSL and crossdomain.xml file if the first RSL cannot be loaded. This most commonly happens when the client Player version does not support cross-domain RSLs. You can add any number of failover RSLs, but must include a policy file URL for each one.
Do not include spaces between the comma-separated values. The following example shows how to use this option:
mxmlc -o=../lib/app.swf -runtime-shared-library-path=../lib/mylib.swc,../bin/myrsl.swf Main.mxmlYou can specify more than one library file to be used as an RSL. You do this by adding additional runtime-shared-library-path options.
You can also use the runtime-shared-libraries command to use RSLs with your applications. However, the runtime-shared-library-path option lets you also specify the location of the policy file and failover RSL.
ConfigurationException
public boolean getStaticLinkRsl()
protected void setOverrideStaticLinkRsl(boolean staticLinkRsl)
staticLinkRsl
- public void setStaticLinkRuntimeSharedLibraries(ConfigurationValue cv, boolean b)
This option is useful so that you can quickly switch between a statically and dynamically linked application without having to change the runtime-shared-library-path option, which can be verbose, or edit the configuration files.
public Boolean getUseFlashBuilderProjectFiles()
public void setUseFlashBuilderProjectFiles(ConfigurationValue cv, Boolean useFiles) throws ConfigurationException
ConfigurationException
public boolean getVerifyDigests()
public void setVerifyDigests(ConfigurationValue cv, boolean b)
public boolean getRemoveUnusedRsls()
public void setRemoveUnusedRsls(ConfigurationValue cv, boolean b)
public boolean getIncludeInheritanceDependenciesOnly()
public void setIncludeInheritanceDependenciesOnly(ConfigurationValue cv, boolean b)
public int getTargetPlayerMajorVersion()
public int getTargetPlayerMinorVersion()
public int getTargetPlayerRevision()
public void setTargetPlayer(ConfigurationValue cv, String version) throws ConfigurationException
The player_version parameter has the following format:
major_version.minor_version.revision
The major_version is required while minor_version and revision are optional. The minimum value is 10.0.0. If you do not specify the minor_version or revision, then the compiler uses zeros.
The value of major_version is also used by the {targetPlayerMajorVersion} token in the flex-config.xml file. This
token can be used in any
If you do not explicitly set the value of this option, the compiler uses the default from the flex-config.xml
file. The value in flex-config.xml is the version of Flash Player that shipped with the SDK.
This option is useful if your application's audience has a specific player and cannot upgrade. You can use this
to "downgrade" your application for that audience.
ConfigurationException
public int getSwfVersion()
public void setSwfVersion(ConfigurationValue cv, int version) throws ConfigurationException
ConfigurationException
public boolean getUseDirectBlit()
public void setUseDirectBlit(ConfigurationValue cv, boolean value)
public boolean getUseGpu()
public void setUseGpu(ConfigurationValue cv, boolean value)
public Locale getToolsLocale()
null
if not specified. In that case,
system's locale is used.public void setToolsLocale(ConfigurationValue cv, String toolsLocale) throws ConfigurationException
toolsLocale
- A locale in Java format. For example, "en" or "ja_JP".ConfigurationException
- When the specified toolsLocale is not available a ToolsLocaleNotAvailable error is
reported.public boolean getCompilerAccessible()
public void setCompilerAccessible(ConfigurationValue cv, boolean accessible)
public String getCompilerActionscriptFileEncoding()
public void setCompilerActionscriptFileEncoding(ConfigurationValue cv, String encoding)
public boolean getAdjustOpDebugLine()
public void setCompilerAdjustOpdebugline(ConfigurationValue cv, boolean b)
public boolean getAllowSourcePathOverlap()
public void setCompilerAllowSourcePathOverlap(ConfigurationValue cv, boolean b)
public String getBindingValueChangeEvent()
public void setCompilerBindingValueChangeEvent(ConfigurationValue cv, String b)
public String getBindingValueChangeEventKind()
public void setCompilerBindingValueChangeEventKind(ConfigurationValue cv, String b)
public String getBindingValueChangeEventType()
public void setCompilerBindingValueChangeEventType(ConfigurationValue cv, String b)
public String getBindingEventHandlerEvent()
public void setCompilerBindingEventHandlerEvent(ConfigurationValue cv, String b)
public String getBindingEventHandlerClass()
public void setCompilerBindingEventHandlerClass(ConfigurationValue cv, String b)
public String getBindingEventHandlerInterface()
public void setCompilerBindingEventHandlerInterface(ConfigurationValue cv, String b)
public String getStatesClass()
public void setCompilerStatesClass(ConfigurationValue cv, String b)
public String getStatesInstanceOverrideClass()
public void setCompilerStatesInstanceOverrideClass(ConfigurationValue cv, String b)
public String getStatesPropertyOverrideClass()
public void setCompilerStatesPropertyOverrideClass(ConfigurationValue cv, String b)
public String getStatesEventOverrideClass()
public void setCompilerStatesEventOverrideClass(ConfigurationValue cv, String b)
public String getStatesStyleOverrideClass()
public void setCompilerStatesStyleOverrideClass(ConfigurationValue cv, String b)
public String getProxyBaseClass()
public void setCompilerProxyBaseClass(ConfigurationValue cv, String b)
public String getComponentFactoryClass()
public void setCompilerComponentFactoryClass(ConfigurationValue cv, String b)
public String getComponentFactoryInterface()
public void setCompilerComponentFactoryInterface(ConfigurationValue cv, String b)
public void setCompilerDefine(ConfigurationValue cv, String name, String value) throws ConfigurationException
ConfigurationException
public boolean useConservativeAlgorithm()
public void setCompilerConservative(ConfigurationValue cv, boolean c)
public String getCompilerContextRoot()
public void setCompilerContextRoot(ConfigurationValue cv, String contextRoot)
public boolean isDebuggingEnabled()
protected void setDebug(boolean value)
public void setCompilerDebug(ConfigurationValue cv, boolean generateDebugTags)
public String getCompilerDefaultsCssUrl()
public void setCompilerDefaultsCssUrl(ConfigurationValue cv, String defaultsCssUrlPath) throws ConfigurationException.CannotOpen
public boolean getCompilerDoc()
public void setCompilerDoc(ConfigurationValue cv, boolean doc)
public boolean getCompilingForAIR()
external-library-path
.public void setCompilerExternalLibraryPath(ConfigurationValue cv, String[] pathlist) throws ConfigurationException
ConfigurationException
public String getCompilerGeneratedDirectory()
public void setCompilerGeneratedDirectory(String generatedDir)
public boolean isHeadlessServer()
public void setCompilerHeadlessServer(ConfigurationValue cv, boolean headlessServer)
public void setCompilerIncludeLibraries(ConfigurationValue cv, String[] pathlist) throws ConfigurationException.CannotOpen
Contrast this option with the library-path option that includes only those classes that are referenced at compile time.
To link one or more classes whether or not they are used and not an entire SWC file, use the includes option.
This option is commonly used to specify resource bundles.
public void setCompilerIncremental(ConfigurationValue cv, boolean b)
public boolean keepAllTypeSelectors()
public void setCompilerKeepAllTypeSelectors(ConfigurationValue cv, boolean keepAllTypeSelectors)
public void setCompilerKeepAs3Metadata(ConfigurationValue cv, List<String> values)
public void setCompilerKeepGeneratedActionscript(ConfigurationValue cv, boolean keep)
public void setCompilerKeepGeneratedSignatures(ConfigurationValue cv, boolean keep)
public boolean getEnableRuntimeDesignLayers()
public void setCompilerEnableRuntimeDesignLayers(ConfigurationValue cv, boolean enable)
public boolean getEnableSwcVersionFiltering()
public void setCompilerEnableSwcVersionFiltering(ConfigurationValue cv, boolean enable)
public void setReportMissingCompilerLibraries(boolean reportMissingCompilerLibraries)
reportMissingCompilerLibraries
- true to report missing librariespublic void setCompilerLibraryPath(ConfigurationValue cv, String[] pathlist) throws ConfigurationException.CannotOpen
public void setCompilerLocale(ConfigurationValue cv, String[] newLocales)
public boolean metadataExport()
public void setCompilerMetadataExport(boolean metadataExport)
public Boolean getCompilerMxmlChildrenAsData()
public void setCompilerMxmlChildrenAsData(ConfigurationValue cv, Boolean asData) throws ConfigurationException
ConfigurationException
public Boolean getCompilerAllowSubclassOverrides()
public void setCompilerAllowSubclassOverrides(ConfigurationValue cv, Boolean allow) throws ConfigurationException
ConfigurationException
public String[] getCompilerMxmlImplicitImports()
public void setCompilerMxmlImplicitImports(ConfigurationValue cv, String[] imports) throws ConfigurationException
ConfigurationException
public String getCompilerCompatibilityVersionString()
public int getCompilerCompatibilityVersion()
public String getCompilerMinimumSupportedVersionString()
public int getCompilerMinimumSupportedVersion()
public void setCompilerMinimumSupportedVersion(ConfigurationValue cv, String version) throws ConfigurationException
ConfigurationException
public void setCompilerMxmlQualifiedTypeSelectors(ConfigurationValue cv, boolean b)
public boolean omitTraceStatements()
public void setCompilerOmitTraceStatements(ConfigurationValue cv, boolean b)
public boolean optimize()
public boolean getCompilerOptimize()
public void setCompilerOptimize(ConfigurationValue cv, boolean b)
public String getPreloader()
public String getCompilerPreloader()
public void setCompilerPreloader(ConfigurationValue cv, String value)
public File getCompilerServices()
public void setCompilerServices(ConfigurationValue cv, String servicesPath) throws ConfigurationException
ConfigurationException
public boolean warnings()
public void setCompilerShowActionscriptWarnings(ConfigurationValue cv, boolean ascWarnings)
public boolean showBindingWarnings()
public void setCompilerShowBindingWarnings(ConfigurationValue cv, boolean show)
public void setCompilerShowMultipleDefinitionWarnings(ConfigurationValue cv, boolean show)
public boolean showDependencyWarnings()
public void setCompilerShowDependencyWarnings(ConfigurationValue cv, boolean show)
public boolean getReportInvalidStylesAsWarnings()
compiler.report-invalid-styles-as-warnings
option value.
For example, style "fooStyle" is defined to used only with theme called "fooTheme":
[Style(name="fooStyle", type="uint", format="Color", inherit="yes", theme="fooTheme")] public class MyComponent extends UIComponentIf "fooTheme" isn't used by the current application, the following style specifier is considered "invalid styles" .
<local:MyComponent fooStyle="white" />
public void setCompilerReportInvalidStylesAsWarnings(ConfigurationValue cv, boolean show)
public boolean reportMissingRequiredSkinPartsAsWarnings()
public void setCompilerReportMissingRequiredSkinPartsAsWarnings(ConfigurationValue cv, boolean b)
public boolean getShowInvalidCSSPropertyWarnings()
See getReportInvalidStylesAsWarnings()
for definition of "invalid style".
This option applies to invalid styles in a <fx:Style>
block.
public void setShowInvalidCssPropertyWarnings(ConfigurationValue cv, boolean show)
public boolean showDeprecationWarnings()
public void setCompilerShowDeprecationWarnings(ConfigurationValue cv, boolean show)
public void setCompilerShowShadowedDeviceFontWarnings(ConfigurationValue cv, boolean show)
public boolean showUnusedTypeSelectorWarnings()
public boolean showMultipleDefinitionWarnings()
public void setCompilerShowUnusedTypeSelectorWarnings(ConfigurationValue cv, boolean show)
public com.google.common.collect.ImmutableList<String> getCompilerResourceBundlePathForLocale(String locale) throws ConfigurationException.CannotOpen
locale
. The locale must be included in the configuration.locale
- Locale name.locale
.ConfigurationException.CannotOpen
- Error resolving one of the paths from this locale.public void setCompilerSourcePath(ConfigurationValue cv, String[] paths) throws ConfigurationException
ConfigurationException
public static void assertThatAllPathsAreDirectories(List<String> paths, ConfigurationValue cv) throws ConfigurationException.NotDirectory
paths
- A list of paths.cv
- Context.ConfigurationException.NotDirectory
- Path is not a directory exception.public static ConfigurationInfo getCompilerSourcePathInfo()
public boolean strict()
public void setCompilerStrict(ConfigurationValue cv, boolean strict)
public boolean suppressWarningsInIncremental()
public void setCompilerSuppressWarningsInIncremental(boolean b)
public List<String> getCompilerThemeFiles()
public void setCompilerTheme(ConfigurationValue cv, List<String> paths) throws ConfigurationException.CannotOpen
public Deque<String> getDefaultsCSSFiles()
For example:
-defaults-css-files=[A, B, C]
Then, 'A' should have precedence over 'B', then 'C', then SWCs defaultsCssFiles should have the order: SWCS, C,
B, A
public void setDefaultsCSSFiles(ConfigurationValue cv, List<String> paths) throws ConfigurationException.CannotOpen
CSS files included in the output with this option have a higher precedence than default CSS files in existing SWCs. For example, a CSS file included with this option overrides definitions in framework.swc's defaults.css file, but it has the same overall precedence as other included CSS files inside the SWC file.
This option does not actually insert the CSS file into the SWC file; it simulates it. When you finish developing the CSS file, you should rebuild the SWC file with the new integrated CSS file.
This option takes one or more files. The precedence for multiple CSS files included with this option is from first to last.
public List<IFileSpecification> getCompilerThemeCssFiles()
public void addThemeCssFiles(List<IFileSpecification> files)
public void setCompilerUseResourceBundleMetadata(ConfigurationValue cv, boolean b)
public boolean debug()
public void setCompilerVerboseStacktraces(ConfigurationValue cv, boolean verboseStacktraces)
public boolean warn_array_tostring_changes()
public void setCompilerWarnArrayTostringChanges(ConfigurationValue cv, boolean b)
public boolean warn_assignment_within_conditional()
public void setCompilerWarnAssignmentWithinConditional(ConfigurationValue cv, boolean b)
public boolean warn_bad_array_cast()
public void setCompilerWarnBadArrayCast(ConfigurationValue cv, boolean b)
public boolean warn_bad_bool_assignment()
public void setCompilerWarnBadBoolAssignment(ConfigurationValue cv, boolean b)
public boolean warn_bad_date_cast()
public void setCompilerWarnBadDateCast(ConfigurationValue cv, boolean b)
public boolean warn_bad_es3_type_method()
public void setCompilerWarnBadEs3TypeMethod(ConfigurationValue cv, boolean b)
public boolean warn_bad_es3_type_prop()
public void setCompilerWarnBadEs3TypeProp(ConfigurationValue cv, boolean b)
public boolean warn_bad_nan_comparison()
public void setCompilerWarnBadNanComparison(ConfigurationValue cv, boolean b)
public boolean warn_bad_null_assignment()
public void setCompilerWarnBadNullAssignment(ConfigurationValue cv, boolean b)
public boolean warn_bad_null_comparison()
public void setCompilerWarnBadNullComparison(ConfigurationValue cv, boolean b)
public boolean warn_bad_undefined_comparison()
public void setCompilerWarnBadUndefinedComparison(ConfigurationValue cv, boolean b)
public boolean warn_boolean_constructor_with_no_args()
public void setCompilerWarnBooleanConstructorWithNoArgs(ConfigurationValue cv, boolean b)
public boolean warn_changes_in_resolve()
public void setCompilerWarnChangesInResolve(ConfigurationValue cv, boolean b)
public boolean warn_class_is_sealed()
public void setCompilerWarnClassIsSealed(ConfigurationValue cv, boolean b)
public boolean warn_const_not_initialized()
public void setCompilerWarnConstNotInitialized(ConfigurationValue cv, boolean b)
public boolean warn_constructor_returns_value()
public void setCompilerWarnConstructorReturnsValue(ConfigurationValue cv, boolean b)
public boolean warn_deprecated_event_handler_error()
public void setCompilerWarnDeprecatedEventHandlerError(ConfigurationValue cv, boolean b)
public boolean warn_deprecated_function_error()
public void setCompilerWarnDeprecatedFunctionError(ConfigurationValue cv, boolean b)
public boolean warn_deprecated_property_error()
public void setCompilerWarnDeprecatedPropertyError(ConfigurationValue cv, boolean b)
public boolean warn_duplicate_argument_names()
public void setCompilerWarnDuplicateArgumentNames(ConfigurationValue cv, boolean b)
public boolean warn_duplicate_variable_def()
public void csetCompilerWarnDuplicateVariableDef(ConfigurationValue cv, boolean b)
public boolean warn_for_var_in_changes()
public void setCompilerWarnForVarInChanges(ConfigurationValue cv, boolean b)
public boolean warn_import_hides_class()
public void setCompilerWarnImportHidesClass(ConfigurationValue cv, boolean b)
public boolean warn_instance_of_changes()
public void setCompilerWarnInstanceOfChanges(ConfigurationValue cv, boolean b)
public boolean warn_internal_error()
public void setCompilerWarnInternalError(ConfigurationValue cv, boolean b)
public boolean warn_level_not_supported()
public void setCompilerWarnLevelNotSupported(ConfigurationValue cv, boolean b)
public boolean warn_missing_namespace_decl()
public void setCompilerWarnMissingNamespaceDecl(ConfigurationValue cv, boolean b)
public boolean warn_negative_uint_literal()
public void setCompilerWarnNegativeUintLiteral(ConfigurationValue cv, boolean b)
public boolean warn_no_constructor()
public void setCompilerWarnNoConstructor(ConfigurationValue cv, boolean b)
public boolean warn_no_explicit_super_call_in_constructor()
public void setCompilerWarnNoExplicitSuperCallInConstructor(ConfigurationValue cv, boolean b)
public boolean warn_no_type_decl()
public void setCompilerWarnNoTypeDecl(ConfigurationValue cv, boolean b)
public boolean warn_number_from_string_changes()
public void setCompilerWarnNumberFromStringChanges(ConfigurationValue cv, boolean b)
public boolean warn_scoping_change_in_this()
public void setCompilerWarnScopingChangeInThis(ConfigurationValue cv, boolean b)
public boolean warn_slow_text_field_addition()
public void setCompilerWarnSlowTextFieldAddition(ConfigurationValue cv, boolean b)
public boolean warn_unlikely_function_value()
public void setCompilerWarnUnlikelyFunctionValue(ConfigurationValue cv, boolean b)
public boolean warn_xml_class_has_changed()
public void setCompilerWarnXmlClassHasChanged(ConfigurationValue cv, boolean b)
public void setCompilerGenerateAbstractSyntaxTree(ConfigurationValue cv, boolean b)
public boolean getCompilerGenerateAbstractSyntaxTree()
public boolean getCompilerIsolateStyles()
public void setCompilerIsolateStyles(ConfigurationValue cv, boolean isolateStyles)
public void setCompress(ConfigurationValue cv, boolean useCompression)
public boolean useCompression()
-compiler.compress=false
will force compiler not to compress the output SWF.public com.google.common.collect.ImmutableList<String> expandTokens(Iterable<String> pathElements, Iterable<String> locales, ConfigurationValue configurationValue)
protected com.google.common.collect.ImmutableList<String> expandTokens(Iterable<String> pathElements, Iterable<String> locales, ConfigurationValue configurationValue, boolean returnMissingFiles)
-source-path=foo,bar/{locale},baz -locale=en_US -> foo,bar/en_US,baz -source-path=foo,bar/{locale},baz -locale=en_US,ja_JP -> foo,bar/en_US,bar/ja_JP,baz -source-path=foo,bar/{locale},baz -locale= -> foo,baz -library-path=foo,bar/{locale},baz -locale=en_US -> foo,bar/en_US,baz -library-path=foo,bar/{locale},baz -locale=en_US,ja_JP -> foo,bar/en_US,bar/ja_JP,baz -library-path=foo,bar/{locale},baz -locale= -> foo,baz
pathElements
- A list of unprocessed paths from configuration values.locales
- A set of locales.configurationValue
- Context.returnMissingFiles
- controls whether or not files that do not exist are included in the list of expanded
files. Pass true to include files that do not exist, false otherwise.ConfigurationException.CannotOpen
public Map<String,String> getLocaleDependentSources()
protected String resolvePathStrict(String path, ConfigurationValue cv) throws ConfigurationException.CannotOpen
path
- A path to resolve.cv
- Configuration context.resolvePathsStrict
ConfigurationException.CannotOpen
public void setExtension(ConfigurationValue cv, String[] pathlist) throws ConfigurationException.CannotOpen
cv
- The configuration value context.pathlist
- A List of values for the Extension element, with the first item expected to be the uri and the
remaining are extension paths.ConfigurationException.CannotOpen
- When no arg is provided or when the jar does not exist.public void setCompilerFontsAdvancedAntiAliasing(ConfigurationValue cv, boolean val)
public void setCompilerFontsLanguagesLanguageRange(ConfigurationValue cv, String lang, String range)
public void setCompilerFontsLocalFontsSnapshot(ConfigurationValue cv, String localFontsSnapshotPath) throws ConfigurationException.CannotOpen
public void setCompilerFontsLocalFontPaths(ConfigurationValue cv, List<String> list) throws ConfigurationException.CannotOpen
public void setCompilerFontsManagers(ConfigurationValue cv, List<String> list)
public void setCompilerFontsMaxCachedFonts(ConfigurationValue cv, String val)
public void setCompilerFontsMaxGlyphsPerFace(ConfigurationValue cv, String val)
public List<MXMLNamespaceMapping> getCompilerNamespacesManifestMappings()
public void setCompilerNamespacesNamespace(ConfigurationValue cfgval, List<String> args) throws ConfigurationException
cfgval
- The configuration value context.args
- A List of values for the namespace element, with the first item expected to be the uri and the
remaining are manifest paths.ConfigurationException
public void setMetadataContributor(ConfigurationValue cv, String name)
public void setMetadataCreator(ConfigurationValue cv, String name)
public void setMetadataDate(ConfigurationValue cv, String text)
public void setMetadataDescription(ConfigurationValue cv, String text)
public void setMetadataLanguage(ConfigurationValue cv, String code)
public void setMetadataLocalizedDescription(ConfigurationValue cv, String text, String lang)
public void setMetadataLocalizedTitle(ConfigurationValue cv, String title, String lang)
public void setMetadataPublisher(ConfigurationValue cv, String name)
public void setMetadataTitle(ConfigurationValue cv, String title)
public Set<String> getForceRsls()
public void setForceRsls(ConfigurationValue cfgval, String[] args) throws ConfigurationException
ConfigurationException
public ApplicationDomainTarget getApplicationDomain(String swcPath)
swcPath
- The full path of the swc file.public void setApplicationDomain(ConfigurationValue cfgval, String[] args) throws ConfigurationException
ConfigurationException
public int getCompilerMxmlMajorCompatibilityVersion()
public int getCompilerMxmlMinorCompatibilityVersion()
public int getCompilerMxmlRevisionCompatibilityVersion()
public String getCompilerMxmlCompatibilityVersionString()
public int getCompilerMxmlCompatibilityVersion()
public void setCompilerMxmlCompatibilityVersion(ConfigurationValue cv, String version) throws ConfigurationException
ConfigurationException
public String getCompilerMxmlMinimumSupportedVersionString()
public int getCompilerMxmlMinimumSupportedVersion()
public void setCompilerMxmlMinimumSupportedVersion(int version)
public void setCompilerMxmlMinimumSupportedVersion(ConfigurationValue cv, String version) throws ConfigurationException
ConfigurationException
public boolean isCompilerMxmlMinimumSupportedVersionConfigured()
public boolean getMobile()
public void setMobile(ConfigurationValue cv, boolean b)
public void setLicensesLicense(ConfigurationValue cfgval, String product, String serialNumber) throws ConfigurationException
ConfigurationException
public void setFramesFrame(ConfigurationValue cv, List<String> args) throws ConfigurationException
ConfigurationException
public void setAS3(ConfigurationValue cv, boolean b)
public void setES(ConfigurationValue cv, boolean b)
public void setComputeDigest(ConfigurationValue cv, boolean value)
public void setOutputSwcAsDirectory(ConfigurationValue cv, boolean value)
compc -directory=true -output=destination_directory
public boolean getOutputSwcAsDirectory()
public void setIncludeClasses(ConfigurationValue cv, List<String> values)
You can use packaged and unpackaged classes. To use components in namespaces, use the include-namespaces option.
If the components are in packages, ensure that you use dot-notation rather than slashes to separate package levels.
This is the default option for the component compiler.
public List<String> getIncludeClasses()
public void setIncludeFiles(ConfigurationValue cv, List<String> values) throws ConfigurationException.IncorrectArgumentCount, ConfigurationException.CannotOpen, ConfigurationException.RedundantFile
If you add a stylesheet that references compiled resources such as programmatic skins, use the include-stylesheet option.
If you use the [Embed] syntax to add a resource to your application, you are not required to use this option to also link it into the SWC file.
public Map<String,String> getIncludeFiles()
public void setIncludeLookupOnly(ConfigurationValue cv, boolean value)
public boolean getIncludeLookupOnly()
public void setIncludeNamespaces(ConfigurationValue cv, List<String> values)
To use components in packages, use the include-classes option.
public List<String> getIncludeNamespaces()
public void setIncludeSources(ConfigurationValue cv, List<String> values) throws ConfigurationException.NotAFile
If you specify a directory, this option includes all files with an MXML or AS extension, and ignores all other files.
If you use this option to include MXML components that are in a non-default package, you must include the source folder in the source path.
ConfigurationException.NotAFile
public List<String> getIncludeSources()
public void setIncludeStyleSheets(ConfigurationValue cv, List<String> values) throws ConfigurationException.NotAFile
You do not need to use this option for all stylesheets; only stylesheets that reference assets that need to be compiled such as programmatic skins or other class files. If your stylesheet does not reference compiled assets, you can use the include-file option.
This option does not compile the stylesheet into a SWF file before including it in the SWC file. You compile a CSS file into a SWF file when you want to load it at run time.
ConfigurationException.NotAFile
public List<String> getIncludeStyleSheets()
public void setDependencyGraphOutput(ConfigurationValue cv, String fileName)
public File getDependencyGraphOutput()
public String getOutput()
public void setOutput(ConfigurationValue val, String output) throws ConfigurationException
ConfigurationException
public String getDumpConfig()
public void setDumpConfig(ConfigurationValue cv, String filename)
public boolean getWarnings()
public void setWarnings(ConfigurationValue cv, boolean b)
public Collection<Class<ICompilerProblem>> getErrorProblems()
public void setErrorProblems(ConfigurationValue cv, List<String> classNames) throws ConfigurationException
ConfigurationException
public Collection<Class<ICompilerProblem>> getWarningProblems()
public void setWarningProblems(ConfigurationValue cv, List<String> classNames) throws ConfigurationException
ConfigurationException
public Collection<Class<ICompilerProblem>> getIgnoreProblems()
public void setIgnoreProblems(ConfigurationValue cv, List<String> classNames) throws ConfigurationException
ConfigurationException
public boolean useLegacyMessageFormat()
public void setLegacyMessageFormat(ConfigurationValue cv, boolean value) throws ConfigurationException
ConfigurationException
public boolean getCreateTargetWithErrors()
public void setCreateTargetWithErrors(ConfigurationValue cv, boolean value) throws ConfigurationException
ConfigurationException
public boolean isFlex()
public void setFlex(ConfigurationValue cv, boolean value) throws ConfigurationException
ConfigurationException
public boolean isExcludeNativeJSLibraries()
public void setExcludeNativeJSLibraries(ConfigurationValue cv, boolean value) throws ConfigurationException
ConfigurationException
public String getTargetFile()
getFileSpecs()
.public String getTargetFileDirectory()
public void setTargetFile(String mainFile)
public List<String> getFileSpecs()
public void setFileSpecs(ConfigurationValue cv, List<String> args) throws ConfigurationException
ConfigurationException
public void setHelp(ConfigurationValue cv, String[] keywords)
public String getLoadConfig()
public void setLoadConfig(ConfigurationValue cv, String filename) throws ConfigurationException
ConfigurationBuffer
loads the "load-config" files, the value of this configuration option isn't
intersting to the rest part of the compiler.ConfigurationException
public void setVersion(ConfigurationValue cv, boolean value)
public boolean isVerbose()
public void setVerbose(ConfigurationValue cfgval, boolean b)
public boolean isDumpAst()
public void setDumpAst(ConfigurationValue cfgval, boolean b)
public boolean isInliningEnabled()
public void setEnableInlining(ConfigurationValue cfgval, boolean b)
cfgval
- The configuration value context.b
- true to enable inlining, false otherwise.public boolean getRemoveDeadCode()
public void setRemoveDeadCode(ConfigurationValue cfgval, boolean b)
cfgval
- the configuration value context.b
- true to enable dead code removal, false to disable.public Collection<ICompilerProblem> getConfigurationProblems()
public boolean getWarnOnFlexOnlyOptionUsage()
public void setWarnOnFlexOnlyOptionUsage(boolean value)
value
- True to enable warnings, false to disable warnings. The default is to not warn.public boolean isEnableTelemetry()
public void setEnableTelemetry(boolean enableTelemetry)
enableTelemetry
- True to enable telemetry, false to disable. The default ist to disable.public void setEnableTelemetry(ConfigurationValue cv, boolean enableTelemetry) throws ConfigurationException.CannotOpen
public boolean isStrictXML()
public void setStrictXML(boolean strictXML)
strictXML
- True to enable strict XML checking, false to disable. The default is to disable.public void setStrictXML(ConfigurationValue cv, boolean strictXML) throws ConfigurationException.CannotOpen
Copyright © 2016 The Apache Software Foundation. All rights reserved.