aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Protobuf/Compilers/JavaCompiler.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-04-15 17:58:14 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-04-15 17:58:14 +0300
commit15f46cb9a0de56d751ed98674996358ee2c59066 (patch)
treefce2ab2c263f8bb9710cb71751383e272a8e897a /Software/Visual_Studio/Tango.Protobuf/Compilers/JavaCompiler.cs
parent3c5f32456c72b26497c05bb35fd64e3c77c6b0f5 (diff)
downloadTango-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/JavaCompiler.cs')
-rw-r--r--Software/Visual_Studio/Tango.Protobuf/Compilers/JavaCompiler.cs19
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);
+ }
}
}