Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit 6d37059

Browse files
committed
Debug and Release builds - to surface ACW issues before linker kicks in
1 parent cdbc493 commit 6d37059

File tree

1 file changed

+35
-21
lines changed

1 file changed

+35
-21
lines changed

‎build.cake‎

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ var TARGET = Argument ("t", Argument ("target", "Default"));
1111
var BUILD_CONFIG = Argument ("config", "Release");
1212
var VERBOSITY = Argument ("v", Argument ("verbosity", Verbosity.Normal));
1313
var MAX_CPU_COUNT = Argument("maxcpucount", 0);
14-
var CONFIGURATION = Argument ("c", Argument ("configuration", "Release"));
1514

1615
// Lists all the artifacts and their versions for com.android.support.*
1716
// https://dl.google.com/dl/android/maven2/com/android/support/group-index.xml
@@ -24,6 +23,8 @@ var REF_DOCS_URL = "https://bosstoragemirror.blob.core.windows.net/android-docs-
2423
var XAMARIN_ANDROID_PATH = EnvironmentVariable ("XAMARIN_ANDROID_PATH");
2524
var ANDROID_SDK_BASE_VERSION = "v1.0";
2625
var ANDROID_SDK_VERSION = "v9.0";
26+
string AndroidSdkBuildTools = $"29.0.2";
27+
2728
if (string.IsNullOrEmpty(XAMARIN_ANDROID_PATH)) {
2829
if (IsRunningOnWindows()) {
2930
var vsInstallPath = VSWhereLatest(new VSWhereLatestSettings { Requires = "Component.Xamarin" });
@@ -48,6 +49,12 @@ var REQUIRED_DOTNET_TOOLS = new [] {
4849
"xamarin.androidx.migration.tool"
4950
};
5051

52+
string[] Configs = new []
53+
{
54+
"Debug",
55+
"Release"
56+
};
57+
5158
// Log some variables
5259
Information ("XAMARIN_ANDROID_PATH: {0}", XAMARIN_ANDROID_PATH);
5360
Information ("ANDROID_SDK_VERSION: {0}", ANDROID_SDK_VERSION);
@@ -131,11 +138,14 @@ Task("binderate")
131138
Task("libs")
132139
.Does(() =>
133140
{
134-
MSBuild("./generated/AndroidSupport.sln", c => {
135-
c.Configuration = "Release";
136-
c.Restore = true;
137-
c.Properties.Add("DesignTimeBuild", new [] { "false" });
138-
});
141+
foreach(string config in Configs)
142+
{
143+
MSBuild("./generated/AndroidSupport.sln", c => {
144+
c.Configuration = config;
145+
c.Restore = true;
146+
c.Properties.Add("DesignTimeBuild", new [] { "false" });
147+
});
148+
}
139149
});
140150

141151
Task("nuget")
@@ -184,18 +194,22 @@ Task("samples")
184194
EnsureDirectoryExists(packagesPath);
185195
CleanDirectories(packagesPath);
186196

187-
// build the samples
188-
var settings = new MSBuildSettings()
189-
.SetConfiguration(CONFIGURATION)
190-
.SetVerbosity(VERBOSITY)
191-
.SetMaxCpuCount(0)
192-
.EnableBinaryLogger("./output/samples.binlog")
193-
.WithRestore()
194-
.WithProperty("RestorePackagesPath", packagesPath)
195-
.WithProperty("DesignTimeBuild", "false")
196-
.WithProperty("AndroidSdkBuildToolsVersion", "29.0.2");
197-
198-
MSBuild("./samples/BuildAll/BuildAll.sln", settings);
197+
198+
foreach(string config in Configs)
199+
{
200+
// build the samples
201+
var settings = new MSBuildSettings()
202+
.SetConfiguration(config)
203+
.SetVerbosity(VERBOSITY)
204+
.SetMaxCpuCount(0)
205+
.EnableBinaryLogger("./output/samples.binlog")
206+
.WithRestore()
207+
.WithProperty("RestorePackagesPath", packagesPath)
208+
.WithProperty("DesignTimeBuild", "false")
209+
.WithProperty("AndroidSdkBuildToolsVersion", AndroidSdkBuildTools);
210+
211+
MSBuild("./samples/BuildAll/BuildAll.sln", settings);
212+
}
199213
});
200214

201215
Task ("merge")
@@ -233,13 +247,13 @@ Task ("clean")
233247
.Does (() =>
234248
{
235249
if (DirectoryExists ("./externals"))
236-
DeleteDirectory ("./externals", true);
250+
DeleteDirectory ("./externals", newDeleteDirectorySettings{Recursive=true,Force=true});
237251

238252
if (DirectoryExists ("./generated"))
239-
DeleteDirectory ("./generated", true);
253+
DeleteDirectory ("./generated", newDeleteDirectorySettings{Recursive=true,Force=true});
240254

241255
if (DirectoryExists ("./util/binderator"))
242-
DeleteDirectory ("./util/binderator", true);
256+
DeleteDirectory ("./util/binderator", newDeleteDirectorySettings{Recursive=true,Force=true});
243257

244258
CleanDirectories ("./**/packages");
245259
});

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /