Merge "AVD/SDK Launchers win build." into idea133
automerge: c86e450

* commit 'c86e450e6ad3bdc6a8ba134e7c56ecb49e8a38ee':
  AVD/SDK Launchers win build.
diff --git a/avdlauncher/Android.mk b/avdlauncher/Android.mk
index fb48e15..97b6d73 100644
--- a/avdlauncher/Android.mk
+++ b/avdlauncher/Android.mk
@@ -16,7 +16,7 @@
 ifeq ($(HOST_OS),windows)
 
 LOCAL_SRC_FILES := \
-	avdlauncher.c
+	src/source/avdlauncher.c
 
 LOCAL_CFLAGS += -Wall -Wno-unused-parameter
 LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE -DSH_HISTORY
diff --git a/avdlauncher/build.gradle b/avdlauncher/build.gradle
new file mode 100644
index 0000000..d796c69
--- /dev/null
+++ b/avdlauncher/build.gradle
@@ -0,0 +1,36 @@
+apply plugin: 'c'
+apply plugin: 'sdk-files'
+apply plugin: 'windows-setup'
+
+executables {
+    avdLauncher {}
+}
+
+sources {
+    avdLauncher {
+        c {
+            source {
+                srcDir "src/source"
+                include "**/*.c"
+            }
+        }
+    }
+}
+
+sdk {
+    windows {
+        item( { getExeName("windows") } ) {
+            into 'lib'
+            name 'AVD Launcher.exe'
+            builtBy 'avdLauncherExecutable'
+        }
+    }
+}
+
+def getExeName(String platform) {
+    // binaries will return a set of binaries
+    def binaries = executables.avdLauncher.binaries.matching { it.name == "avdLauncherExecutable" }
+    // calling .exeFile on the set returns an array with the result from each item in the set...
+    return binaries.executableFile.get(0)
+}
+
diff --git a/avdlauncher/avdlauncher.c b/avdlauncher/src/source/avdlauncher.c
similarity index 100%
rename from avdlauncher/avdlauncher.c
rename to avdlauncher/src/source/avdlauncher.c
diff --git a/sdklauncher/Android.mk b/sdklauncher/Android.mk
index 6b317a5..3d5a989 100644
--- a/sdklauncher/Android.mk
+++ b/sdklauncher/Android.mk
@@ -16,7 +16,7 @@
 ifeq ($(HOST_OS),windows)
 
 LOCAL_SRC_FILES := \
-	sdklauncher.c
+	src/source/sdklauncher.c
 
 LOCAL_CFLAGS += -Wall -Wno-unused-parameter
 LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE -DSH_HISTORY
diff --git a/sdklauncher/build.gradle b/sdklauncher/build.gradle
new file mode 100644
index 0000000..48ef10a
--- /dev/null
+++ b/sdklauncher/build.gradle
@@ -0,0 +1,36 @@
+apply plugin: 'c'
+apply plugin: 'sdk-files'
+apply plugin: 'windows-setup'
+
+executables {
+    sdkLauncher {}
+}
+
+sources {
+    sdkLauncher {
+        c {
+            source {
+                srcDir "src/source"
+                include "**/*.c"
+            }
+        }
+    }
+}
+
+sdk {
+    windows {
+        item( { getExeName("windows") } ) {
+            into 'lib'
+            name 'SDK Launcher.exe'
+            builtBy 'sdkLauncherExecutable'
+        }
+    }
+}
+
+def getExeName(String platform) {
+    // binaries will return a set of binaries
+    def binaries = executables.sdkLauncher.binaries.matching { it.name == "sdkLauncherExecutable" }
+    // calling .exeFile on the set returns an array with the result from each item in the set...
+    return binaries.executableFile.get(0)
+}
+
diff --git a/sdklauncher/sdklauncher.c b/sdklauncher/src/source/sdklauncher.c
similarity index 100%
rename from sdklauncher/sdklauncher.c
rename to sdklauncher/src/source/sdklauncher.c