Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Replace buildToolsVersion in all build.gradle in node_modules
#!/usr/bin/env bash
targetVersion="$1"
if [ "$1" == "" ]; then
echo "Usage: $0 <buildToolsVersion>";
else
find \
node_modules \
-type f \
-iname 'build.gradle' \
-exec sed -i '' 's/buildToolsVersion "[0-9][0-9]\.[0-9]\.[0-9]"/buildToolsVersion "'${targetVersion}'"/g' "{}" +;
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.