Giter Site home page Giter Site logo

Comments (11)

badsyntax avatar badsyntax commented on May 19, 2024 1

Hey, this should be fixed now. You need to use version 2.2.5 2.2.6. It should now list gradle tasks in nested gradle projects. Let me know if there's any issues, thanks.

from vscode-gradle.

badsyntax avatar badsyntax commented on May 19, 2024

Hi, thanks for the report. It will only detect gradle tasks if a gradle build file exists in the root of the project. Can you try open the android root project and seeing if it can detect gradle tasks?
Can you also describe or post screenshots of the manual detection of tasks in Android studio?
Basically I'm happy to make changes to support this but I'm not sure exactly what changes you'd like.

from vscode-gradle.

alyyasser avatar alyyasser commented on May 19, 2024

tried opening the android root project inside the flutter project, it can detect the tasks.
im not sure how android studio did it, if i remember it correctly, when i open the flutter project without importing it as gradle project, it won't detect the gradle tasks.

is it possible to do lookup for the build.gradle file through all sub-directories inside the root folder/project, not just detecting it by looking in current root folder?

from vscode-gradle.

alyyasser avatar alyyasser commented on May 19, 2024

it's just come into my mind, so i tried it, i create a symlink build.gradle file inside the root folder/project, linked to build.gradle inside /android folder, and it works, it's now can detect the tasks.
i guess, that's the workaround for now.

from vscode-gradle.

badsyntax avatar badsyntax commented on May 19, 2024

There's pros and cons to detecting build files in sub directories. Up till now I didn't think there was any need to check sub directories as the typical setup for gradle projects is to have the build file in the root. I will create an example flutter project to better understand the expected workflow here and get back to you. Great that the symlink workaround works for the meantime.

from vscode-gradle.

alyyasser avatar alyyasser commented on May 19, 2024

the symlink is work somehow, but unfortunely, it show different tasks.
here is the tasks shown after creating symlinked build.gradle
symlinked-build.gradle

and here is the tasks shown when opening android root project
/android/build.gradle
/android/build.gradle

maybe, it might help if there's manual setting for the build.gradle location to choose.

from vscode-gradle.

badsyntax avatar badsyntax commented on May 19, 2024

Thanks for this. I'll replicate this scenario to better understand the problem then I'll propose a solution.

from vscode-gradle.

badsyntax avatar badsyntax commented on May 19, 2024

In the meantime can I ask why you need to run gradle tasks for a flutter app? Seems like most tasks should be run through the flutter cli app. Not saying I won't provide support for this, just curious as to the workflow. Thanks.

from vscode-gradle.

badsyntax avatar badsyntax commented on May 19, 2024

I've got an initial approach working, you can see some screenshot in #88

from vscode-gradle.

alyyasser avatar alyyasser commented on May 19, 2024

im so sorry for late reply

In the meantime can I ask why you need to run gradle tasks for a flutter app? Seems like most tasks should be run through the flutter cli app.

as for why i need to run gradle tasks, sometimes i want to run specific tasks, like dumping the keystore used by build task. i can just check it through direct keystore command, but it would be nice to just run a gradle task for it :)

anyway, thank you very much for providing support for this, i appreciate it

from vscode-gradle.

badsyntax avatar badsyntax commented on May 19, 2024

No worries, thanks for getting ring back to me, makes sense. I've made the behaviour detect nested gradle projects by default. If this causes issues for users I'll make it configurable. For now it seems ok.

from vscode-gradle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.