public override bool Execute() { Log.LogDebugMessage("Aapt Task"); Log.LogDebugMessage(" AssetDirectory: {0}", AssetDirectory); Log.LogDebugTaskItems(" ManifestFiles: ", ManifestFiles); Log.LogDebugMessage(" ResourceDirectory: {0}", ResourceDirectory); Log.LogDebugMessage(" JavaDesignerOutputDirectory: {0}", JavaDesignerOutputDirectory); Log.LogDebugMessage(" PackageName: {0}", PackageName); Log.LogDebugMessage(" UncompressedFileExtensions: {0}", UncompressedFileExtensions); Log.LogDebugMessage(" ExtraPackages: {0}", ExtraPackages); Log.LogDebugTaskItems(" AdditionalResourceDirectories: ", AdditionalResourceDirectories); Log.LogDebugTaskItems(" AdditionalAndroidResourcePaths: ", AdditionalAndroidResourcePaths); Log.LogDebugTaskItems(" LibraryProjectJars: ", LibraryProjectJars); Log.LogDebugMessage(" ExtraArgs: {0}", ExtraArgs); Log.LogDebugMessage(" CreatePackagePerAbi: {0}", CreatePackagePerAbi); Log.LogDebugMessage(" ResourceNameCaseMap: {0}", ResourceNameCaseMap); if (CreatePackagePerAbi) { Log.LogDebugMessage(" SupportedAbis: {0}", SupportedAbis); } if (ResourceNameCaseMap != null) { foreach (var arr in ResourceNameCaseMap.Split(';').Select(l => l.Split('|')).Where(a => a.Length == 2)) { resource_name_case_map [arr [1]] = arr [0]; // lowercase -> original } } ThreadingTasks.Parallel.ForEach(ManifestFiles, () => 0, DoExecute, (obj) => { Complete(); }); base.Execute(); return(!Log.HasLoggedErrors); }
protected void LoadResourceCaseMap() { if (ResourceNameCaseMap != null) { foreach (var arr in ResourceNameCaseMap.Split(';').Select(l => l.Split('|')).Where(a => a.Length == 2)) { resource_name_case_map [arr [1]] = arr [0]; // lowercase -> original } } }
void DoExecute() { if (ResourceNameCaseMap != null) { foreach (var arr in ResourceNameCaseMap.Split(';').Select(l => l.Split('|')).Where(a => a.Length == 2)) { resource_name_case_map [arr [1]] = arr [0]; // lowercase -> original } } assemblyMap.Load(Path.Combine(WorkingDirectory, AssemblyIdentityMapFile)); ThreadingTasks.ParallelOptions options = new ThreadingTasks.ParallelOptions { CancellationToken = Token, TaskScheduler = ThreadingTasks.TaskScheduler.Default, }; ThreadingTasks.Parallel.ForEach(ManifestFiles, options, ProcessManifest); }
public override bool Execute() { Log.LogDebugMessage("Aapt Task"); Log.LogDebugMessage(" AssetDirectory: {0}", AssetDirectory); Log.LogDebugMessage(" ManifestFile: {0}", ManifestFile); Log.LogDebugMessage(" ResourceDirectory: {0}", ResourceDirectory); Log.LogDebugMessage(" JavaDesignerOutputDirectory: {0}", JavaDesignerOutputDirectory); Log.LogDebugMessage(" PackageName: {0}", PackageName); Log.LogDebugMessage(" UncompressedFileExtensions: {0}", UncompressedFileExtensions); Log.LogDebugMessage(" ExtraPackages: {0}", ExtraPackages); Log.LogDebugTaskItems(" AdditionalResourceDirectories: ", AdditionalResourceDirectories); Log.LogDebugTaskItems(" AdditionalAndroidResourcePaths: ", AdditionalAndroidResourcePaths); Log.LogDebugTaskItems(" LibraryProjectJars: ", LibraryProjectJars); Log.LogDebugMessage(" ExtraArgs: {0}", ExtraArgs); Log.LogDebugMessage(" CreatePackagePerAbi: {0}", CreatePackagePerAbi); Log.LogDebugMessage(" ResourceNameCaseMap: {0}", ResourceNameCaseMap); if (CreatePackagePerAbi) { Log.LogDebugMessage(" SupportedAbis: {0}", SupportedAbis); } bool upToDate = ManifestIsUpToDate(ManifestFile); if (ResourceNameCaseMap != null) { foreach (var arr in ResourceNameCaseMap.Split(';').Select(l => l.Split('|')).Where(a => a.Length == 2)) { resource_name_case_map [arr [1]] = arr [0]; // lowercase -> original } } if (AdditionalAndroidResourcePaths != null) { foreach (var dir in AdditionalAndroidResourcePaths) { if (!string.IsNullOrEmpty(dir.ItemSpec)) { upToDate = upToDate && ManifestIsUpToDate(string.Format("{0}{1}{2}", dir, Path.DirectorySeparatorChar, "manifest", Path.DirectorySeparatorChar, "AndroidManifest.xml")); } } } if (upToDate) { Log.LogMessage(MessageImportance.Normal, " Additional Android Resources manifsets files are unchanged. Skipping."); return(true); } ExecuteForAbi(null); if (CreatePackagePerAbi) { var abis = SupportedAbis.Split(new char[] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries); if (abis.Length > 1) { foreach (var abi in abis) { ExecuteForAbi(abi); } } } return(!Log.HasLoggedErrors); }