diff options
author | Raymond Chiu <chiur@google.com> | 2015-02-11 02:52:50 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-02-11 02:52:50 +0000 |
commit | 3dd3833db12ae7c24ec55624e0f36810182d239f (patch) | |
tree | dbf70e1fdd1d801803414d358b711e0630dc27ff | |
parent | 5488e4603ea216b5943a59e08eeda8ef360e65cc (diff) | |
parent | 42884eb368a29ad741543536d28748d159bc8e96 (diff) | |
download | sdk-3dd3833db12ae7c24ec55624e0f36810182d239f.zip sdk-3dd3833db12ae7c24ec55624e0f36810182d239f.tar.gz sdk-3dd3833db12ae7c24ec55624e0f36810182d239f.tar.bz2 |
am 42884eb3: am 1d8f0243: Merge "Add targetPlatform for executable binaries" into studio-1.2-dev automerge: f7757fb automerge: 95fc762
* commit '42884eb368a29ad741543536d28748d159bc8e96':
Add targetPlatform for executable binaries
-rw-r--r-- | avdlauncher/build.gradle | 30 | ||||
-rw-r--r-- | emulator/mksdcard/build.gradle | 28 | ||||
-rw-r--r-- | find_java/build.gradle | 27 | ||||
-rw-r--r-- | sdklauncher/build.gradle | 30 |
4 files changed, 55 insertions, 60 deletions
diff --git a/avdlauncher/build.gradle b/avdlauncher/build.gradle index c280642..b0e2c90 100644 --- a/avdlauncher/build.gradle +++ b/avdlauncher/build.gradle @@ -2,35 +2,33 @@ apply plugin: 'c' apply plugin: 'sdk-files' apply plugin: 'windows-setup' -executables { - avdLauncher {} -} - -sources { - avdLauncher { - c { - source { - srcDir "src/source" - include "**/*.c" +model { + components { + avdLauncher(NativeExecutableSpec) { + sources { + c { + source { + srcDir "src/source" + include "**/*.c" + } + } } + targetPlatform "windows32" } } } sdk { windows { - item( { getExeName("windows32AvdLauncherExecutable") } ) { + item( { getExeName("avdLauncherExecutable") } ) { into 'lib' name 'AVD Manager.exe' - builtBy 'windows32AvdLauncherExecutable' + builtBy 'avdLauncherExecutable' } } } def getExeName(String name) { - // binaries will return a set of binaries - def binaries = executables.avdLauncher.binaries.matching { it.name == name } - // calling .exeFile on the set returns an array with the result from each item in the set... - return binaries.executableFile.get(0) + return binaries.getByName(name).executableFile } diff --git a/emulator/mksdcard/build.gradle b/emulator/mksdcard/build.gradle index 677f763..bd029b2 100644 --- a/emulator/mksdcard/build.gradle +++ b/emulator/mksdcard/build.gradle @@ -2,17 +2,20 @@ apply plugin: 'c' apply plugin: 'sdk-files' apply plugin: 'native-setup' -executables { - mksdcard {} -} - -sources { - mksdcard { - c { - source { - srcDir "src/source" - include "**/*.c" +model { + components { + mksdcard(NativeExecutableSpec) { + sources { + c { + source { + srcDir "src/source" + include "**/*.c" + } + } } + targetPlatform "darwin" + targetPlatform "linux" + targetPlatform "windows32" } } } @@ -43,9 +46,6 @@ sdk { } def getExeName(String platform) { - // binaries will return a set of binaries - def binaries = executables.mksdcard.binaries.matching { it.name == "${platform}MksdcardExecutable" } - // calling .exeFile on the set returns an array with the result from each item in the set... - return binaries.executableFile.get(0) + return binaries.getByName("${platform}MksdcardExecutable").executableFile } diff --git a/find_java/build.gradle b/find_java/build.gradle index b359e0a..8c1ed43 100644 --- a/find_java/build.gradle +++ b/find_java/build.gradle @@ -2,17 +2,19 @@ apply plugin: 'cpp' apply plugin: 'sdk-files' apply plugin: 'windows-setup' -executables { - findJava {} -} - -sources { - findJava { - cpp { - source { - srcDir "src/source" - include "**/*.cpp" +model { + components { + findJava(NativeExecutableSpec) { + sources { + cpp { + source { + srcDir "src/source" + include "**/*.cpp" + } + } } + targetPlatform "windows32" + targetPlatform "windows64" } } } @@ -39,9 +41,6 @@ sdk { } def getExeName(String name) { - // binaries will return a set of binaries - def binaries = executables.findJava.binaries.matching { it.name == name } - // calling .exeFile on the set returns an array with the result from each item in the set... - return binaries.executableFile.get(0) + return binaries.getByName(name).executableFile } diff --git a/sdklauncher/build.gradle b/sdklauncher/build.gradle index 6c64f6d..b04ee05 100644 --- a/sdklauncher/build.gradle +++ b/sdklauncher/build.gradle @@ -2,35 +2,33 @@ apply plugin: 'c' apply plugin: 'sdk-files' apply plugin: 'windows-setup' -executables { - sdkLauncher {} -} - -sources { - sdkLauncher { - c { - source { - srcDir "src/source" - include "**/*.c" +model { + components { + sdkLauncher(NativeExecutableSpec) { + sources { + c { + source { + srcDir "src/source" + include "**/*.c" + } + } } + targetPlatform "windows32" } } } sdk { windows { - item( { getExeName("windows32SdkLauncherExecutable") } ) { + item( { getExeName("sdkLauncherExecutable") } ) { into 'lib' name 'SDK Manager.exe' - builtBy 'windows32SdkLauncherExecutable' + builtBy 'sdkLauncherExecutable' } } } def getExeName(String name) { - // binaries will return a set of binaries - def binaries = executables.sdkLauncher.binaries.matching { it.name == name } - // calling .exeFile on the set returns an array with the result from each item in the set... - return binaries.executableFile.get(0) + return binaries.getByName(name).executableFile } |