aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/scripts
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2011-01-27 13:10:25 -0800
committerXavier Ducrohet <xav@android.com>2011-01-27 15:43:01 -0800
commit6685d3a8cb5fe1374e36358c1436a70c6bca1659 (patch)
treec33e4a93f88af21b57de381d9ae730d40ce4e547 /eclipse/scripts
parent1a90318f6a72ea6111919ab1484f702b2a08bbc0 (diff)
downloadsdk-6685d3a8cb5fe1374e36358c1436a70c6bca1659.zip
sdk-6685d3a8cb5fe1374e36358c1436a70c6bca1659.tar.gz
sdk-6685d3a8cb5fe1374e36358c1436a70c6bca1659.tar.bz2
Update the Layoutlib API to contain part of the current config.
Right now only the screen size is needed. We can add more to Params as needed. Since we should use the existing enum classes for this, I moved all the current enum from sdklib into a new jar file called resources.jar. ADT, sdklib, layoutlib_api all depend on it. Changes to resources should always be API compatible and the result should be copied into the in-dev platform branch in prebuilt, similar to layoutlib_api. See the README.txt files in layoutlib_api/ and resources/ Change-Id: I877ba3cad555ec497954bb0866639e51e7751020
Diffstat (limited to 'eclipse/scripts')
-rwxr-xr-xeclipse/scripts/create_adt_symlinks.sh2
-rwxr-xr-xeclipse/scripts/create_test_symlinks.sh32
2 files changed, 8 insertions, 26 deletions
diff --git a/eclipse/scripts/create_adt_symlinks.sh b/eclipse/scripts/create_adt_symlinks.sh
index dd8cb77..6b70bf4 100755
--- a/eclipse/scripts/create_adt_symlinks.sh
+++ b/eclipse/scripts/create_adt_symlinks.sh
@@ -16,7 +16,7 @@ BACK=`echo $DEST | sed 's@[^/]*@..@g'`
mkdir -p $DEST
-LIBS="sdkstats androidprefs layoutlib_api ide_common ninepatch sdklib sdkuilib"
+LIBS="sdkstats androidprefs layoutlib_api ide_common ninepatch sdklib sdkuilib resources"
echo "make java libs ..."
make -j3 showcommands $LIBS || die "ADT: Fail to build one of $LIBS."
diff --git a/eclipse/scripts/create_test_symlinks.sh b/eclipse/scripts/create_test_symlinks.sh
index dca9bf3..83651a3 100755
--- a/eclipse/scripts/create_test_symlinks.sh
+++ b/eclipse/scripts/create_test_symlinks.sh
@@ -48,14 +48,12 @@ if [ "$HOST" == "Linux" ]; then
ln -svf $BACK/out/host/linux-x86/framework/$LIB.jar "$DEST/"
done
ln -svf $BACK/out/host/linux-x86/framework/kxml2-2.3.0.jar "$DEST/"
- ln -svf $BACK/out/host/linux-x86/framework/layoutlib.jar "$DEST/"
elif [ "$HOST" == "Darwin" ]; then
for LIB in $LIBS; do
ln -svf $BACK/out/host/darwin-x86/framework/$LIB.jar "$DEST/"
done
ln -svf $BACK/out/host/darwin-x86/framework/kxml2-2.3.0.jar "$DEST/"
- ln -svf $BACK/out/host/darwin-x86/framework/layoutlib.jar "$DEST/"
elif [ "${HOST:0:6}" == "CYGWIN" ]; then
for LIB in $LIBS; do
@@ -65,35 +63,19 @@ elif [ "${HOST:0:6}" == "CYGWIN" ]; then
cp -v "prebuilt/common/kxml2/kxml2-2.3.0.jar" "$DEST/"
fi
- LIBS="layoutlib.jar"
- NEED_MAKE="yes"
- for LIB in $LIBS ; do
- SRCJAR="out/host/windows-x86/framework/$LIB"
- DSTJAR="$DEST/$LIB"
- if [[ $NEED_MAKE ]] && ! diff -q "$SRCJAR" "$DSTJAR" >/dev/null ; then
- MAKE_LIBS="${LIBS//.jar/}"
- echo "Make java libs: $MAKE_LIBS"
- make -j3 showcommands $MAKE_LIBS || die "adt-tests: Failed to build one of $LIBS."
- NEED_MAKE=""
- fi
-
- cp -v "$SRCJAR" "$DSTJAR"
- done
-
chmod -v a+rx "$DEST"/*.jar
else
echo "Unsupported platform ($HOST). Nothing done."
fi
-# create link to ddmlib tests
-DEST=$BASE/unittests/com/android
-cpdir $DEST sdk/ddms/libs/ddmlib/tests/src/com/android/ddmlib
-cpdir $DEST sdk/sdkmanager/libs/sdklib/tests/com/android/sdklib
-
# Cleanup old obsolete symlink
+
+DEST=$BASE/unittests/com/android
[[ -e $DEST/sdkuilib || -L $DEST/sdkuilib ]] && rm -rfv $DEST/sdkuilib
+[[ -e $DEST/ddmlib || -L $DEST/ddmlib ]] && rm -rfv $DEST/ddmlib
+[[ -e $DEST/sdklib || -L $DEST/sdklib ]] && rm -rfv $DEST/sdklib
DEST=$BASE/unittests/com/android/layoutlib
-mkdir -p $DEST
-cpdir $DEST frameworks/base/tools/layoutlib/bridge/tests/com/android/layoutlib/bridge
-cpdir $DEST frameworks/base/tools/layoutlib/bridge/tests/com/android/layoutlib/testdata
+[[ -e $DEST/bridge || -L $DEST/bridge ]] && rm -rfv $DEST/bridge
+[[ -e $DEST/testdata || -L $DEST/testdata ]] && rm -rfv $DEST/testdata
+