RunConfigSettings.generateIDEConfig -> ideConfigGenerated + normal getter/setter (#349)
parent
da6a50d558
commit
737c6cbd4f
|
@ -97,7 +97,7 @@ public final class RunConfigSettings implements Named {
|
||||||
*
|
*
|
||||||
* <p>By default only run configs on the root project will be generated.
|
* <p>By default only run configs on the root project will be generated.
|
||||||
*/
|
*/
|
||||||
private boolean generateIDEConfig;
|
private boolean ideConfigGenerated;
|
||||||
|
|
||||||
private final Project project;
|
private final Project project;
|
||||||
private final LoomGradleExtension extension;
|
private final LoomGradleExtension extension;
|
||||||
|
@ -106,7 +106,7 @@ public final class RunConfigSettings implements Named {
|
||||||
this.baseName = baseName;
|
this.baseName = baseName;
|
||||||
this.project = project;
|
this.project = project;
|
||||||
this.extension = project.getExtensions().getByType(LoomGradleExtension.class);
|
this.extension = project.getExtensions().getByType(LoomGradleExtension.class);
|
||||||
this.generateIDEConfig = extension.isRootProject();
|
this.ideConfigGenerated = extension.isRootProject();
|
||||||
|
|
||||||
source("main");
|
source("main");
|
||||||
runDir("run");
|
runDir("run");
|
||||||
|
@ -240,8 +240,8 @@ public final class RunConfigSettings implements Named {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void generateIDEConfig(boolean generateIDEConfig) {
|
public void ideConfigGenerated(boolean ideConfigGenerated) {
|
||||||
this.generateIDEConfig = generateIDEConfig;
|
this.ideConfigGenerated = ideConfigGenerated;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -300,7 +300,11 @@ public final class RunConfigSettings implements Named {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean shouldGenerateIDEConfig() {
|
public boolean isIdeConfigGenerated() {
|
||||||
return generateIDEConfig;
|
return ideConfigGenerated;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIdeConfigGenerated(boolean ideConfigGenerated) {
|
||||||
|
this.ideConfigGenerated = ideConfigGenerated;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class SetupIntelijRunConfigs {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (RunConfigSettings settings : extension.getRunConfigs()) {
|
for (RunConfigSettings settings : extension.getRunConfigs()) {
|
||||||
if (!settings.shouldGenerateIDEConfig()) {
|
if (!settings.isIdeConfigGenerated()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class GenEclipseRunsTask extends AbstractLoomTask {
|
||||||
LoomGradleExtension extension = getExtension();
|
LoomGradleExtension extension = getExtension();
|
||||||
|
|
||||||
for (RunConfigSettings settings : extension.getRunConfigs()) {
|
for (RunConfigSettings settings : extension.getRunConfigs()) {
|
||||||
if (!settings.shouldGenerateIDEConfig()) {
|
if (!settings.isIdeConfigGenerated()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class GenIdeaProjectTask extends AbstractLoomTask {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (RunConfigSettings settings : getExtension().getRunConfigs()) {
|
for (RunConfigSettings settings : getExtension().getRunConfigs()) {
|
||||||
if (!settings.shouldGenerateIDEConfig()) {
|
if (!settings.isIdeConfigGenerated()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class GenVsCodeProjectTask extends AbstractLoomTask {
|
||||||
VsCodeLaunch launch = new VsCodeLaunch();
|
VsCodeLaunch launch = new VsCodeLaunch();
|
||||||
|
|
||||||
for (RunConfigSettings settings : getExtension().getRunConfigs()) {
|
for (RunConfigSettings settings : getExtension().getRunConfigs()) {
|
||||||
if (!settings.shouldGenerateIDEConfig()) {
|
if (!settings.isIdeConfigGenerated()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue