diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-04-15 17:58:14 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-04-15 17:58:14 +0300 |
| commit | 15f46cb9a0de56d751ed98674996358ee2c59066 (patch) | |
| tree | fce2ab2c263f8bb9710cb71751383e272a8e897a /Software/Visual_Studio/Tango.Protobuf/Compilers | |
| parent | 3c5f32456c72b26497c05bb35fd64e3c77c6b0f5 (diff) | |
| download | Tango-15f46cb9a0de56d751ed98674996358ee2c59066.tar.gz Tango-15f46cb9a0de56d751ed98674996358ee2c59066.zip | |
Embedded necessary pmr build on android tcc.
Updated DB to latest event types.
Diffstat (limited to 'Software/Visual_Studio/Tango.Protobuf/Compilers')
| -rw-r--r-- | Software/Visual_Studio/Tango.Protobuf/Compilers/JavaCompiler.cs | 19 |
1 files changed, 19 insertions, 0 deletions
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. /// </summary> 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<String> 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); + } } } |
