2
0
Fork 0
mirror of https://github.com/ethauvin/bld.git synced 2025-04-26 16:38:11 -07:00

Test fixes for changed dependency versions.

Tweaked vscode project structures.
Changed lib project to use JUnit and extend Project instead of BaseProject
This commit is contained in:
Geert Bevin 2024-02-25 12:42:24 -05:00
parent 183097c4f9
commit 30101af0ab
18 changed files with 240 additions and 424 deletions

View file

@ -13,6 +13,7 @@ import java.util.List;
import static rife.bld.dependencies.Repository.MAVEN_CENTRAL;
import static rife.bld.dependencies.Repository.SONATYPE_SNAPSHOTS;
import static rife.bld.dependencies.Scope.test;
/**
* Provides the dependency information required to create a new lib project.
@ -35,5 +36,8 @@ public class LibProjectBlueprint extends Project {
downloadSources = true;
repositories = List.of(MAVEN_CENTRAL, SONATYPE_SNAPSHOTS);
scope(test)
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5,10,2)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1,10,2)));
}
}

View file

@ -40,7 +40,7 @@ public class Rife2ProjectBlueprint extends WebProject {
scope(compile)
.include(dependency("com.uwyn.rife2", "rife2", version(1,7,3)));
scope(test)
.include(dependency("org.jsoup", "jsoup", version(1,17,3)))
.include(dependency("org.jsoup", "jsoup", version(1,17,2)))
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5,10,2)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1,10,2)));
scope(standalone)

View file

@ -206,8 +206,12 @@ public abstract class AbstractCreateOperation<T extends AbstractCreateOperation<
// project build
var build_template = TemplateFactory.TXT.get(templateBase_ + "project_build");
build_template.setValue("projectBuild", projectBuildName_);
build_template.setValue("package", project_.pkg());
build_template.setValue("project", projectClassName_);
if (build_template.hasValueId("package")) {
build_template.setValue("package", project_.pkg());
}
if (build_template.hasValueId("project")) {
build_template.setValue("project", projectClassName_);
}
if (build_template.hasValueId("projectMain")) {
build_template.setValue("projectMain", projectMainName_);
}
@ -326,17 +330,6 @@ public abstract class AbstractCreateOperation<T extends AbstractCreateOperation<
*/
protected void executePopulateVscodeProject()
throws FileUtilsErrorException {
var launch_template = TemplateFactory.JSON.get(templateBase_ + "vscode.launch");
launch_template.setValue("package", project_.pkg());
if (launch_template.hasValueId("projectMain")) {
launch_template.setValue("projectMain", projectMainName_);
}
if (launch_template.hasValueId("projectTest")) {
launch_template.setValue("projectTest", projectTestName_);
}
var launch_file = new File(vscodeDirectory_, "launch.json");
FileUtils.writeString(launch_template.getContent(), launch_file);
var settings_template = TemplateFactory.JSON.get(templateBase_ + "vscode.settings");
if (settings_template.hasValueId("version")) {
settings_template.setValue("version", BldVersion.getVersion());