Replies: 1 comment 1 reply
-
@nick5454 I'm not aware of an existing Cake addin that wraps the zipalign tool - pack android as of this writing. You might want build one or perhaps add a post in the extension request to see if there are any takers. You are on the right track though. You'd use The cleanest way to ensure the tool is installed for you, would be (as you said) to package it up into a nuget package, publish to a feed that is accessible from the build node, and use the Then you would use
Yes, just create a You can see an example of this by looking at my ExcelDnaPack-NuGet repo. There I'm packaging up a tool called To use that package with Cake directly, you'd do something like the following: #tool "nuget:?package=ExcelDnaPack&version=1.1.1"
Task("Pack")
.Does(context =>
{
var excelDnaPackExePath = Context.Tools.Resolve("ExcelDnaPack.exe");
var settings = new ProcessSettings()
.WithArguments(args => args
.AppendQuoted(@"MyAddins\FirstAddin.dna")
.Append("/Y")
);
var exitCode = -1;
using (var process = StartAndReturnProcess(excelDnaPackExePath, settings))
{
process.WaitForExit();
exitCode = process.GetExitCode();
}
Information("Exit code: {0}", exitCode);
// ...
});
RunTarget("Pack"); This is how I initially used this package with Cake. Later I decided to create a dedicated Cake addin that wraps this tool (Cake.ExcelDnaPack), which makes it easier to use with specific Cake aliases: #tool "nuget:?package=ExcelDnaPack&version=1.1.1"
#addin "nuget:?package=Cake.ExcelDnaPack&version=1.0.0"
Task("Pack")
.Does(context =>
{
ExcelDnaPack(@"MyAddins\FirstAddin.dna");
});
RunTarget("Pack"); |
Beta Was this translation helpful? Give feedback.
-
Does anyone know of an extension that installs this tool? I'd rather use an extension that does than install it myself.
When you use jar to combine an .apk (Android), you have to call zipalign afterwards.
And another question what is the best way to install this tool, since it probably won't exist on hosted Macos in Azure Devops. It looks like only through Android Studio.
So if I packed this into my cake private nuget, I just create a tools directory and throw it in?
I see this here
So would I just add the zipalign tool into my tools directory and call this below ( cake is running on the Macos hosted by azure devops)?
'''Task("Install-XUnit")
.Does(()=> {
});'''
Beta Was this translation helpful? Give feedback.
All reactions