Skip to content

Commit 637746a

Browse files
Merge pull request #1352 from NativeScript/vladimirov/merge-rel-master
Merge release in master
2 parents aff4391 + 90a4cc0 commit 637746a

15 files changed

+65
-66
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
NativeScript CLI Changelog
22
================
33

4+
1.5.2 (2015, December 12)
5+
==
6+
### New
7+
* [Implemented #1247](https://github.com/NativeScript/nativescript-cli/issues/1247): Do not kill adb server if possible.
8+
9+
### Fixed
10+
* [Fixed #956](https://github.com/NativeScript/nativescript-cli/issues/956): Better error reporting for deploy on device.
11+
* [Fixed #1210](https://github.com/NativeScript/nativescript-cli/issues/1210): LiveSync does not handle correctly removed files on iOS simulator.
12+
* [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.
13+
* [Fixed #1313](https://github.com/NativeScript/nativescript-cli/issues/1313): `tns livesync ios --watch --emulator` command does not process platform specific files.
14+
415
1.5.1 (2015, December 03)
516
==
617
### New

PLUGINS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ my-plugin/
112112
* `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).
113113
* `platforms\ios`: This directory contains native dynamic iOS Cocoa Touch Frameworks (`.framework`) and Cocoa Touch Static Libraries (`.a`). During the plugin installation, the NativeScript CLI will copy these files to `lib\iOS` in your project and will configure the iOS project in `platforms\ios` to work with the libraries. If the library is written in Swift, only APIs exposed to Objective-C are exposed to NativeScript. In case the plugin contains a Cocoa Touch Static Library (`.a`), you must place all public headers (`.h`) under `include\<Static Library Name>\`. Make sure that the static libraries are built at least for the following processor architectures - armv7, arm64, i386.
114114
* `platforms\ios\build.xcconfig`: This file modifies the native iOS configuration of your NativeScript project such as native dependencies and configurations. For more information about the format of `build.xcconfig`, see [`build.xcconfig` file](#buildxcconfig-specification).
115-
* `platforms\ios\Podfile`: This file describes the dependency to the library that you want to use. For more information, see [CocoaPods.md](CocoaPods.md).
115+
* `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).
116116

117117
### Package.json Specification
118118

README.md

Lines changed: 14 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,14 @@ You can install and run the NativeScript CLI on Windows or OS X.
6969
> On Windows systems, you can develop, build, and deploy NativeScript projects that target Android.
7070
7171
* Windows Vista or later
72-
* 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
72+
* 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
7373
* (Optional) [Chocolatey][Chocolatey]
7474
* [JDK 8][JDK 8] or a later stable official release
7575
* [Android SDK 22][Android SDK 22] or a later stable official release
7676
* [Android SDK Build-tools 22.0.0][Android SDK Build-tools 22.0.0] or a later stable official release
7777
* [Android Support Repository][Android Support Repository]
7878
* (Optional) [Genymotion][Genymotion]
7979

80-
If you want to develop for Android, verify that you have added the following paths in the `PATH` system environment variable.
81-
82-
```
83-
Path to tools directory in the Android SDK installation folder
84-
Path to platform-tools directory in the Android SDK installation folder
85-
```
86-
87-
For example: PATH=...;...;C:\Users\MyUser\AppData\Local\Android\android-sdk\tools;C:\Users\MyUser\AppData\Local\Android\android-sdk\platform-tools;
88-
8980
If you have installed Chocolatey, you can complete these steps to set up JDK, and Android SDK.
9081

9182
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
9788
1. If not present, create the following environment variables.
9889

9990
```
100-
JAVA_HOME=Path to the jdk* install folder
91+
JAVA_HOME=Path to the jdk* install directory
10192
```
10293

10394
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
10798
```
10899

109100
For example: ANDROID_HOME=C:\Android\android-sdk
101+
102+
> NOTE: This is the directory that contains `tools` and `platform-tools` directories.
103+
110104
1. To install the Android SDK, run the following command.
111105

112106
```Shell
113107
choco install android-sdk
114108
```
115-
1. If not present, add the following file path to the `PATH` system environment variable.
116-
117-
```
118-
Path to tools directory in the Android SDK installation folder
119-
Path to platform-tools directory in the Android SDK installation folder
120-
```
121-
122-
For example: PATH=...;...;C:\Users\MyUser\AppData\Local\Android\android-sdk\tools;C:\Users\MyUser\AppData\Local\Android\android-sdk\platform-tools
123109
1. To update the Android SDK to 22 or later, run the following command.
124110

125111
```Shell
@@ -139,7 +125,7 @@ android update sdk --filter tools,platform-tools,android-22,build-tools-22.0.1,s
139125
> On OS X systems, you can develop, build, and deploy NativeScript projects that target iOS and Android.
140126
141127
* OS X Mavericks
142-
* 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
128+
* 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
143129
* For iOS development
144130
* [Latest Xcode][12]
145131
* [Xcode command-line tools][12]
@@ -151,22 +137,10 @@ android update sdk --filter tools,platform-tools,android-22,build-tools-22.0.1,s
151137
* [Android Support Repository][Android Support Repository]
152138
* (Optional) [Genymotion][Genymotion]
153139

154-
If you want to develop for Android, verify that you have added the following paths in your `PATH` in `~/.bash_profile`.
155-
156-
```
157-
Path to the tools subdirectory in the Android SDK installation directory
158-
Path to the platform-tools subdirectory in the Android SDK installation directory
159-
```
160-
161-
For example:
162-
```
163-
export PATH=${PATH}:/Applications/Android\ Studio.app/sdk/tools:/Applications/Android\ Studio.app/sdk/platform-tools
164-
```
165-
166140
If not present, create the following environment variables.
167141

168142
```
169-
JAVA_HOME=Path to the jdk* install folder
143+
JAVA_HOME=Path to the jdk* install directory
170144
```
171145

172146
For example: JAVA_HOME=/usr/bin/java
@@ -175,7 +149,9 @@ For example: JAVA_HOME=/usr/bin/java
175149
ANDROID_HOME=Path to Android installation directory
176150
```
177151

178-
For example: ANDROID_HOME=/Applications/Android\ Studio.app/sdk/
152+
For example: ANDROID_HOME=/usr/local/Cellar/android-sdk/24/
153+
154+
> NOTE: This is the directory that contains `tools` and `platform-tools` directories.
179155
180156
You can install the required Android tools with the following command:
181157

@@ -188,7 +164,7 @@ echo yes | android update sdk --filter tools,platform-tools,android-22,build-too
188164
> On Linux systems, you can develop, build, and deploy NativeScript projects that target Android.
189165
190166
* Ubuntu 14.04 LTS
191-
* 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
167+
* 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
192168

193169
> **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.
194170

@@ -209,22 +185,10 @@ echo yes | android update sdk --filter tools,platform-tools,android-22,build-too
209185
* [Android Support Repository][Android Support Repository]
210186
* (Optional) [Genymotion][Genymotion]
211187

212-
Verify that you have added the following paths in your `PATH`.
213-
214-
```
215-
Path to the tools subdirectory in the Android SDK installation directory
216-
Path to the platform-tools subdirectory in the Android SDK installation directory
217-
```
218-
219-
For example:
220-
```
221-
export PATH=${PATH}:/home/user/android-sdk/tools:/home/user/android-sdk/platform-tools
222-
```
223-
224188
If not present, create the following environment variables.
225189

226190
```
227-
JAVA_HOME=Path to the jdk* install folder
191+
JAVA_HOME=Path to the jdk* install directory
228192
```
229193

230194
For example: JAVA_HOME=/usr/bin/java
@@ -235,6 +199,8 @@ ANDROID_HOME=Path to Android installation directory
235199

236200
For example: ANDROID_HOME=/home/user/android-sdk
237201

202+
> NOTE: This is the directory that contains `tools` and `platform-tools` directories.
203+
238204
You can install required Android Tools with the following command.
239205

240206
```Shell

docs/man_pages/project/testing/emulate-android.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ Before running your app in the Android emulator from the Android SDK, verify tha
3636
* Verify that you have installed Genymotion.
3737
* On Windows and Linux systems, verify that you have added the Genymotion installation directory to the `PATH` environment variable.
3838
* On OS X systems, verify that you have added the following paths to the PATH environment variable.
39-
* `/Applications/Genymotion.app/Contents/MacOS/`
40-
* `/Applications/Genymotion Shell.app/Contents/MacOS/`
39+
* For Genymotion earlier than 2.6:
40+
* `/Applications/Genymotion.app/Contents/MacOS/`
41+
* `/Applications/Genymotion Shell.app/Contents/MacOS/`
42+
* For Genymotion 2.6:
43+
* `/Applications/Genymotion.app/Contents/MacOS/player.app/Contents/MacOS`
44+
* `/Applications/Genymotion Shell.app/Contents/MacOS/`
4145

4246
### Command Limitations
4347

docs/man_pages/project/testing/run-android.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,13 @@ Before running your app in the Android emulator from the Android SDK, verify tha
3434
* Verify that you have installed Genymotion.
3535
* On Windows and Linux systems, verify that you have added the Genymotion installation directory to the `PATH` environment variable.
3636
* On OS X systems, verify that you have added the following paths to the `PATH` environment variable.
37-
* `/Applications/Genymotion.app/Contents/MacOS/`
38-
* `/Applications/Genymotion Shell.app/Contents/MacOS/`
37+
* For Genymotion earlier than 2.6:
38+
* `/Applications/Genymotion.app/Contents/MacOS/`
39+
* `/Applications/Genymotion Shell.app/Contents/MacOS/`
40+
* For Genymotion 2.6:
41+
* `/Applications/Genymotion.app/Contents/MacOS/player.app/Contents/MacOS`
42+
* `/Applications/Genymotion Shell.app/Contents/MacOS/`
43+
3944

4045
### Command Limitations
4146

lib/bootstrap.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require("./common/bootstrap");
2+
$injector.require("logger", "./common/logger");
23
$injector.require("config", "./config");
34
$injector.require("options", "./options");
45
// note: order above is important!

lib/declarations.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ interface IOptions extends ICommonOptions {
8787
compileSdk: number;
8888
port: Number;
8989
copyTo: string;
90+
baseConfig: string;
9091
}
9192

9293
interface IProjectFilesManager {

lib/options.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export class Options extends commonOptionsLibPath.OptionsBase {
3434
compileSdk: {type: OptionType.Number },
3535
port: { type: OptionType.Number },
3636
copyTo: { type: OptionType.String },
37+
baseConfig: { type: OptionType.String }
3738
},
3839
path.join($hostInfo.isWindows ? process.env.LocalAppData : path.join(osenv.home(), ".local/share"), ".nativescript-cli"),
3940
$errors, $staticConfig);

lib/services/android-project-service.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
222222
}
223223

224224
let gradleBin = this.useGradleWrapper(projectRoot) ? path.join(projectRoot, "gradlew") : "gradle";
225+
if (this.$hostInfo.isWindows) {
226+
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
227+
}
225228
this.spawn(gradleBin, buildOptions, { stdio: "inherit", cwd: this.platformData.projectRoot }).wait();
226229
} else {
227230
this.checkAnt().wait();
@@ -368,11 +371,6 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
368371
}
369372

370373
private spawn(command: string, args: string[], opts?: any): IFuture<void> {
371-
if (this.$hostInfo.isWindows) {
372-
args.unshift('/s', '/c', command);
373-
command = process.env.COMSPEC || 'cmd.exe';
374-
}
375-
376374
return this.$childProcess.spawnFromEvent(command, args, "close", opts || { stdio: "inherit"});
377375
}
378376

0 commit comments

Comments
 (0)