Skip to content

Merge release in master #1352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Dec 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b6c9176
Add baseConfig option
rosen-vladimirov Dec 2, 2015
dc9b7ae
Merge pull request #1305 from NativeScript/vladimirov/add-base-config…
rosen-vladimirov Dec 3, 2015
bdb707c
Don't stop adb uninstall
teobugslayer Dec 7, 2015
14f9a1b
Merge pull request #1319 from NativeScript/totev/dont-stop-adb-uninstall
teobugslayer Dec 7, 2015
c4f2aa1
Bump up version to 1.5.2
Dec 8, 2015
4a7ae44
Merge pull request #1322 from NativeScript/vchimev-152
Dec 8, 2015
66251d1
Fix ENOENT err
Dec 8, 2015
329c371
Merge pull request #1324 from NativeScript/fatme/fix-enoent-err
Dec 8, 2015
0254ad2
Prepare empty directories
Dec 8, 2015
cf4f48a
Allow building of projects with spaces in directory names on Windows
teobugslayer Dec 9, 2015
858d7b7
Merge pull request #1330 from NativeScript/totev/build-with-spaces
teobugslayer Dec 9, 2015
95fab4a
Fix spelling
teobugslayer Dec 9, 2015
8137919
Merge pull request #1331 from NativeScript/totoev/spelling
teobugslayer Dec 9, 2015
0728cc9
Merge pull request #1325 from NativeScript/fatme/prepare-empty-direct…
Dec 10, 2015
a1acbd6
Skip files that are not changed from sync
Dec 9, 2015
cfc9a0a
Merge pull request #1327 from NativeScript/fatme/hashes
Dec 10, 2015
92b3752
Update to latest common lib
Dec 11, 2015
6164ea5
Merge pull request #1336 from NativeScript/fatme/update-lasest-common…
Dec 11, 2015
e92a57a
Changelog for 1.5.2 release
Dec 11, 2015
b7b24bf
Update docs for Genymotion 2.6
teobugslayer Dec 11, 2015
4e2bd44
Merge pull request #1340 from NativeScript/fatme/changelog-1.5.2
Dec 11, 2015
dd5f607
On some devices ro.product.manufacturer returns unknown. This leads t…
Dec 12, 2015
86853a1
Merge pull request #1344 from NativeScript/fatme/fix-geny
Dec 12, 2015
a5e8eb1
Update System Requirements for Android development
rosen-vladimirov Dec 14, 2015
78097e6
Merge pull request #1341 from NativeScript/totev/geny26-docs
Dec 14, 2015
15304dd
Merge pull request #1346 from NativeScript/vladimirov/fix-readme-again
Dec 14, 2015
848219f
CocoaPods.md -> the CocoaPods article
N3ll Dec 15, 2015
2176482
Merge pull request #1351 from NativeScript/minorChange
N3ll Dec 15, 2015
9b4d71d
Merge branch 'release' into vladimirov/merge-rel-master
rosen-vladimirov Dec 15, 2015
90a4cc0
Require logger and update to latest common lib
rosen-vladimirov Dec 15, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion PLUGINS.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,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\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.
* `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).
* `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).

### Package.json Specification

Expand Down
62 changes: 14 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,14 @@ 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
* [Android SDK Build-tools 22.0.0][Android SDK Build-tools 22.0.0] or a later stable official release
* [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.
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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]
Expand All @@ -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
Expand All @@ -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:

Expand All @@ -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.

Expand All @@ -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
Expand All @@ -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
Expand Down
8 changes: 6 additions & 2 deletions docs/man_pages/project/testing/emulate-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 7 additions & 2 deletions docs/man_pages/project/testing/run-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions lib/bootstrap.ts
Original file line number Diff line number Diff line change
@@ -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!
Expand Down
1 change: 1 addition & 0 deletions lib/declarations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ interface IOptions extends ICommonOptions {
compileSdk: number;
port: Number;
copyTo: string;
baseConfig: string;
}

interface IProjectFilesManager {
Expand Down
1 change: 1 addition & 0 deletions lib/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 3 additions & 5 deletions lib/services/android-project-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -368,11 +371,6 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
}

private spawn(command: string, args: string[], opts?: any): IFuture<void> {
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"});
}

Expand Down
4 changes: 2 additions & 2 deletions lib/services/doctor-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
14 changes: 11 additions & 3 deletions lib/services/platform-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -224,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');
Expand All @@ -242,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);

Expand Down
2 changes: 1 addition & 1 deletion lib/services/plugins-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
4 changes: 4 additions & 0 deletions lib/services/usb-livesync-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer

let getApplicationPathForiOSSimulatorAction = (): IFuture<string> => {
return (() => {
if (!this.$fs.exists(platformData.emulatorBuildOutputPath).wait()) {
this.$platformService.buildPlatform(platformData.normalizedPlatformName).wait();
}

return this.$platformService.getLatestApplicationPackageForEmulator(platformData).wait().packageName;
}).future<string>()();
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down