JS: make -meta-info cli option boolean
This commit is contained in:
@@ -54,8 +54,7 @@ public abstract class Config {
|
||||
private final String moduleId;
|
||||
|
||||
private final boolean sourcemap;
|
||||
@Nullable
|
||||
private final String metaFileOutputPath;
|
||||
private final boolean metaInfo;
|
||||
|
||||
@NotNull
|
||||
protected final List<KotlinJavascriptMetadata> metadata = new SmartList<KotlinJavascriptMetadata>();
|
||||
@@ -71,23 +70,22 @@ public abstract class Config {
|
||||
@NotNull EcmaVersion ecmaVersion,
|
||||
boolean sourcemap,
|
||||
boolean inlineEnabled,
|
||||
@Nullable String metaFileOutputPath
|
||||
boolean metaInfo
|
||||
) {
|
||||
this.project = project;
|
||||
this.target = ecmaVersion;
|
||||
this.moduleId = moduleId;
|
||||
this.sourcemap = sourcemap;
|
||||
this.inlineEnabled = inlineEnabled;
|
||||
this.metaFileOutputPath = metaFileOutputPath;
|
||||
this.metaInfo = metaInfo;
|
||||
}
|
||||
|
||||
public boolean isSourcemap() {
|
||||
return sourcemap;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getMetaInfo() {
|
||||
return metaFileOutputPath;
|
||||
public boolean isMetaInfo() {
|
||||
return metaInfo;
|
||||
}
|
||||
|
||||
public boolean isInlineEnabled() {
|
||||
|
||||
@@ -71,9 +71,9 @@ public class LibrarySourcesConfig extends Config {
|
||||
boolean sourceMap,
|
||||
boolean inlineEnabled,
|
||||
boolean isUnitTestConfig,
|
||||
@Nullable String metaFileOutputPath
|
||||
boolean metaInfo
|
||||
) {
|
||||
super(project, moduleId, ecmaVersion, sourceMap, inlineEnabled, metaFileOutputPath);
|
||||
super(project, moduleId, ecmaVersion, sourceMap, inlineEnabled, metaInfo);
|
||||
this.files = files;
|
||||
this.isUnitTestConfig = isUnitTestConfig;
|
||||
}
|
||||
@@ -186,7 +186,7 @@ public class LibrarySourcesConfig extends Config {
|
||||
boolean sourceMap = false;
|
||||
boolean inlineEnabled = true;
|
||||
boolean isUnitTestConfig = false;
|
||||
String metaFileOutputPath;
|
||||
boolean metaInfo = false;
|
||||
|
||||
public Builder(@NotNull Project project, @NotNull String moduleId, @NotNull List<String> files) {
|
||||
this.project = project;
|
||||
@@ -214,13 +214,13 @@ public class LibrarySourcesConfig extends Config {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder metaFileOutputPath(@Nullable String metaFileOutputPath) {
|
||||
this.metaFileOutputPath = metaFileOutputPath;
|
||||
public Builder metaInfo(boolean metaInfo) {
|
||||
this.metaInfo = metaInfo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Config build() {
|
||||
return new LibrarySourcesConfig(project, moduleId, files, ecmaVersion, sourceMap, inlineEnabled, isUnitTestConfig, metaFileOutputPath);
|
||||
return new LibrarySourcesConfig(project, moduleId, files, ecmaVersion, sourceMap, inlineEnabled, isUnitTestConfig, metaInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user