blob: 62cba9b3fc1e12031ac7ff68fefd21128b176ae8 (
plain)
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
51
52
53
54
55
56
57
|
#!/bin/bash
current_dir=$PWD;
if [ ! -e 'integration-tests' ] || [ ! -e 'extensions' ]; then
echo "must run this under {src}/tools/data-binding"
exit 1
fi
tools_dir="$current_dir/..";
copy_gradle() {
extra_dots=$1
echo "copying $PWD"
rm -rf gradle
rm -rf gradlew
cp -R "$tools_dir/gradle" .
sed -i -e "s#distributionUrl\=#distributionUrl=$extra_dots/#g" gradle/wrapper/gradle-wrapper.properties
cp "$tools_dir/gradlew" .
}
OIFS="$IFS"
IFS=$'\n'
cd extensions;
copy_gradle "../.."
cd ../extensions-support;
copy_gradle "../.."
echo "start in $current_dir"
cd $current_dir;
for line in `find integration-tests integration-tests-support -name 'settings.gradle'`
do
echo "will prepare build for ${line}";
cd $current_dir;
dir_name=`(dirname ${line})`
cd "$dir_name"
copy_gradle "../../.."
done
linux_sdk="$current_dir/../../prebuilts/studio/sdk/linux"
mac_sdk="$current_dir/../../prebuilts/studio/sdk/darwin"
unamestr=`uname | tr '[:upper:]' '[:lower:]'`
create_local_properties() {
echo "creating local properties in $PWD"
if [ "${unamestr}" = "darwin" ]; then
echo "sdk.dir=$mac_sdk" > "local.properties"
else
echo "sdk.dir=$linux_sdk" > "local.properties"
fi
}
cd $current_dir;
for line in `find integration-tests integration-tests-support -name 'settings.gradle'`
do
cd $current_dir;
dir_name=`(dirname ${line})`
cd "$dir_name"
create_local_properties
done
IFS="$OIFS"
|