Skip to content
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

Improve gradle plugin task parsing #5230

Merged
merged 3 commits into from
Sep 15, 2016
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Remove .gradletasknamecache before regenerating it
Remove the .gradletasknamecache file to avoid having an unnecessary
newline at the top of the file when regenerating it.
  • Loading branch information
bes committed Jul 14, 2016
commit 2c793a844ca8a3cdb2e72dee9ec357a0ad134a5b
12 changes: 8 additions & 4 deletions plugins/gradle/gradle.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ _gradle_tasks () {
if [[ -f build.gradle ]]; then
_gradle_arguments
if _gradle_does_task_list_need_generating; then
# First make an empty file
echo '' > .gradletasknamecache
# First empty the old cache file
if [ -f .gradletasknamecache ]; then
rm .gradletasknamecache
fi
# Then append the rest of the lines to that file
output=$(gradle tasks --all)
_gradle_parse_tasks_to_gradletasknamecache $output
Expand All @@ -111,8 +113,10 @@ _gradlew_tasks () {
if [[ -f build.gradle ]]; then
_gradle_arguments
if _gradle_does_task_list_need_generating; then
# First make an empty file
echo '' > .gradletasknamecache
# First empty the old cache file
if [ -f .gradletasknamecache ]; then
rm .gradletasknamecache
fi
# Then append the rest of the lines to that file
output=$(./gradlew tasks --all)
_gradle_parse_tasks_to_gradletasknamecache $output
Expand Down