name.remal.gradle_plugins.idea_settings.IdeaRunConfigurationsSettings Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of idea-settings Show documentation
Show all versions of idea-settings Show documentation
Remal Gradle plugins: idea-settings
The newest version!
package name.remal.gradle_plugins.idea_settings;
import static name.remal.gradle_plugins.toolkit.PropertiesConventionUtils.setPropertyConvention;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;
import lombok.Getter;
import lombok.Setter;
import org.gradle.api.Action;
import org.gradle.api.JavaVersion;
import org.gradle.api.Project;
@Getter
@Setter
public class IdeaRunConfigurationsSettings {
private final IdeaJavaAppRunConfigurationsSettings javaApplication;
public void javaApplication(Action action) {
action.execute(javaApplication);
}
@Getter
@Setter
public static class IdeaJavaAppRunConfigurationsSettings {
private JavaVersion javaVersion = JavaVersion.current();
private List jvmParameters = new ArrayList<>();
private Boolean shortenCommandLine;
}
@Inject
public IdeaRunConfigurationsSettings(Project project) {
this.javaApplication = project.getObjects().newInstance(IdeaJavaAppRunConfigurationsSettings.class);
setPropertyConvention(
this.javaApplication,
"shortenCommandLine",
it -> it.getJavaVersion().isJava9Compatible()
);
}
}