mirror of
https://github.com/ethauvin/bld.git
synced 2025-04-25 00:07:12 -07:00
More vscode tweaks
This commit is contained in:
parent
30101af0ab
commit
e6feeff0da
13 changed files with 115 additions and 25 deletions
|
@ -330,6 +330,17 @@ 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());
|
||||
|
|
24
src/main/resources/templates/bld/app/vscode/launch.json
Normal file
24
src/main/resources/templates/bld/app/vscode/launch.json
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"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"]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -3,15 +3,12 @@
|
|||
"src/main/java",
|
||||
"src/main/resources",
|
||||
"src/test/java",
|
||||
"src/bld/java"
|
||||
"src/bld/java",
|
||||
"src/bld/resources"
|
||||
],
|
||||
"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",
|
||||
"lib/test/*.jar"
|
||||
"lib/**/*.jar",
|
||||
]
|
||||
}
|
||||
|
|
17
src/main/resources/templates/bld/base/vscode/launch.json
Normal file
17
src/main/resources/templates/bld/base/vscode/launch.json
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"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/}}"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -3,15 +3,12 @@
|
|||
"src/main/java",
|
||||
"src/main/resources",
|
||||
"src/test/java",
|
||||
"src/bld/java"
|
||||
"src/bld/java",
|
||||
"src/bld/resources"
|
||||
],
|
||||
"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",
|
||||
"lib/test/*.jar"
|
||||
"lib/**/*.jar",
|
||||
]
|
||||
}
|
||||
|
|
11
src/main/resources/templates/bld/lib/vscode/launch.json
Normal file
11
src/main/resources/templates/bld/lib/vscode/launch.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Run Tests",
|
||||
"request": "launch",
|
||||
"mainClass": "{{v package/}}.{{v projectTest/}}"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -3,15 +3,12 @@
|
|||
"src/main/java",
|
||||
"src/main/resources",
|
||||
"src/test/java",
|
||||
"src/bld/java"
|
||||
"src/bld/java",
|
||||
"src/bld/resources"
|
||||
],
|
||||
"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",
|
||||
"lib/test/*.jar"
|
||||
"lib/**/*.jar",
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"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"]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -4,16 +4,12 @@
|
|||
"src/main/resources",
|
||||
"src/main/webapp",
|
||||
"src/test/java",
|
||||
"src/bld/java"
|
||||
"src/bld/java",
|
||||
"src/bld/resources"
|
||||
],
|
||||
"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",
|
||||
"lib/standalone/*.jar",
|
||||
"lib/test/*.jar"
|
||||
"lib/**/*.jar",
|
||||
]
|
||||
}
|
||||
|
|
|
@ -86,6 +86,7 @@ public class TestCreateAppOperation {
|
|||
/myapp/\\.idea/runConfigurations/Run Main\\.xml
|
||||
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
|
||||
/myapp/\\.vscode
|
||||
/myapp/\\.vscode/launch\\.json
|
||||
/myapp/\\.vscode/settings\\.json
|
||||
/myapp/bld
|
||||
/myapp/bld\\.bat
|
||||
|
@ -156,6 +157,7 @@ public class TestCreateAppOperation {
|
|||
/myapp/\\.idea/runConfigurations/Run Main\\.xml
|
||||
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
|
||||
/myapp/\\.vscode
|
||||
/myapp/\\.vscode/launch\\.json
|
||||
/myapp/\\.vscode/settings\\.json
|
||||
/myapp/bld
|
||||
/myapp/bld\\.bat
|
||||
|
@ -257,6 +259,7 @@ public class TestCreateAppOperation {
|
|||
/yourthing/.idea/runConfigurations/Run Main.xml
|
||||
/yourthing/.idea/runConfigurations/Run Tests.xml
|
||||
/yourthing/.vscode
|
||||
/yourthing/.vscode/launch.json
|
||||
/yourthing/.vscode/settings.json
|
||||
/yourthing/bld
|
||||
/yourthing/bld.bat
|
||||
|
@ -353,6 +356,7 @@ public class TestCreateAppOperation {
|
|||
/myapp/\\.idea/runConfigurations/Run Main\\.xml
|
||||
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
|
||||
/myapp/\\.vscode
|
||||
/myapp/\\.vscode/launch\\.json
|
||||
/myapp/\\.vscode/settings\\.json
|
||||
/myapp/bld
|
||||
/myapp/bld\\.bat
|
||||
|
@ -473,6 +477,7 @@ public class TestCreateAppOperation {
|
|||
/myapp/\\.idea/runConfigurations/Run Main\\.xml
|
||||
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
|
||||
/myapp/\\.vscode
|
||||
/myapp/\\.vscode/launch\\.json
|
||||
/myapp/\\.vscode/settings\\.json
|
||||
/myapp/bld
|
||||
/myapp/bld\\.bat
|
||||
|
|
|
@ -79,6 +79,7 @@ public class TestCreateBaseOperation {
|
|||
/myapp/\\.idea/runConfigurations/Run Main\\.xml
|
||||
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
|
||||
/myapp/\\.vscode
|
||||
/myapp/\\.vscode/launch\\.json
|
||||
/myapp/\\.vscode/settings\\.json
|
||||
/myapp/bld
|
||||
/myapp/bld\\.bat
|
||||
|
@ -131,6 +132,7 @@ public class TestCreateBaseOperation {
|
|||
/myapp/\\.idea/runConfigurations/Run Main\\.xml
|
||||
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
|
||||
/myapp/\\.vscode
|
||||
/myapp/\\.vscode/launch\\.json
|
||||
/myapp/\\.vscode/settings\\.json
|
||||
/myapp/bld
|
||||
/myapp/bld\\.bat
|
||||
|
@ -214,6 +216,7 @@ public class TestCreateBaseOperation {
|
|||
/yourthing/.idea/runConfigurations/Run Main.xml
|
||||
/yourthing/.idea/runConfigurations/Run Tests.xml
|
||||
/yourthing/.vscode
|
||||
/yourthing/.vscode/launch.json
|
||||
/yourthing/.vscode/settings.json
|
||||
/yourthing/bld
|
||||
/yourthing/bld.bat
|
||||
|
@ -267,6 +270,7 @@ public class TestCreateBaseOperation {
|
|||
/yourthing/.idea/runConfigurations/Run Main.xml
|
||||
/yourthing/.idea/runConfigurations/Run Tests.xml
|
||||
/yourthing/.vscode
|
||||
/yourthing/.vscode/launch.json
|
||||
/yourthing/.vscode/settings.json
|
||||
/yourthing/bld
|
||||
/yourthing/bld.bat
|
||||
|
|
|
@ -78,6 +78,7 @@ public class TestCreateLibOperation {
|
|||
/myapp/\\.idea/runConfigurations
|
||||
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
|
||||
/myapp/\\.vscode
|
||||
/myapp/\\.vscode/launch\\.json
|
||||
/myapp/\\.vscode/settings\\.json
|
||||
/myapp/bld
|
||||
/myapp/bld\\.bat
|
||||
|
@ -147,6 +148,7 @@ public class TestCreateLibOperation {
|
|||
/myapp/\\.idea/runConfigurations
|
||||
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
|
||||
/myapp/\\.vscode
|
||||
/myapp/\\.vscode/launch\\.json
|
||||
/myapp/\\.vscode/settings\\.json
|
||||
/myapp/bld
|
||||
/myapp/bld\\.bat
|
||||
|
|
|
@ -91,6 +91,7 @@ public class TestCreateRife2Operation {
|
|||
/myapp/\\.idea/runConfigurations/Run Main\\.xml
|
||||
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
|
||||
/myapp/\\.vscode
|
||||
/myapp/\\.vscode/launch\\.json
|
||||
/myapp/\\.vscode/settings\\.json
|
||||
/myapp/bld
|
||||
/myapp/bld\\.bat
|
||||
|
@ -194,6 +195,7 @@ public class TestCreateRife2Operation {
|
|||
/myapp/\\.idea/runConfigurations/Run Main\\.xml
|
||||
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
|
||||
/myapp/\\.vscode
|
||||
/myapp/\\.vscode/launch\\.json
|
||||
/myapp/\\.vscode/settings\\.json
|
||||
/myapp/bld
|
||||
/myapp/bld\\.bat
|
||||
|
@ -336,6 +338,7 @@ public class TestCreateRife2Operation {
|
|||
/yourthing/.idea/runConfigurations/Run Main.xml
|
||||
/yourthing/.idea/runConfigurations/Run Tests.xml
|
||||
/yourthing/.vscode
|
||||
/yourthing/.vscode/launch.json
|
||||
/yourthing/.vscode/settings.json
|
||||
/yourthing/bld
|
||||
/yourthing/bld.bat
|
||||
|
@ -446,6 +449,7 @@ public class TestCreateRife2Operation {
|
|||
/myapp/\\.idea/runConfigurations/Run Main\\.xml
|
||||
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
|
||||
/myapp/\\.vscode
|
||||
/myapp/\\.vscode/launch\\.json
|
||||
/myapp/\\.vscode/settings\\.json
|
||||
/myapp/bld
|
||||
/myapp/bld\\.bat
|
||||
|
@ -613,6 +617,7 @@ public class TestCreateRife2Operation {
|
|||
/myapp/\\.idea/runConfigurations/Run Main\\.xml
|
||||
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
|
||||
/myapp/\\.vscode
|
||||
/myapp/\\.vscode/launch\\.json
|
||||
/myapp/\\.vscode/settings\\.json
|
||||
/myapp/bld
|
||||
/myapp/bld\\.bat
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue