-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build.cake] Break up into multiple files and remove obsolete targets.
- Loading branch information
Showing
8 changed files
with
139 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Contains tasks for running binderator | ||
|
||
// Runs `binderator` | ||
Task ("binderate") | ||
.IsDependentOn ("javadocs-gps") | ||
.Does (() => | ||
{ | ||
var configFile = MakeAbsolute (new FilePath ("./config.json")).FullPath; | ||
var basePath = MakeAbsolute (new DirectoryPath ("./")).FullPath; | ||
// Run the binderator project | ||
var args = new ProcessArgumentBuilder () | ||
.Append ("binderate") | ||
.Append ("--config-file") | ||
.Append (configFile) | ||
.Append ("--base-path") | ||
.Append (basePath); | ||
DotNetRun (binderator_project, args); | ||
// format the targets file so they are pretty in the package | ||
var targetsFiles = GetFiles ("generated/**/*.targets"); | ||
var xmlns = (XNamespace)"http://schemas.microsoft.com/developer/msbuild/2003"; | ||
foreach (var targets in targetsFiles) { | ||
var xdoc = XDocument.Load (targets.FullPath); | ||
xdoc.Save (targets.FullPath); | ||
} | ||
// different lint.jar files in artifacts causing R8 errors | ||
foreach (var file in GetFiles ("./externals/**/lint.jar")) { | ||
Information($"Deleting: {file}"); | ||
DeleteFile(file); | ||
foreach (var aar in GetFiles ($"{file.GetDirectory ()}/../*.aar")) { | ||
Information ($"Deleting: lint.jar from {aar}"); | ||
using (var zipFile = new ICSharpCode.SharpZipLib.Zip.ZipFile (aar.ToString ())) { | ||
zipFile.BeginUpdate (); | ||
var entry = zipFile.GetEntry ("lint.jar"); | ||
if (entry != null) { | ||
Information ($" Deleting lint.jar from {aar}"); | ||
zipFile.Delete (entry); | ||
} | ||
zipFile.CommitUpdate (); | ||
} | ||
} | ||
} | ||
}); |
Oops, something went wrong.