mirror of
https://github.com/ethauvin/rife2-hello.git
synced 2025-04-25 23:37:12 -07:00
Minor cleanup
This commit is contained in:
parent
d954e75cf5
commit
269971663b
2 changed files with 6 additions and 9 deletions
|
@ -43,10 +43,10 @@ public class Rife2Plugin implements Plugin<Project> {
|
|||
|
||||
public static final String DEFAULT_TEMPLATES_DIR = "src/main/templates";
|
||||
public static final String DEFAULT_GENERATED_RIFE2_CLASSES_DIR = "generated/classes/rife2";
|
||||
public static final String WEBAPP_SRCDIR = "src/main/webapp";
|
||||
|
||||
public static final String RIFE2_GROUP = "rife2";
|
||||
|
||||
public static final String WEBAPP_SRCDIR = "src/main/webapp";
|
||||
|
||||
@Override
|
||||
public void apply(Project project) {
|
||||
var plugins = project.getPlugins();
|
||||
|
@ -201,7 +201,7 @@ public class Rife2Plugin implements Plugin<Project> {
|
|||
Configuration rife2CompilerClasspath) {
|
||||
return project.getTasks().register("precompileTemplates", PrecompileTemplates.class, task -> {
|
||||
task.setGroup(RIFE2_GROUP);
|
||||
task.setDescription("Pre-compile the templates.");
|
||||
task.setDescription("Pre-compiles the templates.");
|
||||
task.getVerbose().convention(true);
|
||||
task.getClasspath().from(rife2CompilerClasspath);
|
||||
task.getType().convention("html");
|
||||
|
@ -214,7 +214,7 @@ public class Rife2Plugin implements Plugin<Project> {
|
|||
Configuration rife2CompilerClasspath) {
|
||||
project.getTasks().register("run", RunTask.class, task -> {
|
||||
task.setGroup(RIFE2_GROUP);
|
||||
task.setDescription("Runs this project as an application.");
|
||||
task.setDescription("Runs this project as a web application.");
|
||||
task.getAgentClassPath().set(rife2CompilerClasspath.getAsPath());
|
||||
task.getClasspath().from(project.getExtensions().getByType(SourceSetContainer.class)
|
||||
.getByName(SourceSet.MAIN_SOURCE_SET_NAME).getRuntimeClasspath());
|
||||
|
|
|
@ -23,7 +23,6 @@ import org.gradle.api.tasks.*;
|
|||
import org.gradle.process.ExecOperations;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@CacheableTask
|
||||
|
@ -49,9 +48,7 @@ public abstract class RunTask extends DefaultTask {
|
|||
getExecOperations().javaexec(run -> {
|
||||
run.setClasspath(getProject().getObjects().fileCollection().from(getTemplatesDirectory()).plus(getClasspath()));
|
||||
run.getMainClass().set(getMainClass());
|
||||
List<String> args = new ArrayList<>();
|
||||
args.add("-javaagent:" + getAgentClassPath().get());
|
||||
run.args(args);
|
||||
run.args(List.of("-javaagent:" + getAgentClassPath().get()));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue