use of io.vertx.starter.model.BuildTool.GRADLE in project vertx-starter by vert-x3.
the class GeneratorTest method testProject.
private void testProject(VertxProject project, Vertx vertx, VertxTestContext testContext) {
vertx.eventBus().<Buffer>request(Topics.PROJECT_REQUESTED, project, testContext.succeeding(msg -> {
unpack(vertx, testContext, workdir, msg.body(), testContext.succeeding(unpacked -> {
testContext.verify(() -> {
verifyBaseFiles();
BuildTool buildTool = project.getBuildTool();
Language language = project.getLanguage();
if (buildTool == MAVEN) {
verifyMavenFiles();
} else if (buildTool == GRADLE) {
verifyGradleFiles(language);
} else {
testContext.failNow(new NoStackTraceThrowable(unsupported(buildTool)));
return;
}
try {
verifySourceFiles(language);
} catch (IOException e) {
throw new AssertionError(e);
}
if (Utils.isWindows()) {
testContext.completeNow();
} else {
buildProject(vertx, buildTool, testContext.succeeding(projectBuilt -> {
testContext.verify(() -> {
if (buildTool == MAVEN) {
try {
verifyMavenOutputFiles();
} catch (IOException e) {
throw new AssertionError(e);
}
} else if (buildTool == GRADLE) {
try {
verifyGradleOutputFiles();
} catch (IOException e) {
throw new AssertionError(e);
}
} else {
testContext.failNow(new NoStackTraceThrowable(unsupported(buildTool)));
}
runDevMode(vertx, buildTool, testContext.succeeding(devModeRan -> testContext.completeNow()));
});
}));
}
});
}));
}));
}
Aggregations