Run DotNetCorePack for Android in CI

This commit is contained in:
Huo Yaoyuan
2022-03-26 20:46:31 +08:00
parent b4368b1a21
commit de6e267491
3 changed files with 9 additions and 13 deletions

View File

@@ -22,6 +22,7 @@ if ($Experimental) { $cakeArguments += "-experimental" }
$cakeArguments += $ScriptArgs
dotnet tool restore
dotnet workload install android
dotnet cake ./build/build.cake --bootstrap
dotnet cake ./build/build.cake $cakeArguments
exit $LASTEXITCODE

View File

@@ -1,5 +1,6 @@
echo "Installing Cake.Tool..."
dotnet tool restore
dotnet workload install android
# Parse arguments.
CAKE_ARGUMENTS=()

View File

@@ -165,22 +165,16 @@ Task("PackiOSFramework")
Task("PackAndroidFramework")
.Does(() => {
MSBuild(androidFrameworkProject, new MSBuildSettings {
Restore = true,
BinaryLogger = new MSBuildBinaryLogSettings{
Enabled = true,
FileName = tempDirectory.CombineWithFilePath("msbuildlog.binlog").FullPath
},
Verbosity = Verbosity.Minimal,
ArgumentCustomization = args =>
{
args.Append($"/p:Configuration={configuration}");
DotNetCorePack(androidFrameworkProject.FullPath, new DotNetCorePackSettings{
OutputDirectory = artifactsDirectory,
Configuration = configuration,
Verbosity = DotNetCoreVerbosity.Quiet,
ArgumentCustomization = args => {
args.Append($"/p:Version={version}");
args.Append($"/p:PackageOutputPath={artifactsDirectory.MakeAbsolute(Context.Environment)}");
args.Append($"/p:GenerateDocumentationFile=true");
return args;
}
}.WithTarget("Pack"));
});
});
Task("PackNativeLibs")