Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit 68e0ea0

Browse files
committed
Switch to binderator global tool
1 parent 6a56aac commit 68e0ea0

File tree

2 files changed

+32
-10
lines changed

2 files changed

+32
-10
lines changed

azure-pipelines.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ variables:
33
MONO_VERSION: 5_16_0
44
XCODE_VERSION: 10.1
55
VERBOSITY: minimal
6+
API_TOOLS_VERSION: 1.0.2-preview.13
7+
BINDERATOR_VERSION: 0.4.0
8+
DOTNET_CORE_VERSION: 2.2.x
69

710
resources:
811
repositories:
@@ -24,6 +27,18 @@ jobs:
2427
displayName: 'Switch to the latest Xamarin SDK'
2528
- bash: echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'/Applications/Xcode_$(XCODE_VERSION).app;sudo xcode-select --switch /Applications/Xcode_$(XCODE_VERSION).app/Contents/Developer
2629
displayName: 'Switch to the latest Xcode'
30+
# install dotnet and tools
31+
- bash: echo '##vso[task.setvariable variable=PATH;]'$PATH:$HOME/.dotnet/tools
32+
displayName: 'Add ~/.dotnet/tools to the PATH environment variable'
33+
condition: eq(variables['System.JobName'], 'macos')
34+
- task: UseDotNet@2
35+
displayName: 'Use the correct version of the .NET Core SDK'
36+
inputs:
37+
version: $(DOTNET_CORE_VERSION)
38+
# Install dotnet tools
39+
- powershell: |
40+
dotnet tool install -g xamarin.androidbinderator.tool --version $(BINDERATOR_VERSION)
41+
displayName: 'Install dotnet tools'
2742
# Build the libraries and packages
2843
- bash: sh build.sh --target=ci --settings_skipverification=true --verbosity=$(VERBOSITY)
2944
displayName: 'Build NuGets'
@@ -60,6 +75,18 @@ jobs:
6075
pool:
6176
vmImage: vs2017-win2016
6277
steps:
78+
# install dotnet and tools
79+
- bash: echo '##vso[task.setvariable variable=PATH;]'$PATH:$HOME/.dotnet/tools
80+
displayName: 'Add ~/.dotnet/tools to the PATH environment variable'
81+
condition: eq(variables['System.JobName'], 'macos')
82+
- task: UseDotNet@2
83+
displayName: 'Use the correct version of the .NET Core SDK'
84+
inputs:
85+
version: $(DOTNET_CORE_VERSION)
86+
# Install necessary tools
87+
- powershell: |
88+
dotnet tool install -g xamarin.androidbinderator.tool --version $(BINDERATOR_VERSION)
89+
displayName: 'Install dotnet tools'
6390
# Build the libraries and packages
6491
- powershell: .\build.ps1 --target=ci --settings_skipverification=true --verbosity=$(VERBOSITY)
6592
displayName: 'Build everything'

build.cake

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,12 @@ Task("javadocs")
8787
Task("binderate")
8888
.Does(() =>
8989
{
90-
if (!DirectoryExists("./util/binderator"))
91-
{
92-
EnsureDirectoryExists("./util/binderator");
93-
Unzip ("./util/binderator.zip", "./util/binderator");
94-
}
95-
96-
var configFile = new FilePath("./config.json");
97-
var basePath = new DirectoryPath ("./");
90+
var configFile = MakeAbsolute(new FilePath("./config.json")).FullPath;
91+
var basePath = MakeAbsolute(new DirectoryPath ("./")).FullPath;
9892

99-
StartProcess("dotnet", "./util/binderator/android-binderator.dll --config=\""
100-
+ MakeAbsolute(configFile).FullPath + "\" --basepath=\"" + MakeAbsolute(basePath).FullPath + "\"");
93+
// Run the dotnet tool for binderator
94+
StartProcess("xamarin-android-binderator",
95+
$"--config=\"{configFile}\" --basepath=\"{basePath}\"");
10196
});
10297

10398
Task("libs")

0 commit comments

Comments
 (0)