diff --git a/build/run-testsapp.grunt.js b/build/run-testsapp.grunt.js index ae391d901..e03d639a2 100644 --- a/build/run-testsapp.grunt.js +++ b/build/run-testsapp.grunt.js @@ -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", diff --git a/runtestsapp.sh b/runtestsapp.sh index f5351279a..a26ba15d8 100755 --- a/runtestsapp.sh +++ b/runtestsapp.sh @@ -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