Add a build of the android app

This commit is contained in:
Erjan Gavalji
2015-10-20 11:37:58 +03:00
parent b25e9d626f
commit d2f5bae597
2 changed files with 13 additions and 18 deletions

View File

@ -28,7 +28,10 @@ module.exports = {
src: localCfg.workingDir
},
originalAppDir: {
src: pathModule.join(localCfg.applicationDir, "app") + "/"
src: [
localCfg.appDir + "/*",
"!" + pathModule.join(localCfg.appDir, "App_Resources") + ""
]
}
},
mkdir: {
@ -73,10 +76,6 @@ module.exports = {
cmd: "pkill '" + localCfg.emulatorProcessIdentifier + "'",
exitCode: [0, 1]
},
runTestsApp: {
cmd: "./runtestsapp.sh",
stdout: false
},
startEmulator: {
cmd: "emulator -avd " + localCfg.emuAvdName + " -no-audio -no-window &",
stdout: true
@ -88,6 +87,13 @@ module.exports = {
addAndroidPlatform: {
cmd: "tns platform add android " + localCfg.androidFrameworkArgument,
cwd: localCfg.applicationDir
},
buildAppAndroid: {
cmd: "tns build android",
cwd: localCfg.applicationDir
},
restartAdb: {
cmd: "adb kill-server && adb start-server"
}
}
});
@ -107,7 +113,6 @@ module.exports = {
"mkdir:workingDir",
"exec:killEmulator",
"exec:startEmulator",
// "exec:runTestsApp",
"exec:createApp",
"clean:originalAppDir",
@ -115,6 +120,8 @@ module.exports = {
"exec:addAndroidPlatform",
"copy:addAndroidPermissions",
"exec:buildAppAndroid",
"exec:restartAdb",
// "exec:killEmulator",

View File

@ -17,18 +17,6 @@ mainActivityName=com.tns.NativeScriptActivity
# GET THIS ONE FROM SOME PLACE...
cp /Volumes/distributions/DailyBuilds/NativeScript/android-widgets/Stable/widgets.jar platforms/android/libs/
echo "------------------------------------------------"
echo "Building the application..."
time tns build android
echo "------------------------------------------------"
echo "Killing the adb server..."
time adb kill-server
echo "------------------------------------------------"
echo "Starting the adb server..."
time adb start-server
echo "------------------------------------------------"
echo "Uninstalling the app..."
time adb uninstall $deployedAppName