8484import com .fasterxml .jackson .core .JsonProcessingException ;
8585import com .fasterxml .jackson .databind .JsonNode ;
8686import com .fasterxml .jackson .databind .ObjectMapper ;
87+ import com .fasterxml .jackson .databind .node .ArrayNode ;
8788import com .networknt .schema .JsonSchema ;
8889import com .networknt .schema .JsonSchemaFactory ;
8990import com .networknt .schema .SpecVersion .VersionFlag ;
@@ -104,6 +105,7 @@ public class ASConfigC {
104105 private static final String FILE_NAME_BIN_JS_DEBUG = "bin/js-debug" ;
105106 private static final String FILE_NAME_BIN_JS_RELEASE = "bin/js-release" ;
106107 private static final Pattern COMPILER_OPTION_OUTPUT_PATTERN = Pattern .compile ("^-{1,2}output\\ b" );
108+ private static final String TARGET_SWF = "SWF" ;
107109
108110 public static void main (String [] args ) {
109111 CommandLineParser parser = new DefaultParser ();
@@ -864,6 +866,12 @@ private void readCompilerOptions(JsonNode compilerOptionsJson) throws ASConfigCE
864866 }
865867 if (compilerOptionsJson .has (CompilerOptions .TARGETS )) {
866868 configRequiresRoyale = true ;
869+
870+ JsonNode targetsJson = compilerOptionsJson .get (CompilerOptions .TARGETS );
871+ if (targetsJson .isArray ()) {
872+ ArrayNode targetsArray = (ArrayNode ) targetsJson ;
873+ isSWFTargetOnly = targetsArray .size () == 1 && targetsArray .get (0 ).asText ().equals (TARGET_SWF );
874+ }
867875 }
868876 if (compilerOptionsJson .has (CompilerOptions .SOURCE_MAP )) {
869877 // source-map compiler option is supported by Royale
0 commit comments