Skip to content

Commit 17cdf54

Browse files
gugavarojonpryor
authored andcommitted
Add vscode files so we can build/debug/test from inside the vscode ide (#513)
The new `Java.Interop.code-workspace` and related `.vscode/*` files will improve the experience of developers to opening the root folder of a Java.Interop checkout within VSCode. The following Tasks are provided for VSCode use: * `Build Java.Interop`: Builds `Java.Interop.sln` * `Clean Java.Interop`: Cleans `Java.Interop.sln` * `Build Generator`: Builds `tools/generator/generator.sln` * `Clean Generator`: Cleans `tools/generator/generator.sln` * `Run Generator Unit Tests`: Runs the `NUnitTests` target on `tools/generator/generator.sln` Unit tests can then be run and debugged if the [xunit-test-adapter][0] extension is installed. [0]: https://marketplace.visualstudio.com/items?itemName=wghats.vscode-nxunit-test-adapter
1 parent baf43b0 commit 17cdf54

File tree

5 files changed

+116
-0
lines changed

5 files changed

+116
-0
lines changed

.vscode/extensions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"ms-vscode.csharp",
4+
"ms-vscode.cpptools",
5+
"ms-vscode.mono-debug",
6+
"wghats.vscode-nxunit-test-adapter",
7+
"visualstudioexptteam.vscodeintellicode",
8+
]
9+
}

.vscode/launch.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Launch",
9+
"type": "mono",
10+
"request": "launch",
11+
"program": "${workspaceRoot}/packages/NUnit.ConsoleRunner.3.9.0/tools/nunit3-console.exe ${workspaceRoot}/bin/TestDebug/generator-Tests.dll",
12+
"cwd": "${workspaceRoot}bin/TestDebug/"
13+
},
14+
{
15+
"name": "Attach",
16+
"type": "mono",
17+
"request": "attach",
18+
"address": "localhost",
19+
"port": 55555
20+
}
21+
]
22+
}

.vscode/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"nxunitExplorer.nunit": "packages/NUnit.ConsoleRunner.3.9.0/tools/nunit3-console.exe",
3+
"nxunitExplorer.modules": [
4+
"bin/TestDebug/generator-Tests.dll",
5+
"bin/TestDebug/Java.Interop.Tools.JavaCallableWrappers-Tests.dll",
6+
"bin/TestDebug/LogcatParse-Tests.dll",
7+
"bin/TestDebug/Xamarin.Android.Tools.ApiXmlAdjuster-Tests.dll",
8+
"bin/TestDebug/Xamarin.Android.Tools.Bytecode-Tests.dll",
9+
]
10+
}

.vscode/tasks.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Build Java.Interop",
8+
"type": "shell",
9+
"command": "msbuild Java.Interop.sln /restore /t:Build",
10+
"group": {
11+
"kind": "build",
12+
"isDefault": true
13+
},
14+
"problemMatcher": [
15+
"$msCompile"
16+
]
17+
},
18+
{
19+
"label": "Clean Java.Interop",
20+
"type": "shell",
21+
"command": "msbuild Java.Interop.sln /restore /t:Clean",
22+
"group": {
23+
"kind": "build",
24+
"isDefault": true
25+
},
26+
"problemMatcher": [
27+
"$msCompile"
28+
]
29+
},
30+
{
31+
"label": "Build Generator",
32+
"type": "shell",
33+
"command": "msbuild tools/generator/generator.sln /restore /t:Build",
34+
"group": {
35+
"kind": "build",
36+
"isDefault": true
37+
},
38+
"problemMatcher": [
39+
"$msCompile"
40+
]
41+
},
42+
{
43+
"label": "Clean Generator",
44+
"type": "shell",
45+
"command": "msbuild tools/generator/generator.sln /restore /t:Clean",
46+
"group": {
47+
"kind": "build",
48+
"isDefault": true
49+
},
50+
"problemMatcher": [
51+
"$msCompile"
52+
]
53+
},
54+
{
55+
"label": "Run Generator Unit Tests",
56+
"type": "shell",
57+
"command": "msbuild tools/generator/generator.sln /restore /t:RunNunitTests",
58+
"group": {
59+
"kind": "test",
60+
"isDefault": true
61+
},
62+
"problemMatcher": [
63+
"$msCompile"
64+
]
65+
}
66+
]
67+
}

Java.Interop.code-workspace

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"folders": [
3+
{
4+
"path": "."
5+
}
6+
],
7+
"settings": {}
8+
}

0 commit comments

Comments
 (0)