diff options
Diffstat (limited to 'eclipse/scripts/create_all_symlinks.sh')
-rwxr-xr-x | eclipse/scripts/create_all_symlinks.sh | 71 |
1 files changed, 49 insertions, 22 deletions
diff --git a/eclipse/scripts/create_all_symlinks.sh b/eclipse/scripts/create_all_symlinks.sh index 4e32353..925bc70 100755 --- a/eclipse/scripts/create_all_symlinks.sh +++ b/eclipse/scripts/create_all_symlinks.sh @@ -101,7 +101,6 @@ fi DEST="sdk/eclipse/scripts" set -e # fail early - LIBS="" CP_FILES="" @@ -109,16 +108,18 @@ CP_FILES="" ### BASE ### BASE_PLUGIN_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.base/libs" -BASE_PLUGIN_LIBS="common sdkstats sdklib dvlib layoutlib_api sdk_common" +BASE_PLUGIN_LIBS="common sdkstats sdklib dvlib layoutlib-api sdk-common" BASE_PLUGIN_PREBUILTS="\ - prebuilts/misc/common/kxml2/kxml2-2.3.0.jar \ - prebuilts/tools/common/commons-compress/commons-compress-1.0.jar \ - prebuilts/tools/common/guava-tools/guava-13.0.1.jar \ - prebuilts/tools/common/http-client/commons-logging-1.1.1.jar \ - prebuilts/tools/common/http-client/commons-codec-1.4.jar \ - prebuilts/tools/common/http-client/httpclient-4.1.1.jar \ - prebuilts/tools/common/http-client/httpcore-4.1.jar \ - prebuilts/tools/common/http-client/httpmime-4.1.1.jar" + prebuilts/tools/common/m2/repository/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar \ + prebuilts/tools/common/m2/repository/org/apache/commons/commons-compress/1.0/commons-compress-1.0.jar \ + prebuilts/tools/common/m2/repository/com/google/guava/guava/13.0.1/guava-13.0.1.jar \ + prebuilts/tools/common/m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar \ + prebuilts/tools/common/m2/repository/commons-codec/commons-codec/1.4/commons-codec-1.4.jar \ + prebuilts/tools/common/m2/repository/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.jar \ + prebuilts/tools/common/m2/repository/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1.jar \ + prebuilts/tools/common/m2/repository/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.jar \ + prebuilts/tools/common/m2/repository/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.jar \ + prebuilts/tools/common/m2/repository/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.jar" LIBS="$LIBS $BASE_PLUGIN_LIBS" CP_FILES="$CP_FILES @:$BASE_PLUGIN_DEST $BASE_PLUGIN_LIBS $BASE_PLUGIN_PREBUILTS" @@ -127,12 +128,12 @@ CP_FILES="$CP_FILES @:$BASE_PLUGIN_DEST $BASE_PLUGIN_LIBS $BASE_PLUGIN_PREBUILTS ### ADT ### ADT_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.adt/libs" -ADT_LIBS="ant-glob assetstudio lint_api lint_checks ninepatch propertysheet rule_api sdkuilib swtmenubar manifmerger" +ADT_LIBS="ant-glob asset-studio lint-api lint-checks ninepatch propertysheet rule-api sdkuilib swtmenubar manifest-merger" ADT_PREBUILTS="\ prebuilts/tools/common/freemarker/freemarker-2.3.19.jar \ - prebuilts/tools/common/asm-tools/asm-4.0.jar \ - prebuilts/tools/common/asm-tools/asm-tree-4.0.jar \ - prebuilts/tools/common/asm-tools/asm-analysis-4.0.jar \ + prebuilts/tools/common/m2/repository/org/ow2/asm/asm/4.0/asm-4.0.jar \ + prebuilts/tools/common/m2/repository/org/ow2/asm/asm-tree/4.0/asm-tree-4.0.jar \ + prebuilts/tools/common/m2/repository/org/ow2/asm/asm-analysis/4.0/asm-analysis-4.0.jar \ prebuilts/tools/common/lombok-ast/lombok-ast-0.2.jar" LIBS="$LIBS $ADT_LIBS" @@ -145,9 +146,9 @@ DDMS_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.ddms/libs" DDMS_LIBS="ddmlib ddmuilib swtmenubar uiautomatorviewer" DDMS_PREBUILTS="\ - prebuilts/tools/common/jfreechart/jcommon-1.0.12.jar \ - prebuilts/tools/common/jfreechart/jfreechart-1.0.9.jar \ - prebuilts/tools/common/jfreechart/jfreechart-1.0.9-swt.jar" + prebuilts/tools/common/m2/repository/jfree/jcommon/1.0.12/jcommon-1.0.12.jar \ + prebuilts/tools/common/m2/repository/jfree/jfreechart/1.0.9/jfreechart-1.0.9.jar \ + prebuilts/tools/common/m2/repository/jfree/jfreechart-swt/1.0.9/jfreechart-swt-1.0.9.jar" LIBS="$LIBS $DDMS_LIBS" CP_FILES="$CP_FILES @:$DDMS_DEST $DDMS_LIBS $DDMS_PREBUILTS" @@ -156,8 +157,8 @@ CP_FILES="$CP_FILES @:$DDMS_DEST $DDMS_LIBS $DDMS_PREBUILTS" ### TEST ### TEST_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.tests" -TEST_LIBS="easymock" -TEST_PREBUILTS="prebuilts/misc/common/kxml2/kxml2-2.3.0.jar" +TEST_LIBS="easymock sdktestutils" +TEST_PREBUILTS="prebuilts/tools/common/m2/repository/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar" LIBS="$LIBS $TEST_LIBS" CP_FILES="$CP_FILES @:$TEST_DEST $TEST_LIBS $TEST_PREBUILTS" @@ -176,7 +177,7 @@ fi ### HIERARCHYVIEWER ### HV_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/libs" -HV_LIBS="hierarchyviewerlib swtmenubar" +HV_LIBS="hierarchyviewer2lib swtmenubar" LIBS="$LIBS $HV_LIBS" CP_FILES="$CP_FILES @:$HV_DEST $HV_LIBS" @@ -211,7 +212,7 @@ LIBS="$LIBS $SDKMAN_LIBS" if [[ $PLATFORM != "windows-x86" ]]; then # liblzf doesn't build under cygwin. If necessary, this should be fixed first. - + GLD_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.gldebugger/libs" GLD_LIBS="host-libprotobuf-java-2.3.0-lite liblzf" @@ -219,6 +220,25 @@ if [[ $PLATFORM != "windows-x86" ]]; then CP_FILES="$CP_FILES @:$GLD_DEST $GLD_LIBS" fi +# If some of the libs are available in prebuilts/devtools, use link to them directly +# instead of trying to rebuild them so remove them from the libs to build. Note that +# they are already listed in CP_FILES so we'll adjust the source to copy later. + +LIBS2="" +for LIB in $LIBS; do + J="prebuilts/devtools/tools/lib/$LIB.jar" + if [[ ! -f $J ]]; then + J="prebuilts/devtools/adt/lib/$LIB.jar" + fi + if [[ -f $J ]]; then + warn "## Using existing $J" + else + LIBS2="$LIBS2 $LIB" + fi +done +LIBS="$LIBS2" +unset LIBS2 + # In the mode to only echo dependencies, output them and we're done if [[ -n $ONLY_SHOW_DEPS ]]; then echo $LIBS @@ -254,7 +274,14 @@ for SRC in $CP_FILES; do fi if [[ ! -f "$SRC" ]]; then ORIG_SRC="$SRC" - SRC="out/host/$PLATFORM/framework/$SRC.jar" + # Take a prebuilts/devtools instead of a framework one if possible. + SRC="prebuilts/devtools/tools/lib/$SRC.jar" + if [[ ! -f "$SRC" ]]; then + SRC="prebuilts/devtools/adt/lib/$ORIG_SRC.jar" + fi + if [[ ! -f "$SRC" ]]; then + SRC="out/host/$PLATFORM/framework/$ORIG_SRC.jar" + fi fi if [[ -f "$SRC" ]]; then if [[ ! -d "$DEST" ]]; then |