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
This commit is contained in:
Gustavo Varo 2019-10-29 12:00:59 -04:00 коммит произвёл Jonathan Pryor
Родитель baf43b0954
Коммит 17cdf544f3
5 изменённых файлов: 116 добавлений и 0 удалений

9
.vscode/extensions.json поставляемый Normal file
Просмотреть файл

@ -0,0 +1,9 @@
{
"recommendations": [
"ms-vscode.csharp",
"ms-vscode.cpptools",
"ms-vscode.mono-debug",
"wghats.vscode-nxunit-test-adapter",
"visualstudioexptteam.vscodeintellicode",
]
}

22
.vscode/launch.json поставляемый Normal file
Просмотреть файл

@ -0,0 +1,22 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "mono",
"request": "launch",
"program": "${workspaceRoot}/packages/NUnit.ConsoleRunner.3.9.0/tools/nunit3-console.exe ${workspaceRoot}/bin/TestDebug/generator-Tests.dll",
"cwd": "${workspaceRoot}bin/TestDebug/"
},
{
"name": "Attach",
"type": "mono",
"request": "attach",
"address": "localhost",
"port": 55555
}
]
}

10
.vscode/settings.json поставляемый Normal file
Просмотреть файл

@ -0,0 +1,10 @@
{
"nxunitExplorer.nunit": "packages/NUnit.ConsoleRunner.3.9.0/tools/nunit3-console.exe",
"nxunitExplorer.modules": [
"bin/TestDebug/generator-Tests.dll",
"bin/TestDebug/Java.Interop.Tools.JavaCallableWrappers-Tests.dll",
"bin/TestDebug/LogcatParse-Tests.dll",
"bin/TestDebug/Xamarin.Android.Tools.ApiXmlAdjuster-Tests.dll",
"bin/TestDebug/Xamarin.Android.Tools.Bytecode-Tests.dll",
]
}

67
.vscode/tasks.json поставляемый Normal file
Просмотреть файл

@ -0,0 +1,67 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build Java.Interop",
"type": "shell",
"command": "msbuild Java.Interop.sln /restore /t:Build",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$msCompile"
]
},
{
"label": "Clean Java.Interop",
"type": "shell",
"command": "msbuild Java.Interop.sln /restore /t:Clean",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$msCompile"
]
},
{
"label": "Build Generator",
"type": "shell",
"command": "msbuild tools/generator/generator.sln /restore /t:Build",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$msCompile"
]
},
{
"label": "Clean Generator",
"type": "shell",
"command": "msbuild tools/generator/generator.sln /restore /t:Clean",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$msCompile"
]
},
{
"label": "Run Generator Unit Tests",
"type": "shell",
"command": "msbuild tools/generator/generator.sln /restore /t:RunNunitTests",
"group": {
"kind": "test",
"isDefault": true
},
"problemMatcher": [
"$msCompile"
]
}
]
}

Просмотреть файл

@ -0,0 +1,8 @@
{
"folders": [
{
"path": "."
}
],
"settings": {}
}