From 15f46cb9a0de56d751ed98674996358ee2c59066 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 15 Apr 2019 17:58:14 +0300 Subject: Embedded necessary pmr build on android tcc. Updated DB to latest event types. --- .../Tango.Protobuf/Compilers/JavaCompiler.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'Software/Visual_Studio/Tango.Protobuf/Compilers') diff --git a/Software/Visual_Studio/Tango.Protobuf/Compilers/JavaCompiler.cs b/Software/Visual_Studio/Tango.Protobuf/Compilers/JavaCompiler.cs index 55f0cf77f..2b0ff8c59 100644 --- a/Software/Visual_Studio/Tango.Protobuf/Compilers/JavaCompiler.cs +++ b/Software/Visual_Studio/Tango.Protobuf/Compilers/JavaCompiler.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.Core.Helpers; +using Tango.Core.IO; using Tango.Logging; namespace Tango.Protobuf.Compilers @@ -33,5 +34,23 @@ namespace Tango.Protobuf.Compilers /// Gets a value indicating whether this compiler uses the default folder structure when generating code. /// public override bool UsesDefaultStructure => true; + + public override CompilerFolderResult CompileFolder(string sourceFolder, params string[] includeFolders) + { + var temp = TemporaryManager.Default.CreateFolder(); + PathHelper.CopyDirectory(sourceFolder, temp.Path, true); + + List directories = Directory.GetDirectories(sourceFolder, "*", SearchOption.AllDirectories).Where(x => includeFolders == null || includeFolders.Length == 0 || includeFolders.Contains(Path.GetFileName(x))).ToList(); + + foreach (var dir in Directory.GetDirectories(temp.Path)) + { + if (!directories.Select(x => Path.GetFileName(x)).Contains(Path.GetFileName(dir))) + { + Directory.Delete(dir, true); + } + } + + return base.CompileFolder(temp.Path); + } } } -- cgit v1.3.1