AtomBuild / atom-build-gradle

Gradle plugin for atom-build
MIT License
3 stars 7 forks source link

Getting Unable to execute: gradle with a portable environment folder #11

Closed RomuloPBenedetti closed 8 years ago

RomuloPBenedetti commented 8 years ago

I've build a portable environment folder with gradle, java, git, cmd and atom, I can run and build my projects normaly from my portable cmd but not from atom, I get:

Executing: gradle build 
Unable to execute: gradle
Make sure `cmd` and `cwd` exists and have correct access permissions.

I've set path for atom in a batch file (even cmd portable comes before %path%) and cmd is recognized:

@echo off
set ABS_PATH=%~dp0
set PATH=%ABS_PATH%GitPortable\App\Git\bin;%ABS_PATH%gradle-2.10\bin;%ABS_PATH%MinGW\bin;%ABS_PATH%MinGW\msys\1.0\bin;%ABS_PATH%jdk-8u45-windows-i586\bin;%ABS_PATH%CommandPromptPortable\
start atom\Atom.Portable.exe
exit
noseglid commented 8 years ago

If you run this on latest atom-build it should now tell you the PATH that is used by atom-build when failing. Can you make sure that gradle is in one of those paths?

RomuloPBenedetti commented 8 years ago
Aparently yes... As visible at the last post

Unable to execute: gradle
Make sure `cmd` and `cwd` exists and have correct access permissions.
Build finds binaries in these folders: C:\Ambiente-de-desenvolvimento- portável\GitPortable\App\Git\bin;C:\Ambiente-de-desenvolvimento-portável\gradle-2.10\bin;C:\Ambiente-de-desenvolvimento-portável\MinGW\bin;C:\Ambiente-de-desenvolvimento-portável\MinGW\msys\1.0\bin;C:\Ambiente-de-desenvolvimento-portável\jdk-8u45-windows-i586\bin;C:\Ambiente-de-desenvolvimento-portável\CommandPromptPortable\;C:\Ambiente-de-desenvolvimento-portável\jre-8u66-windows\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Google\Chrome\Application;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Ambiente-de-desenvolvimento-portável\atom\App;C:\Ambiente-de-desenvolvimento-portável\atom\App\..\..\git\bin;C:\Ambiente-de-desenvolvimento-portável\atom\App\..\..\git\cmd;C:\Ambiente-de-desenvolvimento-portável\atom\App\Atom\resources\app\apm\bin;C:\Ambiente-de-desenvolvimento-portável\atom\App\Atom\resources\app\apm\node_modules\.bin;C:\Ambiente-de-desenvolvimento-portável\atom\App\..\..\python\App;C:\Ambiente-de-desenvolvimento-portável\atom\App\..\..\ruby\bin;C:\Program Files (x86)\Python27
Gradle: buildPhenoGlad(java)\src\main\java\phenoglad\graphic\AnimationEvents.java1:1
CRLFUTF-8Javamaster

\gradle-2.10\bin exist in my portable folder:

interface5

If wanted, I can pass you as I have a compacted version of it on my drive.

noseglid commented 8 years ago

And what is in the \gradle-2.10\bin folder? gradle or gradle.bat or gradle.cmd ?

Also, what throws me off is that it seems to run gradle but if you're on windows it should run gradle.cmd: https://github.com/AtomBuild/atom-build-gradle/blob/master/lib/gradle.js#L78

What version if build-gradle do you have?