-
Notifications
You must be signed in to change notification settings - Fork 0
/
do-test-codegen.ps1
65 lines (51 loc) · 2.71 KB
/
do-test-codegen.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env pwsh
$conf="Release"
dotnet build CodeBinder.sln --configuration $conf /p:Platform="Any CPU"
# This is needed as per https://github.com/dotnet/roslyn/issues/52293
dotnet restore "$((Join-Path Test CodeBinder.Test.sln))"
$codebinder = Join-Path bin $conf CodeBinder.exe
# Java JDK
& $codebinder `
"--solution=$((Join-Path Test CodeBinder.Test.sln))" --project=SampleLibrary `
--language=Java --nsmapping=SampleLibrary:SampleLibrary `
"--targetpath=$((Join-Path .. CodeBinder-TestCodeGen SampleLibraryJDK))"
# Java Android
& $codebinder `
"--solution=$((Join-Path Test CodeBinder.Test.sln))" --project=SampleLibrary `
--language=Java --android --nsmapping=SampleLibrary:SampleLibrary `
"--targetpath=$((Join-Path .. CodeBinder-TestCodeGen SampleLibraryAndroid))"
# Java JNI
& $codebinder `
"--solution=$((Join-Path Test CodeBinder.Test.sln))" --project=SampleLibrary `
--language=JNI --nsmapping=SampleLibrary:SampleLibrary `
"--targetpath=$((Join-Path .. CodeBinder-TestCodeGen SampleLibraryJNI))"
# ObjectiveC
& $codebinder `
"--solution=$((Join-Path Test CodeBinder.Test.sln))" --project=SampleLibrary `
--language=ObjectiveC "--targetpath=$((Join-Path .. CodeBinder-TestCodeGen SampleLibraryObjC))"
# TypeScript (commonjs compatible)
& $codebinder `
"--solution=$((Join-Path Test CodeBinder.Test.sln))" --project=SampleLibrary `
--language=TypeScript --commonjs `
"--targetpath=$((Join-Path .. CodeBinder-TestCodeGen SampleLibraryTS))"
# TypeScript (ESModule compatible)
& $codebinder `
"--solution=$((Join-Path Test CodeBinder.Test.sln))" --project=SampleLibrary `
--language=TypeScript "--targetpath=$((Join-Path .. CodeBinder-TestCodeGen SampleLibraryMTS))"
# NodeJS NAPI
& $codebinder `
"--solution=$((Join-Path Test CodeBinder.Test.sln))" --project=SampleLibrary `
--language=NAPI "--targetpath=$((Join-Path .. CodeBinder-TestCodeGen SampleLibraryNAPI))"
# Project template conversions: creates the entry points for native methods
# CLang
& $codebinder `
"--solution=$((Join-Path Test CodeBinder.Test.sln))" --project=SampleLibrary `
--language=CLang "--targetpath=$((Join-Path .. CodeBinder-TestCodeGen SampleLibraryCLang sgen))"
# EXPERIMENTAL: NativeAOT (partial method declarations)
& $codebinder `
"--solution=$((Join-Path Test CodeBinder.Test.sln))" --project=SampleLibrary `
--language=NAOT "--targetpath=$((Join-Path .. CodeBinder-TestCodeGen SampleLibraryNAOT sgen))"
# EXPERIMENTAL: NativeAOT (partial method definitions)
& $codebinder `
"--solution=$((Join-Path Test CodeBinder.Test.sln))" --project=SampleLibrary `
--language=NAOT --create-template "--targetpath=$((Join-Path .. CodeBinder-TestCodeGen SampleLibraryNAOT))"