mirror of
https://github.com/ethauvin/bld.git
synced 2025-04-26 08:37: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:
parent
183097c4f9
commit
30101af0ab
18 changed files with 240 additions and 424 deletions
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Run Main",
|
||||
"request": "launch",
|
||||
"mainClass": "{{v package/}}.{{v projectMain/}}"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Run Tests",
|
||||
"request": "launch",
|
||||
"mainClass": "org.junit.platform.console.ConsoleLauncher",
|
||||
"args": [
|
||||
"--details=verbose",
|
||||
"--scan-classpath",
|
||||
"--disable-banner",
|
||||
"--disable-ansi-colors",
|
||||
"--exclude-engine=junit-platform-suite",
|
||||
"--exclude-engine=junit-vintage"]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -8,6 +8,7 @@
|
|||
"java.configuration.updateBuildConfiguration": "automatic",
|
||||
"java.project.referencedLibraries": [
|
||||
"${HOME}/.bld/dist/bld-{{v version/}}.jar",
|
||||
"lib/bld/*.jar",
|
||||
"lib/compile/*.jar",
|
||||
"lib/provided/*.jar",
|
||||
"lib/runtime/*.jar",
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Run Main",
|
||||
"request": "launch",
|
||||
"mainClass": "{{v package/}}.{{v projectMain/}}"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Run Tests",
|
||||
"request": "launch",
|
||||
"mainClass": "{{v package/}}.{{v projectTest/}}"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -8,6 +8,7 @@
|
|||
"java.configuration.updateBuildConfiguration": "automatic",
|
||||
"java.project.referencedLibraries": [
|
||||
"${HOME}/.bld/dist/bld-{{v version/}}.jar",
|
||||
"lib/bld/*.jar",
|
||||
"lib/compile/*.jar",
|
||||
"lib/provided/*.jar",
|
||||
"lib/runtime/*.jar",
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Run Tests" type="Application" factoryName="Application" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="{{v package/}}.{{v projectTest/}}" />
|
||||
<configuration default="false" name="Run Tests" type="JUnit" factoryName="JUnit">
|
||||
<module name="app" />
|
||||
<option name="PACKAGE_NAME" value="moog" />
|
||||
<option name="MAIN_CLASS_NAME" value="{{v package/}}" />
|
||||
<option name="METHOD_NAME" value="" />
|
||||
<option name="TEST_OBJECT" value="directory" />
|
||||
<dir value="$PROJECT_DIR$/src/test/java" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
|
|
|
@ -1,17 +1,23 @@
|
|||
package {{v package/}};
|
||||
|
||||
import rife.bld.BaseProject;
|
||||
import rife.bld.Project;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class {{v projectBuild/}} extends BaseProject {
|
||||
import static rife.bld.dependencies.Repository.*;
|
||||
import static rife.bld.dependencies.Scope.*;
|
||||
|
||||
public class {{v projectBuild/}} extends Project {
|
||||
public {{v projectBuild/}}() {
|
||||
pkg = "{{v package/}}";
|
||||
name = "{{v project/}}";
|
||||
version = version(0,1,0);
|
||||
|
||||
testOperation().mainClass("{{v package/}}.{{v projectTest/}}");
|
||||
}
|
||||
downloadSources = true;
|
||||
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);
|
||||
{{v scopes}}{{/v}}{{b scope}} scope({{v name/}}){{v dependencies}}{{/v}};
|
||||
{{b dependency}}
|
||||
.include(dependency("{{v groupId/}}", "{{v artifactId/}}", version({{v version/}}))){{/b}}{{/b}} }
|
||||
|
||||
public static void main(String[] args) {
|
||||
new {{v projectBuild/}}().start(args);
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
package {{v package/}};
|
||||
|
||||
public class {{v projectTest/}} {
|
||||
void verifyHello() {
|
||||
if (!"Hello World!".equals(new {{v projectMain/}}().getMessage())) {
|
||||
throw new AssertionError();
|
||||
} else {
|
||||
System.out.println("Succeeded");
|
||||
}
|
||||
}
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public static void main(String[] args) {
|
||||
new {{v projectTest/}}().verifyHello();
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
public class {{v projectTest/}} {
|
||||
@Test
|
||||
void verifyHello() {
|
||||
assertEquals("Hello World!", new {{v projectMain/}}().getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Run Tests",
|
||||
"request": "launch",
|
||||
"mainClass": "{{v package/}}.{{v projectTest/}}"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -8,6 +8,7 @@
|
|||
"java.configuration.updateBuildConfiguration": "automatic",
|
||||
"java.project.referencedLibraries": [
|
||||
"${HOME}/.bld/dist/bld-{{v version/}}.jar",
|
||||
"lib/bld/*.jar",
|
||||
"lib/compile/*.jar",
|
||||
"lib/provided/*.jar",
|
||||
"lib/runtime/*.jar",
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Run Main",
|
||||
"request": "launch",
|
||||
"mainClass": "{{v package/}}.{{v projectMain/}}"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Run Tests",
|
||||
"request": "launch",
|
||||
"mainClass": "org.junit.platform.console.ConsoleLauncher",
|
||||
"args": [
|
||||
"--details=verbose",
|
||||
"--scan-classpath",
|
||||
"--disable-banner",
|
||||
"--disable-ansi-colors",
|
||||
"--exclude-engine=junit-platform-suite",
|
||||
"--exclude-engine=junit-vintage"]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -9,6 +9,7 @@
|
|||
"java.configuration.updateBuildConfiguration": "automatic",
|
||||
"java.project.referencedLibraries": [
|
||||
"${HOME}/.bld/dist/bld-{{v version/}}.jar",
|
||||
"lib/bld/*.jar",
|
||||
"lib/compile/*.jar",
|
||||
"lib/provided/*.jar",
|
||||
"lib/runtime/*.jar",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue