From b6c9176d83d64fa86e48c438ae83531ca14b4a21 Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Wed, 2 Dec 2015 17:49:15 +0200 Subject: [PATCH 01/15] Add baseConfig option Add baseConfig option that can be used to replace the default AndroidManifest.xml / Info.plist that is used for merge. It should be passed to all build related commands. It can be passed to platform add command as well. --- lib/declarations.ts | 1 + lib/options.ts | 1 + lib/services/platform-service.ts | 5 +++++ lib/services/plugins-service.ts | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/declarations.ts b/lib/declarations.ts index 9c90f22085..2024836824 100644 --- a/lib/declarations.ts +++ b/lib/declarations.ts @@ -87,6 +87,7 @@ interface IOptions extends ICommonOptions { compileSdk: number; port: Number; copyTo: string; + baseConfig: string; } interface IProjectFilesManager { diff --git a/lib/options.ts b/lib/options.ts index ce2c032d26..431e4cf6f4 100644 --- a/lib/options.ts +++ b/lib/options.ts @@ -34,6 +34,7 @@ export class Options extends commonOptionsLibPath.OptionsBase { compileSdk: {type: OptionType.Number }, port: { type: OptionType.Number }, copyTo: { type: OptionType.String }, + baseConfig: { type: OptionType.String } }, path.join($hostInfo.isWindows ? process.env.LocalAppData : path.join(osenv.home(), ".local/share"), ".nativescript-cli"), $errors, $staticConfig); diff --git a/lib/services/platform-service.ts b/lib/services/platform-service.ts index a114fc2564..91dd4853a0 100644 --- a/lib/services/platform-service.ts +++ b/lib/services/platform-service.ts @@ -113,6 +113,11 @@ export class PlatformService implements IPlatformService { let sourceFrameworkDir = isFrameworkPathDirectory && this.$options.symlink ? path.join(this.$options.frameworkPath, "framework") : frameworkDir; platformData.platformProjectService.createProject(path.resolve(sourceFrameworkDir), installedVersion).wait(); + if(this.$options.baseConfig) { + let newConfigFile = path.resolve(this.$options.baseConfig); + this.$logger.trace(`Replacing '${platformData.configurationFilePath}' with '${newConfigFile}'.`); + this.$fs.copyFile(newConfigFile, platformData.configurationFilePath).wait(); + } if(isFrameworkPathDirectory || isFrameworkPathNotSymlinkedFile) { // Need to remove unneeded node_modules folder diff --git a/lib/services/plugins-service.ts b/lib/services/plugins-service.ts index 781b455d22..813ca640ea 100644 --- a/lib/services/plugins-service.ts +++ b/lib/services/plugins-service.ts @@ -114,7 +114,7 @@ export class PluginsService implements IPluginsService { npmInstallationManager.addToCache(platformData.frameworkPackageName, frameworkVersion).wait(); let cachedPackagePath = npmInstallationManager.getCachedPackagePath(platformData.frameworkPackageName, frameworkVersion); - let cachedConfigurationFilePath = path.join(cachedPackagePath, constants.PROJECT_FRAMEWORK_FOLDER_NAME, platformData.relativeToFrameworkConfigurationFilePath); + let cachedConfigurationFilePath = this.$options.baseConfig ? path.resolve(this.$options.baseConfig) : path.join(cachedPackagePath, constants.PROJECT_FRAMEWORK_FOLDER_NAME, platformData.relativeToFrameworkConfigurationFilePath); let cachedConfigurationFileContent = this.$fs.readText(cachedConfigurationFilePath).wait(); this.$fs.writeFile(platformData.configurationFilePath, cachedConfigurationFileContent).wait(); From bdb707ca11ce22acb5a6a2bf63a53e9b97e8ad31 Mon Sep 17 00:00:00 2001 From: Todor Totev Date: Mon, 7 Dec 2015 17:04:37 +0200 Subject: [PATCH 02/15] Don't stop adb uninstall See https://github.com/NativeScript/nativescript-cli/issues/1247 --- lib/common | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/common b/lib/common index 2b0980f179..79dd939ae7 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit 2b0980f17978c5cf8e2e9fe0bb9f9febf7c43576 +Subproject commit 79dd939ae7378244c2a8ccbb626947bd694e004c diff --git a/package.json b/package.json index 892f614b48..649416d589 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "ref-struct": "https://github.com/telerik/ref-struct/tarball/v1.0.2.1", "rimraf": "2.4.2", "semver": "5.0.1", - "shelljs": "0.5.1", + "shelljs": "0.5.3", "tabtab": "https://github.com/Icenium/node-tabtab/tarball/master", "temp": "0.8.3", "through2": "2.0.0", From c4f2aa1ac641c9c073da803a89eda2c908923247 Mon Sep 17 00:00:00 2001 From: Vasil Chimev Date: Tue, 8 Dec 2015 10:49:42 +0200 Subject: [PATCH 03/15] Bump up version to 1.5.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 649416d589..9ee25740e8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nativescript", "preferGlobal": true, - "version": "1.5.1", + "version": "1.5.2", "author": "Telerik ", "description": "Command-line interface for building NativeScript projects", "bin": { From 66251d13179c6310d3c684d08472d52e6d1aaa9c Mon Sep 17 00:00:00 2001 From: Fatme Havaluova Date: Tue, 8 Dec 2015 12:16:01 +0200 Subject: [PATCH 04/15] Fix ENOENT err Fixes https://github.com/NativeScript/nativescript-cli/issues/1210 --- lib/common | 2 +- lib/services/usb-livesync-service.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/common b/lib/common index 79dd939ae7..b790cefd0f 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit 79dd939ae7378244c2a8ccbb626947bd694e004c +Subproject commit b790cefd0ff15a156961cd25c60f5c4a0d88499c diff --git a/lib/services/usb-livesync-service.ts b/lib/services/usb-livesync-service.ts index 13eb2a3ce5..68486e97ff 100644 --- a/lib/services/usb-livesync-service.ts +++ b/lib/services/usb-livesync-service.ts @@ -157,6 +157,10 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer let getApplicationPathForiOSSimulatorAction = (): IFuture => { return (() => { + if (!this.$fs.exists(platformData.emulatorBuildOutputPath).wait()) { + this.$platformService.buildPlatform(platformData.normalizedPlatformName).wait(); + } + return this.$platformService.getLatestApplicationPackageForEmulator(platformData).wait().packageName; }).future()(); }; From 0254ad2362c9a010c45b7292bbf2add72aeafabd Mon Sep 17 00:00:00 2001 From: Fatme Havaluova Date: Tue, 8 Dec 2015 13:26:26 +0200 Subject: [PATCH 05/15] Prepare empty directories Fixes https://github.com/NativeScript/nativescript-cli/issues/1285 --- lib/common | 2 +- lib/services/platform-service.ts | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/common b/lib/common index b790cefd0f..86ad463d42 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit b790cefd0ff15a156961cd25c60f5c4a0d88499c +Subproject commit 86ad463d425837732544c6682ff8761c3980f00f diff --git a/lib/services/platform-service.ts b/lib/services/platform-service.ts index 91dd4853a0..dfaedb6056 100644 --- a/lib/services/platform-service.ts +++ b/lib/services/platform-service.ts @@ -229,7 +229,7 @@ export class PlatformService implements IPlatformService { .value(); // Copy all files from app dir, but make sure to exclude tns_modules - let sourceFiles = this.$fs.enumerateFilesInDirectorySync(appSourceDirectoryPath); + let sourceFiles = this.$fs.enumerateFilesInDirectorySync(appSourceDirectoryPath, null, { includeEmptyDirectories: true }); if (this.$options.release) { sourceFiles = sourceFiles.filter(source => source !== 'tests'); @@ -247,8 +247,11 @@ export class PlatformService implements IPlatformService { // Remove .ts and .js.map files PlatformService.EXCLUDE_FILES_PATTERN.forEach(pattern => sourceFiles = sourceFiles.filter(file => !minimatch(file, pattern, {nocase: true}))); let copyFileFutures = sourceFiles.map(source => { - let destinationFile = path.join(appDestinationDirectoryPath, path.relative(appSourceDirectoryPath, source)); - return this.$fs.copyFile(source, destinationFile); + let destinationPath = path.join(appDestinationDirectoryPath, path.relative(appSourceDirectoryPath, source)); + if (this.$fs.getFsStats(source).wait().isDirectory()) { + return this.$fs.createDirectory(destinationPath); + } + return this.$fs.copyFile(source, destinationPath); }); Future.wait(copyFileFutures); From cf4f48a873c2e29aa541fd148a78d3773b86e166 Mon Sep 17 00:00:00 2001 From: Todor Totev Date: Wed, 9 Dec 2015 17:10:34 +0200 Subject: [PATCH 06/15] Allow building of projects with spaces in directory names on Windows See https://github.com/NativeScript/NativeScript/issues/1213 --- lib/services/android-project-service.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/services/android-project-service.ts b/lib/services/android-project-service.ts index b33193f4c3..4939d6f6d4 100644 --- a/lib/services/android-project-service.ts +++ b/lib/services/android-project-service.ts @@ -222,6 +222,9 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject } let gradleBin = this.useGradleWrapper(projectRoot) ? path.join(projectRoot, "gradlew") : "gradle"; + if (this.$hostInfo.isWindows) { + gradleBin += ".bat"; // cmd command line parsing rules are weird. Avoid issues with quotes. See https://github.com/apache/cordova-android/blob/master/bin/templates/cordova/lib/builders/GradleBuilder.js for another approach + } this.spawn(gradleBin, buildOptions, { stdio: "inherit", cwd: this.platformData.projectRoot }).wait(); } else { this.checkAnt().wait(); @@ -368,11 +371,6 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject } private spawn(command: string, args: string[], opts?: any): IFuture { - if (this.$hostInfo.isWindows) { - args.unshift('/s', '/c', command); - command = process.env.COMSPEC || 'cmd.exe'; - } - return this.$childProcess.spawnFromEvent(command, args, "close", opts || { stdio: "inherit"}); } From 95fab4a72e87770f7fca3704dfb5582f97fcb4a2 Mon Sep 17 00:00:00 2001 From: Todor Totev Date: Wed, 9 Dec 2015 19:19:41 +0200 Subject: [PATCH 07/15] Fix spelling --- lib/services/doctor-service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/services/doctor-service.ts b/lib/services/doctor-service.ts index 9cc8ec43d7..2d1ed65854 100644 --- a/lib/services/doctor-service.ts +++ b/lib/services/doctor-service.ts @@ -47,9 +47,9 @@ class DoctorService implements IDoctorService { } if(!sysInfo.cocoapodVer) { - this.$logger.warn("WARNING: CocoaPod is not installed or is not configured properly."); + this.$logger.warn("WARNING: CocoaPods is not installed or is not configured properly."); this.$logger.out("You will not be able to build your projects for iOS if they contain plugin with CocoaPod file." + EOL - + "To be able to build such projects, verify that you have installed CocoaPod."); + + "To be able to build such projects, verify that you have installed CocoaPods."); result = true; } From a1acbd6fdc3f45439a991af244238b27e1d2d835 Mon Sep 17 00:00:00 2001 From: Fatme Havaluova Date: Wed, 9 Dec 2015 12:55:00 +0200 Subject: [PATCH 08/15] Skip files that are not changed from sync This will resolve the problem with endless loop when the application has before-prepare hook that modifies some files from app folder. --- lib/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common b/lib/common index 86ad463d42..340977db0f 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit 86ad463d425837732544c6682ff8761c3980f00f +Subproject commit 340977db0ff67bfc1aa6c5e0063034723c04fa38 From 92b3752050512ee8ee322b11b64228f0f36596d4 Mon Sep 17 00:00:00 2001 From: Fatme Havaluova Date: Fri, 11 Dec 2015 10:38:10 +0200 Subject: [PATCH 09/15] Update to latest common lib --- lib/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common b/lib/common index 340977db0f..57b112013f 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit 340977db0ff67bfc1aa6c5e0063034723c04fa38 +Subproject commit 57b112013f434083faa495c4a2ba61060081308c From e92a57a1ae6d6d0c99ecc52fbdf74d20d9112e90 Mon Sep 17 00:00:00 2001 From: Fatme Havaluova Date: Fri, 11 Dec 2015 16:45:39 +0200 Subject: [PATCH 10/15] Changelog for 1.5.2 release --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0eac55eda0..65d1b2dbe0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,17 @@ NativeScript CLI Changelog ================ +1.5.2 (2015, December 12) +== +### New +* [Implemented #1247](https://github.com/NativeScript/nativescript-cli/issues/1247): Do not kill adb server if possible. + +### Fixed +* [Fixed #956](https://github.com/NativeScript/nativescript-cli/issues/956): Better error reporting for deploy on device. +* [Fixed #1210](https://github.com/NativeScript/nativescript-cli/issues/1210): LiveSync does not handle correctly removed files on iOS simulator. +* [Fixes #1308](https://github.com/NativeScript/nativescript-cli/issues/1308): Livesync ends up with an endless loop for projects that have before-prepare hook that changes some project file. +* [Fixed #1313](https://github.com/NativeScript/nativescript-cli/issues/1313): `tns livesync ios --watch --emulator` command does not process platform specific files. + 1.5.1 (2015, December 03) == ### New From b7b24bf0948a47b37b562858b5d212187863a0cd Mon Sep 17 00:00:00 2001 From: Todor Totev Date: Fri, 11 Dec 2015 17:18:56 +0200 Subject: [PATCH 11/15] Update docs for Genymotion 2.6 --- docs/man_pages/project/testing/emulate-android.md | 8 ++++++-- docs/man_pages/project/testing/run-android.md | 9 +++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/docs/man_pages/project/testing/emulate-android.md b/docs/man_pages/project/testing/emulate-android.md index b4751c6a41..eff859b21d 100644 --- a/docs/man_pages/project/testing/emulate-android.md +++ b/docs/man_pages/project/testing/emulate-android.md @@ -36,8 +36,12 @@ Before running your app in the Android emulator from the Android SDK, verify tha * Verify that you have installed Genymotion. * On Windows and Linux systems, verify that you have added the Genymotion installation directory to the `PATH` environment variable. * On OS X systems, verify that you have added the following paths to the PATH environment variable. - * `/Applications/Genymotion.app/Contents/MacOS/` - * `/Applications/Genymotion Shell.app/Contents/MacOS/` + * For Genymotion earlier than 2.6: + * `/Applications/Genymotion.app/Contents/MacOS/` + * `/Applications/Genymotion Shell.app/Contents/MacOS/` + * For Genymotion 2.6: + * `/Applications/Genymotion.app/Contents/MacOS/player.app/Contents/MacOS` + * `/Applications/Genymotion Shell.app/Contents/MacOS/` ### Command Limitations diff --git a/docs/man_pages/project/testing/run-android.md b/docs/man_pages/project/testing/run-android.md index 7efe258e60..a99d35c7cf 100644 --- a/docs/man_pages/project/testing/run-android.md +++ b/docs/man_pages/project/testing/run-android.md @@ -34,8 +34,13 @@ Before running your app in the Android emulator from the Android SDK, verify tha * Verify that you have installed Genymotion. * On Windows and Linux systems, verify that you have added the Genymotion installation directory to the `PATH` environment variable. * On OS X systems, verify that you have added the following paths to the `PATH` environment variable. - * `/Applications/Genymotion.app/Contents/MacOS/` - * `/Applications/Genymotion Shell.app/Contents/MacOS/` + * For Genymotion earlier than 2.6: + * `/Applications/Genymotion.app/Contents/MacOS/` + * `/Applications/Genymotion Shell.app/Contents/MacOS/` + * For Genymotion 2.6: + * `/Applications/Genymotion.app/Contents/MacOS/player.app/Contents/MacOS` + * `/Applications/Genymotion Shell.app/Contents/MacOS/` + ### Command Limitations From dd5f60746176e22125f6e4433ec5c38ff648cf98 Mon Sep 17 00:00:00 2001 From: Fatme Havaluova Date: Sat, 12 Dec 2015 16:20:30 +0200 Subject: [PATCH 12/15] On some devices ro.product.manufacturer returns unknown. This leads to endless loop for CLI. Since the underlying emulation engine for Genymotion is VirtualBox and that's not going to change any time soon, I've added a check for ro.build.product property. --- lib/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common b/lib/common index 57b112013f..33ed5a86b4 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit 57b112013f434083faa495c4a2ba61060081308c +Subproject commit 33ed5a86b44f5c9256be1b413f38c2d4d777ba22 From a5e8eb1738e04d9f0a8de0e7408f71f537c0fc25 Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Mon, 14 Dec 2015 11:59:23 +0200 Subject: [PATCH 13/15] Update System Requirements for Android development Update System Requirements for Android development according to 1.5.x changes. --- README.md | 62 +++++++++++++------------------------------------------ 1 file changed, 14 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index 5225f6d553..a3ac6fd200 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ You can install and run the NativeScript CLI on Windows or OS X. > On Windows systems, you can develop, build, and deploy NativeScript projects that target Android. * Windows Vista or later -* The latest Node.js [0.10.x](https://nodejs.org/dist/latest-v0.10.x/), [0.12.x](https://nodejs.org/dist/latest-v0.12.x/) or [4.2.x](https://nodejs.org/dist/latest-v4.x/) stable official release +* The latest Node.js [0.10.x](https://nodejs.org/dist/latest-v0.10.x/), [0.12.x](https://nodejs.org/dist/latest-v0.12.x/), [4.2.x](https://nodejs.org/dist/latest-v4.x/) or [5.x](https://nodejs.org/dist/latest-v5.x/) stable official release * (Optional) [Chocolatey][Chocolatey] * [JDK 8][JDK 8] or a later stable official release * [Android SDK 22][Android SDK 22] or a later stable official release @@ -77,15 +77,6 @@ You can install and run the NativeScript CLI on Windows or OS X. * [Android Support Repository][Android Support Repository] * (Optional) [Genymotion][Genymotion] -If you want to develop for Android, verify that you have added the following paths in the `PATH` system environment variable. - -``` -Path to tools directory in the Android SDK installation folder -Path to platform-tools directory in the Android SDK installation folder -``` - -For example: PATH=...;...;C:\Users\MyUser\AppData\Local\Android\android-sdk\tools;C:\Users\MyUser\AppData\Local\Android\android-sdk\platform-tools; - If you have installed Chocolatey, you can complete these steps to set up JDK, and Android SDK. 1. Run a Windows command prompt. @@ -97,7 +88,7 @@ If you have installed Chocolatey, you can complete these steps to set up JDK, an 1. If not present, create the following environment variables. ``` - JAVA_HOME=Path to the jdk* install folder + JAVA_HOME=Path to the jdk* install directory ``` For example: JAVA_HOME=C:\Program Files\Java\jdk1.8.0_66 @@ -107,19 +98,14 @@ If you have installed Chocolatey, you can complete these steps to set up JDK, an ``` For example: ANDROID_HOME=C:\Android\android-sdk + +> NOTE: This is the directory that contains `tools` and `platform-tools` directories. + 1. To install the Android SDK, run the following command. ```Shell choco install android-sdk ``` -1. If not present, add the following file path to the `PATH` system environment variable. - - ``` - Path to tools directory in the Android SDK installation folder - Path to platform-tools directory in the Android SDK installation folder - ``` - - For example: PATH=...;...;C:\Users\MyUser\AppData\Local\Android\android-sdk\tools;C:\Users\MyUser\AppData\Local\Android\android-sdk\platform-tools 1. To update the Android SDK to 22 or later, run the following command. ```Shell @@ -139,7 +125,7 @@ android update sdk --filter tools,platform-tools,android-22,build-tools-22.0.1,s > On OS X systems, you can develop, build, and deploy NativeScript projects that target iOS and Android. * OS X Mavericks -* The latest Node.js [0.10.x](https://nodejs.org/dist/latest-v0.10.x/) or [0.12.x](https://nodejs.org/dist/latest-v0.12.x/), or [4.2.x](https://nodejs.org/dist/latest-v4.x/) stable official release +* The latest Node.js [0.10.x](https://nodejs.org/dist/latest-v0.10.x/), [0.12.x](https://nodejs.org/dist/latest-v0.12.x/), [4.2.x](https://nodejs.org/dist/latest-v4.x/) or [5.x](https://nodejs.org/dist/latest-v5.x/) stable official release * For iOS development * [Latest Xcode][12] * [Xcode command-line tools][12] @@ -151,22 +137,10 @@ android update sdk --filter tools,platform-tools,android-22,build-tools-22.0.1,s * [Android Support Repository][Android Support Repository] * (Optional) [Genymotion][Genymotion] -If you want to develop for Android, verify that you have added the following paths in your `PATH` in `~/.bash_profile`. - -``` -Path to the tools subdirectory in the Android SDK installation directory -Path to the platform-tools subdirectory in the Android SDK installation directory -``` - -For example: -``` -export PATH=${PATH}:/Applications/Android\ Studio.app/sdk/tools:/Applications/Android\ Studio.app/sdk/platform-tools -``` - If not present, create the following environment variables. ``` -JAVA_HOME=Path to the jdk* install folder +JAVA_HOME=Path to the jdk* install directory ``` For example: JAVA_HOME=/usr/bin/java @@ -175,7 +149,9 @@ For example: JAVA_HOME=/usr/bin/java ANDROID_HOME=Path to Android installation directory ``` -For example: ANDROID_HOME=/Applications/Android\ Studio.app/sdk/ +For example: ANDROID_HOME=/usr/local/Cellar/android-sdk/24/ + +> NOTE: This is the directory that contains `tools` and `platform-tools` directories. You can install the required Android tools with the following command: @@ -188,7 +164,7 @@ echo yes | android update sdk --filter tools,platform-tools,android-22,build-too > On Linux systems, you can develop, build, and deploy NativeScript projects that target Android. * Ubuntu 14.04 LTS -* The latest Node.js [0.10.x](https://nodejs.org/dist/latest-v0.10.x/) or [0.12.x](https://nodejs.org/dist/latest-v0.12.x/), or [4.2.x](https://nodejs.org/dist/latest-v4.x/) stable official release +* The latest Node.js [0.10.x](https://nodejs.org/dist/latest-v0.10.x/), [0.12.x](https://nodejs.org/dist/latest-v0.12.x/), [4.2.x](https://nodejs.org/dist/latest-v4.x/) or [5.x](https://nodejs.org/dist/latest-v5.x/) stable official release > **TIP:** You can follow the instructions provided [here](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager) to install Node.js on your system. @@ -209,22 +185,10 @@ echo yes | android update sdk --filter tools,platform-tools,android-22,build-too * [Android Support Repository][Android Support Repository] * (Optional) [Genymotion][Genymotion] -Verify that you have added the following paths in your `PATH`. - -``` -Path to the tools subdirectory in the Android SDK installation directory -Path to the platform-tools subdirectory in the Android SDK installation directory -``` - -For example: -``` -export PATH=${PATH}:/home/user/android-sdk/tools:/home/user/android-sdk/platform-tools -``` - If not present, create the following environment variables. ``` -JAVA_HOME=Path to the jdk* install folder +JAVA_HOME=Path to the jdk* install directory ``` For example: JAVA_HOME=/usr/bin/java @@ -235,6 +199,8 @@ ANDROID_HOME=Path to Android installation directory For example: ANDROID_HOME=/home/user/android-sdk +> NOTE: This is the directory that contains `tools` and `platform-tools` directories. + You can install required Android Tools with the following command. ```Shell From 848219fd1ed31b6ec30ce9f507083448b999b3ad Mon Sep 17 00:00:00 2001 From: Neli Chakarova Date: Tue, 15 Dec 2015 10:18:32 +0200 Subject: [PATCH 14/15] CocoaPods.md -> the CocoaPods article --- PLUGINS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PLUGINS.md b/PLUGINS.md index 5fac790cfc..abecd6009e 100644 --- a/PLUGINS.md +++ b/PLUGINS.md @@ -83,7 +83,7 @@ my-plugin/ * `platforms\android\include.gradle`: This file modifies the native Android configuration of your NativeScript project such as native dependencies, build types and configurations. For more information about the format of `include.gradle`, see [include.gradle file](#includegradle-specification). * `platforms/android/res`: (Optional) This directory contains resources declared by the `AndroidManifest.xml` file. You can look at the folder structure [here](http://developer.android.com/guide/topics/resources/providing-resources.html#ResourceTypes). * `platforms/ios/Info.plist`: This file describes any specific configuration changes required for your plugin to work. For example: required permissions. For more information about the format of `Info.plist`, see [About Information Property List Files](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html).
During the plugin installation, the NativeScript CLI will merge the plugin `Info.plist` with the `Info.plist` for your project. The NativeScript CLI will not resolve any contradicting or duplicate entries during the merge. After the plugin is installed, you need to manually resolve such issues. -* `platforms/ios/Podfile`: This file describes the dependency to the library that you want to use. For more information, see [CocoaPods.md](CocoaPods.md). +* `platforms/ios/Podfile`: This file describes the dependency to the library that you want to use. For more information, see [the CocoaPods article](CocoaPods.md). NativeScript plugins which contain both native Android and iOS libraries might have the following directory structure. @@ -336,4 +336,4 @@ Make sure to run the command for all platforms configured for the project. Durin Next, open your `platforms\ios\Info.plist` file and remove any leftover entries from the plugin `Info.plist` file. -Finally, make sure to update your code not to use the uninstalled plugin. \ No newline at end of file +Finally, make sure to update your code not to use the uninstalled plugin. From 90a4cc0452369667e66e73a3ebd20776ef468b43 Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Tue, 15 Dec 2015 15:51:15 +0200 Subject: [PATCH 15/15] Require logger and update to latest common lib `logger` has been required in common lib, but due to some Proton requirements, it should be required from each CLI. Fix this by adding it to bootstrap and update to latest common lib. --- lib/bootstrap.ts | 1 + lib/common | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bootstrap.ts b/lib/bootstrap.ts index 670aeabb40..5f13a02e0a 100644 --- a/lib/bootstrap.ts +++ b/lib/bootstrap.ts @@ -1,4 +1,5 @@ require("./common/bootstrap"); +$injector.require("logger", "./common/logger"); $injector.require("config", "./config"); $injector.require("options", "./options"); // note: order above is important! diff --git a/lib/common b/lib/common index 416012b69c..b083503f9a 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit 416012b69cd8bf67e9470d7f3670d631830e08c5 +Subproject commit b083503f9a6627363e0c0d4e0a1971a1991172dd