Bashrc not loaded when running Gradle script from Android StudioGet the source directory of a Bash script from within the script itselfIs there a way to run Python on Android?How to check if a program exists from a Bash script?How to check if a service is running on Android?Android Studio installation on Windows 7 fails, no JDK foundAndroid Studio: Add jar as library?What is Gradle in Android Studio?Building and running app via Gradle and Android Studio is slower than via EclipsePassing -P parameters to gradle from android studioHow do I run the same Gradle daemon for terminal and Android Studio?

Gas pipes - why does gas burn "outwards?"

What is going on: C++ std::move on std::shared_ptr increases use_count?

Do Milankovitch Cycles fully explain climate change?

Sol Ⅲ = Earth: What is the origin of this planetary naming scheme?

How to progress with CPLEX/Gurobi

Are programming languages necessary/useful for operations research practitioner?

Why would "an mule" be used instead of "a mule"?

What does "synoptic" mean in avionics?

What's the biggest difference between these two photos?

What is the use of FullForm in Mathematica?

Why should I always enable compiler warnings?

Job offer without any details but asking me to withdraw other applications - is it normal?

Why didn't Thor use the All powerful spear instead of Stormbreaker?

2.5 year old daughter refuses to take medicine

RP Automatic Updates

Can a level 1 Fiend Pact warlock cast a scroll of fireball?

Why does F + F' = 1?

Was Robin Hood's point of view ethically sound?

Is there a star over my head?

Might have gotten a coworker sick, should I address this?

What is negative current?

How is the Team Scooby Doo funded?

Procedure for traffic not in sight

Is there a basic list of ways in which a low-level Rogue can get advantage for sneak attack?



Bashrc not loaded when running Gradle script from Android Studio


Get the source directory of a Bash script from within the script itselfIs there a way to run Python on Android?How to check if a program exists from a Bash script?How to check if a service is running on Android?Android Studio installation on Windows 7 fails, no JDK foundAndroid Studio: Add jar as library?What is Gradle in Android Studio?Building and running app via Gradle and Android Studio is slower than via EclipsePassing -P parameters to gradle from android studioHow do I run the same Gradle daemon for terminal and Android Studio?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I have a problem with Gradle script on Ubuntu 16.04. It looks like my .bashrc is not loaded when I'm invoking script from Android Studio.



My script:



task myTask {
doLast
exec
workingDir project.rootProject.rootDir
commandLine 'll' // alias provided from my .bashrc




When I'm starting it with ./gradlew myTask everything works, but when starting from gui I'm getting




A problem occurred starting process 'command 'll''




What am I doing wrong?










share|improve this question


























  • Run source manually?

    – Zoe
    Mar 28 at 8:30


















2















I have a problem with Gradle script on Ubuntu 16.04. It looks like my .bashrc is not loaded when I'm invoking script from Android Studio.



My script:



task myTask {
doLast
exec
workingDir project.rootProject.rootDir
commandLine 'll' // alias provided from my .bashrc




When I'm starting it with ./gradlew myTask everything works, but when starting from gui I'm getting




A problem occurred starting process 'command 'll''




What am I doing wrong?










share|improve this question


























  • Run source manually?

    – Zoe
    Mar 28 at 8:30














2












2








2








I have a problem with Gradle script on Ubuntu 16.04. It looks like my .bashrc is not loaded when I'm invoking script from Android Studio.



My script:



task myTask {
doLast
exec
workingDir project.rootProject.rootDir
commandLine 'll' // alias provided from my .bashrc




When I'm starting it with ./gradlew myTask everything works, but when starting from gui I'm getting




A problem occurred starting process 'command 'll''




What am I doing wrong?










share|improve this question
















I have a problem with Gradle script on Ubuntu 16.04. It looks like my .bashrc is not loaded when I'm invoking script from Android Studio.



My script:



task myTask {
doLast
exec
workingDir project.rootProject.rootDir
commandLine 'll' // alias provided from my .bashrc




When I'm starting it with ./gradlew myTask everything works, but when starting from gui I'm getting




A problem occurred starting process 'command 'll''




What am I doing wrong?







android bash gradle






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 8:30









Zoe

15.8k12 gold badges66 silver badges96 bronze badges




15.8k12 gold badges66 silver badges96 bronze badges










asked Mar 28 at 8:25









lineanlinean

485 bronze badges




485 bronze badges















  • Run source manually?

    – Zoe
    Mar 28 at 8:30


















  • Run source manually?

    – Zoe
    Mar 28 at 8:30

















Run source manually?

– Zoe
Mar 28 at 8:30






Run source manually?

– Zoe
Mar 28 at 8:30













1 Answer
1






active

oldest

votes


















1
















Try that :



task myTask 
doLast
exec
workingDir project.rootProject.rootDir
commandLine 'bash', '-c', '-i', 'll' // alias provided from my .bashrc








share|improve this answer

























  • Thanks, it works great. What about other platforms? Do I need to have separate command for Mac and Windows?

    – linean
    Mar 28 at 11:00











  • if your command is really ll, yes, it won't work elsewhere

    – ToYonos
    Mar 28 at 11:03











  • This is just an example. Is it possible to set interactive bash as default for Gradle?

    – linean
    Mar 31 at 7:40











  • You can write your own exec task wrapping this behavior

    – ToYonos
    Mar 31 at 8:19










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);














draft saved

draft discarded
















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55393014%2fbashrc-not-loaded-when-running-gradle-script-from-android-studio%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1
















Try that :



task myTask 
doLast
exec
workingDir project.rootProject.rootDir
commandLine 'bash', '-c', '-i', 'll' // alias provided from my .bashrc








share|improve this answer

























  • Thanks, it works great. What about other platforms? Do I need to have separate command for Mac and Windows?

    – linean
    Mar 28 at 11:00











  • if your command is really ll, yes, it won't work elsewhere

    – ToYonos
    Mar 28 at 11:03











  • This is just an example. Is it possible to set interactive bash as default for Gradle?

    – linean
    Mar 31 at 7:40











  • You can write your own exec task wrapping this behavior

    – ToYonos
    Mar 31 at 8:19















1
















Try that :



task myTask 
doLast
exec
workingDir project.rootProject.rootDir
commandLine 'bash', '-c', '-i', 'll' // alias provided from my .bashrc








share|improve this answer

























  • Thanks, it works great. What about other platforms? Do I need to have separate command for Mac and Windows?

    – linean
    Mar 28 at 11:00











  • if your command is really ll, yes, it won't work elsewhere

    – ToYonos
    Mar 28 at 11:03











  • This is just an example. Is it possible to set interactive bash as default for Gradle?

    – linean
    Mar 31 at 7:40











  • You can write your own exec task wrapping this behavior

    – ToYonos
    Mar 31 at 8:19













1














1










1









Try that :



task myTask 
doLast
exec
workingDir project.rootProject.rootDir
commandLine 'bash', '-c', '-i', 'll' // alias provided from my .bashrc








share|improve this answer













Try that :



task myTask 
doLast
exec
workingDir project.rootProject.rootDir
commandLine 'bash', '-c', '-i', 'll' // alias provided from my .bashrc









share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 28 at 10:52









ToYonosToYonos

12.4k2 gold badges30 silver badges51 bronze badges




12.4k2 gold badges30 silver badges51 bronze badges















  • Thanks, it works great. What about other platforms? Do I need to have separate command for Mac and Windows?

    – linean
    Mar 28 at 11:00











  • if your command is really ll, yes, it won't work elsewhere

    – ToYonos
    Mar 28 at 11:03











  • This is just an example. Is it possible to set interactive bash as default for Gradle?

    – linean
    Mar 31 at 7:40











  • You can write your own exec task wrapping this behavior

    – ToYonos
    Mar 31 at 8:19

















  • Thanks, it works great. What about other platforms? Do I need to have separate command for Mac and Windows?

    – linean
    Mar 28 at 11:00











  • if your command is really ll, yes, it won't work elsewhere

    – ToYonos
    Mar 28 at 11:03











  • This is just an example. Is it possible to set interactive bash as default for Gradle?

    – linean
    Mar 31 at 7:40











  • You can write your own exec task wrapping this behavior

    – ToYonos
    Mar 31 at 8:19
















Thanks, it works great. What about other platforms? Do I need to have separate command for Mac and Windows?

– linean
Mar 28 at 11:00





Thanks, it works great. What about other platforms? Do I need to have separate command for Mac and Windows?

– linean
Mar 28 at 11:00













if your command is really ll, yes, it won't work elsewhere

– ToYonos
Mar 28 at 11:03





if your command is really ll, yes, it won't work elsewhere

– ToYonos
Mar 28 at 11:03













This is just an example. Is it possible to set interactive bash as default for Gradle?

– linean
Mar 31 at 7:40





This is just an example. Is it possible to set interactive bash as default for Gradle?

– linean
Mar 31 at 7:40













You can write your own exec task wrapping this behavior

– ToYonos
Mar 31 at 8:19





You can write your own exec task wrapping this behavior

– ToYonos
Mar 31 at 8:19








Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.




















draft saved

draft discarded















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55393014%2fbashrc-not-loaded-when-running-gradle-script-from-android-studio%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript