Skip to content

Make gradle error more user friendly #893

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 1 commit into from
Sep 8, 2015
Merged
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions lib/services/android-project-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
public createProject(frameworkDir: string, frameworkVersion: string): IFuture<void> {
return (() => {
if(semver.lt(frameworkVersion, AndroidProjectService.MIN_RUNTIME_VERSION_WITH_GRADLE)) {
this.$errors.fail(`The NativeScript CLI requires Android runtime ${AndroidProjectService.MIN_RUNTIME_VERSION_WITH_GRADLE} or later to work properly.`);
this.$errors.failWithoutHelp(`The NativeScript CLI requires Android runtime ${AndroidProjectService.MIN_RUNTIME_VERSION_WITH_GRADLE} or later to work properly.`);
}

// TODO: Move these check to validate method once we do not support ant.
Expand Down Expand Up @@ -405,7 +405,7 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
private checkGradle(): IFuture<void> {
return (() => {
if(!this.$sysInfo.getSysInfo().gradleVer) {
this.$errors.fail("Error executing commands 'gradle', make sure you have gradle installed and added to your PATH.");
this.$errors.failWithoutHelp("Error executing commands 'gradle'. Make sure you have Gradle installed and its bin directory added to your PATH.");
}

this.$androidToolsInfo.validateInfo({showWarningsAsErrors: true, validateTargetSdk: true}).wait();
Expand Down