RunConfigSettings.generateIDEConfig -> ideConfigGenerated + normal getter/setter (#349)

dev/0.11
Juuxel 2021-02-12 20:43:05 +02:00 committed by GitHub
parent da6a50d558
commit 737c6cbd4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 10 deletions

View File

@ -97,7 +97,7 @@ public final class RunConfigSettings implements Named {
*
* <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 LoomGradleExtension extension;
@ -106,7 +106,7 @@ public final class RunConfigSettings implements Named {
this.baseName = baseName;
this.project = project;
this.extension = project.getExtensions().getByType(LoomGradleExtension.class);
this.generateIDEConfig = extension.isRootProject();
this.ideConfigGenerated = extension.isRootProject();
source("main");
runDir("run");
@ -240,8 +240,8 @@ public final class RunConfigSettings implements Named {
});
}
public void generateIDEConfig(boolean generateIDEConfig) {
this.generateIDEConfig = generateIDEConfig;
public void ideConfigGenerated(boolean ideConfigGenerated) {
this.ideConfigGenerated = ideConfigGenerated;
}
/**
@ -300,7 +300,11 @@ public final class RunConfigSettings implements Named {
}
}
public boolean shouldGenerateIDEConfig() {
return generateIDEConfig;
public boolean isIdeConfigGenerated() {
return ideConfigGenerated;
}
public void setIdeConfigGenerated(boolean ideConfigGenerated) {
this.ideConfigGenerated = ideConfigGenerated;
}
}

View File

@ -72,7 +72,7 @@ public class SetupIntelijRunConfigs {
}
for (RunConfigSettings settings : extension.getRunConfigs()) {
if (!settings.shouldGenerateIDEConfig()) {
if (!settings.isIdeConfigGenerated()) {
continue;
}

View File

@ -43,7 +43,7 @@ public class GenEclipseRunsTask extends AbstractLoomTask {
LoomGradleExtension extension = getExtension();
for (RunConfigSettings settings : extension.getRunConfigs()) {
if (!settings.shouldGenerateIDEConfig()) {
if (!settings.isIdeConfigGenerated()) {
continue;
}

View File

@ -84,7 +84,7 @@ public class GenIdeaProjectTask extends AbstractLoomTask {
}
for (RunConfigSettings settings : getExtension().getRunConfigs()) {
if (!settings.shouldGenerateIDEConfig()) {
if (!settings.isIdeConfigGenerated()) {
continue;
}

View File

@ -64,7 +64,7 @@ public class GenVsCodeProjectTask extends AbstractLoomTask {
VsCodeLaunch launch = new VsCodeLaunch();
for (RunConfigSettings settings : getExtension().getRunConfigs()) {
if (!settings.shouldGenerateIDEConfig()) {
if (!settings.isIdeConfigGenerated()) {
continue;
}