Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

support gradle buildfile named after the directory #33

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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: 4 additions & 0 deletions bin/gw
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ lookup() {

# Search recursively upwards for file.
until [[ "${curr_path}" == "/" ]]; do
local curr_base=$(basename "${curr_path}")
if [[ -e "${curr_path}/${file}" ]]; then
echo "${curr_path}/${file}"
break
elif [[ "${file}" == "${GRADLE_BUILDFILE}" && -e "${curr_path}/${curr_base}.gradle" ]]; then
echo "${curr_path}/${curr_base}.gradle"
break
else
curr_path=$(dirname "${curr_path}")
fi
Expand Down