-
Notifications
You must be signed in to change notification settings - Fork 51
/
intellij_gwidea
executable file
·50 lines (35 loc) · 1.13 KB
/
intellij_gwidea
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
gradlewidea() {
if [ ! -e .git ]; then
echo "Unable to run gradlew idea outside of portal source"
return 1
fi
ant compile jar install-portal-snapshots
cat /dev/null > .idea/projects.txt
for folder in $(git ls-files modules | grep build.gradle | grep -v gradleTest | grep -v archetype-resources | xargs -I {} dirname {}); do
if [ -f $folder/.lfrbuild-portal ] && [ -d $folder/src/main/java ]; then
echo $folder | cut -d'/' -f 2- >> .idea/projects.txt
fi
done
GRADLE_OPTS='-Xms3g -Xmx3g'
if [[ 8 -gt $JAVA_VERSION ]]; then
GRADLE_OPTS="$GRADLE_OPTS -XX:MaxPermSize=512m"
fi
export GRADLE_OPTS
pushd modules > /dev/null
if [ "eclipse" == "$1" ]; then
cat ../.idea/projects.txt | tr '/' ':' | awk '{ print ":" $1 ":eclipse" }' | xargs ../gradlew --continue --parallel
else
cat ../.idea/projects.txt | tr '/' ':' | awk '{ print ":" $1 ":idea" }' | xargs ../gradlew --continue --parallel
fi
popd > /dev/null
}
. $(dirname ${BASH_SOURCE[0]})/intellij_common
if [ ! -d modules ]; then
echo 'gradlew is not available in this Liferay source folder'
exit 1
fi
setupsdk
copylibs
gradlewidea $@
enabledebug