aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse
diff options
context:
space:
mode:
authorSiva Velusamy <vsiva@google.com>2014-09-15 16:16:21 -0700
committerSiva Velusamy <vsiva@google.com>2015-02-03 15:22:10 -0800
commit524448c9867bcb674e5a06fc66ca23b54a4bbe49 (patch)
treefcd2be0e76ebe1c0f82163c30f7f2f1ade094d09 /eclipse
parent892f37b7b2b59bcb1a83cf415dc378d2a997fc0c (diff)
downloadsdk-524448c9867bcb674e5a06fc66ca23b54a4bbe49.zip
sdk-524448c9867bcb674e5a06fc66ca23b54a4bbe49.tar.gz
sdk-524448c9867bcb674e5a06fc66ca23b54a4bbe49.tar.bz2
Remove stale scripts
Change-Id: I85fdf33a69cb9adeb1a59d691f3ef92b3bfcd455
Diffstat (limited to 'eclipse')
-rw-r--r--eclipse/README_WINDOWS.txt32
-rw-r--r--eclipse/TYCHO_BUILD6
-rw-r--r--eclipse/scripts/build.xml133
-rwxr-xr-xeclipse/scripts/build_ide.sh32
-rwxr-xr-xeclipse/scripts/build_plugins.sh254
-rwxr-xr-xeclipse/scripts/build_server.sh147
-rwxr-xr-xeclipse/scripts/create_all_symlinks.sh396
-rwxr-xr-xeclipse/scripts/setup_eclipse.sh85
8 files changed, 0 insertions, 1085 deletions
diff --git a/eclipse/README_WINDOWS.txt b/eclipse/README_WINDOWS.txt
deleted file mode 100644
index 1480f5d..0000000
--- a/eclipse/README_WINDOWS.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-[RM 20080623]
-
-1- To build the Eclipse plugin:
-Under Linux:
-$ cd your-device-directory
-$ tools/eclipse/scripts/build_server.sh destination-directory
-
-This will create an "android-eclipse.zip" in the selected destination directory.
-Then in Eclipse, you can use Help > Software Updates > Find and Install > Search for new Features > Next > New Archived Site > select the new android-eclipse.zip. Then with the new archive checked, click Finish/Next.
-
-
-2- To build a Windows SDK, you need two steps:
-a- First you need to create a Linux SDK:
-
-Under Linux:
-$ cd your-device-directory
-$ make sdk
-Note: if you get an error when building the javadoc, make sure you use a Java SDK 1.5
-Note: if you get an error when building layoutlib, make sure you use a Java SDK 1.5.0-b13.
-
-b- Once you have a Linux SDK, you can create a Windows SDK:
-
-You need a Windows machine with XP or Vista and Cygwin.
-- Installer at http://sources.redhat.com/cygwin/
-- Set Default Text File Type to DOS/text, not Unix/binary.
-- Select packages autoconf, gcc, g++, bison, python, zip, unzip, mingw-zlib
-- Suggested extra packages: emacs, wget, openssh, rsync
-
-Then under Cygwin:
-$ cd your-device-directory
-$ tools/buildbot/_make_windows_sdk.sh path-to-the-linux-sdk.zip destination-directory
-
diff --git a/eclipse/TYCHO_BUILD b/eclipse/TYCHO_BUILD
deleted file mode 100644
index 7836ec9..0000000
--- a/eclipse/TYCHO_BUILD
+++ /dev/null
@@ -1,6 +0,0 @@
-To build using Tycho, perform:
-
- $ cd sdk/eclipse
- $ make -f maven.mk
-
-The resulting artifacts will be in $OUT/host/maven/bundles-<version>-SNAPSHOT/products/
diff --git a/eclipse/scripts/build.xml b/eclipse/scripts/build.xml
deleted file mode 100644
index 67861bc..0000000
--- a/eclipse/scripts/build.xml
+++ /dev/null
@@ -1,133 +0,0 @@
-<!--
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-
-*Sample* build.xml for ADT plugin build. Do not use for actual releases.
-
-Note: this uses the target platform from eclipse-build-deps.
-All these are newer than Eclipse 3.6.2 which is our current baseline.
-
-Note: for actual releases, use build_server.sh instead of this.
-
-To build:
-$ cd sdk/eclipse/scripts
-$ ant
-This should create the plugins in $OUT/host/eclipse/adtplugins/build/v<timestamp>-aosp
-
--->
-<project name="com.android.eclipse.rcp.build" default="build">
- <!-- The timestamp for the context qualifier. -->
- <tstamp>
- <format property="adt.timestamp"
- pattern="yyyyMMddHHmmss" />
- </tstamp>
-
- <!-- Root of Android Source Tree -->
- <property name="ANDROID_SRC" location="../../../" />
-
- <!-- Host Eclipse used for building the RCP -->
- <property name="basebuilder" value="${ANDROID_SRC}/external/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/" />
-
- <!-- Source for target prebuilts -->
- <property name="targetSrcDir1" value="${ANDROID_SRC}/prebuilts/eclipse/" />
- <property name="targetSrcDir2" value="${ANDROID_SRC}/prebuilts/eclipse-build-deps/" />
-
- <!-- Location where build happens and resulting binaries are generated -->
- <property name="outDir" value="${ANDROID_SRC}/out/host/eclipse/adtplugins/" />
-
- <!-- Location where the target platform is created -->
- <property name="targetDir" value="${outDir}/target" />
-
- <!-- Location where the target platform is created -->
- <property name="buildDir" value="${outDir}/build" />
-
- <!-- Location of the sources -->
- <property name="srcDir" value="${ANDROID_SRC}/sdk/eclipse/" />
-
- <!-- locate launcher plugin inside eclipse -->
- <path id="equinox.launcher.path">
- <fileset dir="${basebuilder}/plugins">
- <include name="org.eclipse.equinox.launcher_*.jar" />
- </fileset>
- </path>
- <property name="equinox.launcher" refid="equinox.launcher.path" />
-
- <!-- locate pde build plugin inside eclipse -->
- <path id="pde.build.dir.path">
- <dirset dir="${basebuilder}/plugins">
- <include name="org.eclipse.pde.build_*" />
- </dirset>
- </path>
- <property name="pde.build.dir" refid="pde.build.dir.path" />
-
- <!-- create the build directory, copy plugins and features into it -->
- <target name="copy_srcs">
- <mkdir dir="${buildDir}" />
- <copy todir="${buildDir}" preservelastmodified="true">
- <fileset dir="${srcDir}/">
- <include name="plugins/**" />
- <include name="features/**" />
- <exclude name="plugins/*/bin/**" />
- </fileset>
- </copy>
- </target>
-
- <!-- create target platform -->
- <target name="create-target">
- <mkdir dir="${targetDir}" />
- <mkdir dir="${targetDir}/deltapack" />
- <mkdir dir="${targetDir}/repos" />
-
- <unzip src="${targetSrcDir1}/deltapack/eclipse-3.7.2-delta-pack.zip" dest="${targetDir}/deltapack" overwrite="false" />
- <unzip src="${targetSrcDir1}/platform/org.eclipse.platform-3.7.2.zip" dest="${targetDir}/repos/platform" overwrite="false" />
- <unzip src="${targetSrcDir2}/cdt/cdt-master-8.0.2.zip" dest="${targetDir}/repos/cdt" overwrite="false" />
- <unzip src="${targetSrcDir2}/emf/emf-xsd-SDK-M201201231045.zip" dest="${targetDir}/repos/emf" overwrite="false" />
- <unzip src="${targetSrcDir2}/jdt/org.eclipse.jdt.source-3.7.2.zip" dest="${targetDir}/repos/jdt" overwrite="false" />
- <unzip src="${targetSrcDir2}/wtp/wtp-repo-R-3.3.2-20120210195245.zip" dest="${targetDir}/repos/wtp" overwrite="false" />
- <unzip src="${targetSrcDir2}/gef/GEF-SDK-3.7.2.zip" dest="${targetDir}/repos/gef" overwrite="false" />
- </target>
-
- <!-- Launch pde build -->
- <target name="pde-build" depends="copy_srcs, create-target">
- <java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true">
- <arg value="-application" />
- <arg value="org.eclipse.ant.core.antRunner" />
- <arg value="-buildfile" />
- <arg value="${pde.build.dir}/scripts/build.xml" />
- <arg value="-data" />
- <arg value="${buildDir}/workspace" />
- <arg value="-configuration" />
- <arg value="${buildDir}/configuration" />
- <arg value="-Dbuilder=${srcDir}/buildConfig" />
- <arg value="-Dtimestamp=${timestamp}" />
- <arg value="-DeclipseLocation=${baseBuilder}" />
- <arg value="-DbuildDirectory=${buildDir}" />
- <arg value="-DbaseLocation=${targetDir}/deltapack/eclipse" />
- <arg value="-DrepoBaseLocation=${targetDir}/repos/" />
- <arg value="-DtransformedRepoLocation=${targetDir}/transformedRepos/" />
- <arg value="-DupdateSiteSource=${srcDir}/sites/external" />
- <arg value="-DforceContextQualifier=v${adt.timestamp}-aosp" />
- <classpath>
- <pathelement location="${equinox.launcher}" />
- </classpath>
- </java>
- </target>
-
- <target name="clean">
- <delete dir="${outDir}" />
- <delete dir="${targetDir}" />
- </target>
-
- <target name="build" depends="pde-build" />
-</project>
diff --git a/eclipse/scripts/build_ide.sh b/eclipse/scripts/build_ide.sh
deleted file mode 100755
index 50125cf..0000000
--- a/eclipse/scripts/build_ide.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-# Expected arguments:
-# $1 = out_dir
-# $2 = ide qualifier
-# $3 = zip qualifier
-
-if [[ "Linux" != $(uname) ]]; then
- echo "$0: ADT IDE build script runs only on Linux"
- exit 0
-fi
-
-PROG_DIR=$(dirname "$0")
-
-DEST_DIR="$1"
-IDE_QUALIFIER="$2"
-ZIP_QUALIFIER="$3"
-
-function die() {
- echo "$*" > /dev/stderr
- echo "Usage: $0 dest_dir ide_qualifier zip_qualifier" > /dev/stderr
- exit 1
-}
-
-if [[ -z "$DEST_DIR" ]]; then die "## Error: Missing dest_dir"; fi
-if [[ -z "$IDE_QUALIFIER" ]]; then die "## Error: Missing ide qualifier"; fi
-if [[ -z "$ZIP_QUALIFIER" ]]; then die "## Error: Missing zip qualifier"; fi
-
-ADT_IDE_DEST_DIR="$DEST_DIR" \
-ADT_IDE_QUALIFIER="$IDE_QUALIFIER" \
-ADT_IDE_ZIP_QUALIFIER="$ZIP_QUALIFIER" \
- make PRODUCT-sdk-adt_eclipse_ide
-
diff --git a/eclipse/scripts/build_plugins.sh b/eclipse/scripts/build_plugins.sh
deleted file mode 100755
index 34347cf..0000000
--- a/eclipse/scripts/build_plugins.sh
+++ /dev/null
@@ -1,254 +0,0 @@
-#!/bin/bash
-
-# build script for eclipse adt build on the Linux and Mac platforms
-#
-# Usage: sdk/eclipse/scripts/build_plugins <build_version>
-#
-# It expects environment variable ECLIPSE_HOME to be defined to point to _your_
-# version of Eclipse RCP (must have the WTP & GEF plugins available too.)
-#
-# If ECLIPSE_HOME is not provided, this script will _download_ a reference version
-# of Eclipse RCP and install it in a specific location.
-#
-# Other properties, ant scripts that drive the build are defined in ./buildConfig
-# Currently, this script will create an update site at ${user.home}/www/no_crawl/android-build
-# or at the directory specified using "-d"
-
-# Known Issues:
-# - Build does not properly clean up after itself (build server always executes from
-# a clean state.)
-# - Script will fail if current absolute path has spaces in it.
-# - Only linux and OSX are supported for now
-# - Do NOT manually invoke this script. Instead use the build_server.sh wrapper
-# which does some extra preliminary steps (it builds a few libs needed here.)
-
-
-set -e # abort this script early if any command fails
-
-#
-# -- Utility methods --
-#
-
-function printUsage() {
- echo "Usage: $0 <build_qualifier> [-i] [-d <destination-directory>] [-a <archivePrefix>] "
- echo "<build_qualifier>: build qualifier string"
- echo "-i = build internal site. Otherwise, external site will be built"
- echo "-d = destination directory. Default is $USER/www/no_crawl/. Cannot contain spaces."
- echo "-a = archive prefix. Cannot contain spaces."
-}
-
-function die() {
- echo $@
- exit 1
-}
-
-function dieWithUsage() {
- echo $@
- echo
- printUsage
- exit 1
-}
-
-
-#
-# -- Setup our custom version of Eclipse --
-#
-
-# The dependency on the linux platform comes from a series of environment
-# variables that the eclipse ant runner expects. These are defined in the
-# build.properties file. We can easily support other platforms but would need
-# to override those values in this script.
-HOST=`uname`
-if [ "$HOST" == "Linux" ]; then
- BASEOS=linux
- BASEWS=gtk
- BASEARCH=x86
-elif [ "$HOST" == "Darwin" ]; then
- BASEOS=macosx
- BASEWS=cocoa
- BASEARCH=x86
-else
- die "ERROR: This script is currently only supported on Linux and MacOSX."
-fi
-
-
-# Make sure this runs from the sdk/eclipse plugin.
-D=`dirname "$0"`
-cd "$D/.."
-[ `basename "$PWD"` == "eclipse" ] || dieWithUsage "Please run this script from the sdk/eclipse directory"
-
-# check for number of parameters
-[ $# -lt 1 ] && dieWithUsage "ERROR: Not enough parameters"
-
-# check if ECLIPSE_HOME set (ECLIPSE_HOME is were the "eclipse" binary and the
-# "plugins" sub-directory are located)
-if [ -z "$ECLIPSE_HOME" ]; then
- BASE_DIR=/buildbot/eclipse-android
-
- echo "ECLIPSE_HOME not set, using $BASE_DIR as default"
-
- if [ ! -d "$BASE_DIR" ]; then
- mkdir -p "$BASE_DIR" || die "Please create a directory $BASE_DIR where Eclipse will be installed, i.e. execute 'mkdir -p $BASE_DIR && chown $USER $BASE_DIR'."
- fi
-
- # download the version if not available
- VERSION="3.6.2"
- BASE_DIR="$BASE_DIR/$VERSION"
- scripts/setup_eclipse.sh -p "$BASE_DIR"
-
- ECLIPSE_HOME="$BASE_DIR/eclipse" # path to installed directory
- PID_FILE="$BASE_DIR/eclipse.pid"
- [ -f "$PID_FILE" ] && ECLIPSE_PID=`cat "$PID_FILE"`
-fi
-
-echo "PWD=`pwd`"
-echo "ECLIPSE_HOME=$ECLIPSE_HOME"
-
-#
-# -- Site parameters and Build version --
-#
-
-BUILD_VERSION="$1" ; shift
-
-# parse for build internal site flag. If set, pass in internalSite property to ant scripts
-if [ "-i" == "$1" ]; then
- shift
- echo "Setting for internal site build"
- SITE_PARAM="-DinternalSite=1 -DupdateSiteSource=$PWD/sites/internal"
-else
- SITE_PARAM="-DupdateSiteSource=$PWD/sites/external"
-fi
-
-if [ "-d" == $1 ]; then
- shift
- echo "Setting destination directory to $1"
- SITE_PARAM="$SITE_PARAM -DupdateSiteRoot=$1"
- shift
-fi
-
-if [ "-a" == "$1" ]; then
- shift
- echo "Setting archivePrefix to $1"
- SITE_PARAM="$SITE_PARAM -DarchivePrefix=$1"
- shift
-fi
-
-
-#
-# -- Configuration directory --
-#
-
-# The "configuration directory" will hold the workspace for this build.
-# If it contains old data the build may fail so we need to clean it first
-# and create it if it doesn't exist.
-CONFIG_DIR="../../out/eclipse-configuration-$BUILD_VERSION"
-[ -d "$CONFIG_DIR" ] && rm -rfv "$CONFIG_DIR"
-mkdir -p "$CONFIG_DIR"
-
-# The "buildConfig" directory contains our customized ant rules
-BUILDCONFIG="$PWD/buildConfig"
-
-
-#
-# -- Find Eclipse Launcher --
-#
-
-# Get the Eclipse launcher and build script to use
-function findFirst() {
- for i in "$@"; do
- if [ -f "$i" ]; then
- echo "$i"
- return
- fi
- done
-}
-
-LAUNCHER=`findFirst "$ECLIPSE_HOME"/plugins/org.eclipse.equinox.launcher_*.jar`
-BUILDFILE=`findFirst "$ECLIPSE_HOME"/plugins/org.eclipse.pde.build_*/scripts/build.xml`
-
-# make sure we found valid files
-if [ ! -f "$LAUNCHER" ]; then
- echo "Installation Error: Eclipse plugin org.eclipse.equinox.launcher...jar not detected. " \
- "Found '$LAUNCHER'. Aborting."
- exit 1
-fi
-if [ ! -f "$BUILDFILE" ]; then
- echo "Installation Error: Eclipse build file org.eclipse.pde.build_.../scripts/build.xml " \
- "not detected. Found '$BUILDFILE'. Aborting."
- exit 1
-fi
-
-#
-# Ensure that the src dir exists since it's empty
-#
-mkdir -p $PWD/plugins/com.android.ide.eclipse.adt.overlay/src
-
-#
-# -- Print configuration used and actually execute the build --
-#
-
-echo "Eclipse configuration found:"
-echo " Eclipse Home: $ECLIPSE_HOME"
-echo " Launcher: $LAUNCHER"
-echo " Build File: $BUILDFILE"
-echo " Build Config: $BUILDCONFIG"
-echo " Config Dir: $CONFIG_DIR"
-echo " Java: " $(which java)
-java -version
-
-# clean input directories to make sure there's nothing left from previous run
-
-rm -fv *.properties *.xml
-find . -name "@*" | xargs rm -rfv
-
-# Now execute the ant runner
-
-set +e # don't stop on errors anymore, we want to catch them here
-set -x
-
-java \
- -jar $LAUNCHER \
- -data "$CONFIG_DIR" \
- -configuration "$CONFIG_DIR" \
- -application org.eclipse.ant.core.antRunner \
- -buildfile $BUILDFILE \
- -Dbuilder=$BUILDCONFIG \
- -DbuildDirectory=$PWD \
- -DforceContextQualifier=$BUILD_VERSION \
- -DECLIPSE_HOME=$ECLIPSE_HOME \
- -Dbaseos=$BASEOS \
- -Dbasews=$BASEWS \
- -Dbasearch=$BASEARCH \
- $SITE_PARAM
-RESULT=$?
-set +x
-
-if [ "0" != "$RESULT" ]; then
- echo "JAVA died with error code $RESULT"
- echo "Dump of build config logs:"
- for i in "$CONFIG_DIR"/*.log; do
- if [ -f "$i" ]; then
- echo "----------------------"
- echo "--- $i"
- echo "----------------------"
- cat "$i"
- echo
- fi
- done
-fi
-
-#
-# -- Cleanup
-#
-
-if [ -n "$ECLIPSE_PID" ] && [ -f "$PID_FILE" ]; then
- rm -fv "$PID_FILE"
- kill -9 "$ECLIPSE_PID"
-fi
-
-# Remove build files left by Eclipse all behind
-rm -fv *.properties *.xml
-find . -name "@*" | xargs rm -rfv
-
-
-# we're done!
diff --git a/eclipse/scripts/build_server.sh b/eclipse/scripts/build_server.sh
deleted file mode 100755
index 46947ed..0000000
--- a/eclipse/scripts/build_server.sh
+++ /dev/null
@@ -1,147 +0,0 @@
-#!/bin/bash
-# Entry point to build the Eclipse plugins for the build server.
-#
-# Input parameters:
-# $1: *Mandatory* destination directory. Must already exist. Cannot contain spaces.
-# $2: Optional build number. If present, will be appended to the date qualifier.
-# The build number cannot contain spaces *nor* periods (dashes are ok.)
-# -z: Optional, prevents the final zip and leaves the udate-site directory intact.
-# -i: Optional, if present, the Google internal update site will be built. Otherwise,
-# the external site will be built
-# Workflow:
-# - make dx, ddms, ping
-# - create symlinks (for eclipse code reorg, for ddms, ping)
-# - call the actual builder script from Brett
-# - zip resulting stuff and move to $DEST
-# Note: currently wrap around existing shell script, reuse most of it,
-# eventually both might merge as needed.
-
-
-###################
-# temporary disable to deal with build server issues
-# see b/14685861
-exit 0
-###################
-
-
-set -e # Fail this script as soon as a command fails -- fail early, fail fast
-
-PROG_DIR=$(dirname "$0")
-
-DEST_DIR=""
-BUILD_NUMBER=""
-CREATE_ZIP="1"
-INTERNAL_BUILD=""
-ADT_PREVIEW="preview" # "preview" for preview builds, "" for final release builds.
-
-function get_params() {
- # parse input parameters
- while [ $# -gt 0 ]; do
- if [ "$1" == "-z" ]; then
- CREATE_ZIP=""
- elif [ "$1" == "-i" ]; then
- INTERNAL_BUILD="-i"
- elif [ "$1" != "" ] && [ -z "$DEST_DIR" ]; then
- DEST_DIR="$1"
- elif [ "$1" != "" ] && [ -z "$BUILD_NUMBER" ]; then
- BUILD_NUMBER="$1"
- fi
- shift
- done
-}
-
-function die() {
- echo "Error:" $*
- echo "Aborting"
- exit 1
-}
-
-function check_params() {
- # This needs to run from the top android directory
- # Automatically CD to the top android directory, whatever its name
- D="$PROG_DIR"
- cd "$D/../../../" && echo "Switched to directory $PWD"
-
- # The current Eclipse build has some Linux dependency in its config files
- [ `uname` == "Linux" -o `uname` == "Darwin" ] || die "This must run from a Linux or Mac OSX box."
-
- # Check dest dir exists
- [ -n "$DEST_DIR" ] || die "Usage: $0 <destination-directory> [build-number]"
- [ -d "$DEST_DIR" ] || die "Destination directory $DEST_DIR must exist."
-
- # Qualifier is "v" followed by date/time in YYYYMMDDHHSS format, an optional "preview"
- # tag and the optional build number.
- DATE=`date +v%Y%m%d%H%M`
- local preview="${ADT_PREVIEW:+-}${ADT_PREVIEW}"
- QUALIFIER="${DATE}${preview}"
- [ -n "$BUILD_NUMBER" ] && QUALIFIER="${QUALIFIER}-${BUILD_NUMBER}"
-
- return 0
-}
-
-function build_plugin() {
- sdk/eclipse/scripts/create_all_symlinks.sh
-
- # Compute the final directory name and remove any leftovers from previous
- # runs if any.
- BUILD_PREFIX="android-eclipse"
- if [ "$INTERNAL_BUILD" ]; then
- # append 'eng' qualifier to end of archive name to denote internal build
- BUILD_PREFIX="${BUILD_PREFIX}-eng"
- fi
-
- # exclude date from build-zip name so it can be auto-calculated by continuous
- # test process unless there's no build number, in which case the date is
- # still used (useful for testing)
- local preview="${ADT_PREVIEW:+-}${ADT_PREVIEW}"
- ZIP_NAME="${BUILD_PREFIX}${preview}-${BUILD_NUMBER:-$DATE}.zip"
- [ -d "$DEST_DIR/$BUILD_PREFIX" ] || rm -rfv "$DEST_DIR/$BUILD_PREFIX"
-
- # Perform the Eclipse build and move the result in $DEST_DIR/android-build
- sdk/eclipse/scripts/build_plugins.sh $QUALIFIER $INTERNAL_BUILD -d "$DEST_DIR" -a "$BUILD_PREFIX"
-
- # Cleanup
- [ -d "$QUALIFIER" ] && rm -rfv "$QUALIFIER"
-
- if [ "$CREATE_ZIP" ]; then
- # The result is a full update-site under $DEST_DIR/BUILD_PREFIX
- # Zip it and remove the directory.
- echo "**** Package in $DEST_DIR"
- [ -d "$DEST_DIR/$BUILD_PREFIX" ] || \
- die "Build failed to produce $DEST_DIR/$BUILD_PREFIX"
- cd "$DEST_DIR"
- [ -f "$ZIP_NAME" ] && rm -rfv "$ZIP_NAME"
- cd "$BUILD_PREFIX"
- zip -9r "../$ZIP_NAME" *
- cd .. # back to $DEST_DIR
- rm -rfv "$BUILD_PREFIX" # removes the directory, not the zip
- echo "ZIP of Update site available at $DEST_DIR/${ZIP_NAME}"
- else
- echo "Update site available in $DEST_DIR/$BUILD_PREFIX"
- fi
-}
-
-function build_adt_ide() {
- local preview="${ADT_PREVIEW}${ADT_PREVIEW:+-}"
- if [[ -z $INTERNAL_BUILD ]]; then
- # This needs to run from the top android directory
- D="$PROG_DIR"
- cd "$D/../../../" && echo "Switched to directory $PWD"
-
- IDE_SCRIPTS="sdk/eclipse/scripts/build_ide.sh tools/idea/build_ide_ext.sh"
- for sc in $IDE_SCRIPTS; do
- if [[ -x $sc ]]; then
- echo "RUNNING $sc from $PWD"
- $sc "$DEST_DIR" "$QUALIFIER" "${preview}${BUILD_NUMBER:-$QUALIFIER}"
- else
- echo "WARNING: skipping non-exec $sc script"
- fi
- done
- fi
-}
-
-get_params "$@"
-check_params
-( build_plugin )
-( build_adt_ide )
-
diff --git a/eclipse/scripts/create_all_symlinks.sh b/eclipse/scripts/create_all_symlinks.sh
deleted file mode 100755
index a78cf1f..0000000
--- a/eclipse/scripts/create_all_symlinks.sh
+++ /dev/null
@@ -1,396 +0,0 @@
-#!/bin/bash
-# See usage() below for the description.
-
-function usage() {
- cat <<EOF
-# This script copies the .jar files that each plugin depends on into the plugins libs folder.
-# By default, on Mac & Linux, this script creates symlinks from the libs folder to the jar file.
-# Since Windows does not support symlinks, the jar files are copied.
-#
-# Options:
-# -f : to copy files rather than creating symlinks on the Mac/Linux platforms.
-# -d : print make dependencies instead of running make; doesn't copy files.
-# -c : copy files expected after make dependencies (reported by -d) have been built.
-#
-# The purpose of -d/-c is to include the workflow in a make file:
-# - the make rule should depend on \$(shell create_all_symlinks -d)
-# - the rule body should perform \$(shell create_all_symlinks -c [-f])
-EOF
-}
-
-# CD to the top android directory
-PROG_DIR=`dirname "$0"`
-cd "${PROG_DIR}/../../../"
-
-HOST=`uname`
-USE_COPY="" # force copy dependent jar files rather than creating symlinks
-ONLY_SHOW_DEPS="" # only report make dependencies but don't build them nor copy.
-ONLY_COPY_DEPS="" # only copy dependencies built by make; uses -f as needed.
-
-function die() {
- echo "Error: $*" >/dev/stderr
- exit 1
-}
-
-function warn() {
- # Only print something if not in show-deps mode
- if [[ -z $ONLY_SHOW_DEPS ]]; then
- echo "$*"
- fi
-}
-
-function printGradleJarPath() {
- # Prints to stdout the absolute path of the JAR assembled for a given gradle project.
- # $1 = source dir, e.g. tools/base or tools/swt
- # $2 = the gradle project name e.g. common or lint-api
- echo "## Quering Gradle properties for '$2' in '$1'." > /dev/stderr
- ( cd $1 && \
- ./gradlew :$2:properties | awk '
- BEGIN { B=""; N=""; V="" }
- /^archivesBaseName:/ { N=$2 }
- /^buildDir:/ { D=$2 }
- /^version:/ { V=$2 }
- END { print D "/libs/" N "-" V ".jar" }' )
-}
-
-## parse arguments
-while [ $# -gt 0 ]; do
- case "$1" in
- "-f" )
- USE_COPY="1"
- ;;
- "-d" )
- ONLY_SHOW_DEPS="1"
- ;;
- "-c" )
- ONLY_COPY_DEPS="1"
- ;;
- * )
- usage
- exit 2
- esac
- shift
-done
-
-warn "## Running $0"
-
-if [[ "${HOST:0:6}" == "CYGWIN" || "$USE_MINGW" == "1" ]]; then
- # This is either Cygwin or Linux/Mingw cross-compiling to Windows.
- PLATFORM="windows-x86"
- if [[ "${HOST:0:6}" == "CYGWIN" ]]; then
- # We can't use symlinks under Cygwin
- USE_COPY="1"
- fi
-elif [[ "$HOST" == "Linux" ]]; then
- PLATFORM="linux-x86"
-elif [[ "$HOST" == "Darwin" ]]; then
- PLATFORM="darwin-x86"
-else
- die "Unsupported platform ($HOST). Aborting."
-fi
-
-if [[ "$USE_COPY" == "1" ]]; then
- function cpfile { # $1=source $2=dest $3=optional dest filename
- cp -fv $1 $2/$3
- }
-else
- # computes the "reverse" path, e.g. "a/b/c" => "../../.."
- function back() {
- echo $1 | sed 's@[^/]*@..@g'
- }
-
- function cpfile { # $1=source $2=dest $3=optional dest filename
- local src=$1
- if [[ "${src:0:1}" != "/" ]]; then
- # Not an absolute path. We assume a relative path to be
- # relative to the android root and we want to make it
- # relative to the destination dir.
- src=$(back $2)/$1
- fi
- ln -svf $src $2/$3
- }
-fi
-
-DEST="sdk/eclipse/scripts"
-
-set -e # fail early
-LIBS=""
-CP_FILES=""
-
-
-### Configure which libs to build.
-#
-# Each entry for LIBS needs to be prefixed with the way we want to build it:
-# make: - a library built using its traditional Android.mk
-# base: - a gradle library located in tools/base
-# swt: - a gradle library located in toosl/swt
-#
-# LIBS entries without or with an unknown ":" prefix will generate an error.
-
-### BASE ###
-
-BASE_PLUGIN_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.base/libs"
-BASE_PLUGIN_LIBS="base:common swt:sdkstats base:sdklib base:dvlib base:layoutlib-api base:sdk-common"
-BASE_PLUGIN_PREBUILTS="\
- 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/15.0/guava-15.0.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"
-
-# temporarily disabled
-# 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"
-
-
-### ADT ###
-
-ADT_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.adt/libs"
-ADT_LIBS="make:ant-glob base:asset-studio base:lint-api base:lint-checks base:ninepatch make:propertysheet \
- base:rule-api swt:sdkuilib swt:swtmenubar base:manifest-merger"
-ADT_PREBUILTS="\
- prebuilts/tools/common/freemarker/freemarker-2.3.19.jar \
- prebuilts/tools/common/m2/repository/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar \
- prebuilts/tools/common/m2/repository/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar \
- prebuilts/tools/common/m2/repository/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.jar \
- prebuilts/tools/common/m2/repository/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3.jar"
-
-LIBS="$LIBS $ADT_LIBS"
-CP_FILES="$CP_FILES @:$ADT_DEST $ADT_LIBS $ADT_PREBUILTS"
-
-
-### DDMS ###
-
-DDMS_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.ddms/libs"
-DDMS_LIBS="base:ddmlib swt:ddmuilib swt:swtmenubar swt:uiautomatorviewer"
-
-DDMS_PREBUILTS="\
- 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"
-
-
-### TEST ###
-
-TEST_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.tests"
-TEST_LIBS="make:easymock base:testutils"
-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"
-
-
-### BRIDGE ###
-
-if [[ $PLATFORM != "windows-x86" ]]; then
- # We can't build enough of the platform on Cygwin to create layoutlib
- BRIDGE_LIBS="make:layoutlib base:ninepatch"
-
- LIBS="$LIBS $BRIDGE_LIBS"
-fi
-
-
-### HIERARCHYVIEWER ###
-
-HV_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/libs"
-HV_LIBS="swt:hierarchyviewer2lib swt:swtmenubar"
-
-LIBS="$LIBS $HV_LIBS"
-CP_FILES="$CP_FILES @:$HV_DEST $HV_LIBS"
-
-
-### TRACEVIEW ###
-
-TV_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.traceview/libs"
-TV_LIBS="swt:traceview"
-
-LIBS="$LIBS $TV_LIBS"
-CP_FILES="$CP_FILES @:$TV_DEST $TV_LIBS"
-
-
-### MONITOR ###
-
-MONITOR_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.monitor/libs"
-MONITOR_LIBS="swt:sdkuilib"
-
-LIBS="$LIBS $MONITOR_LIBS"
-CP_FILES="$CP_FILES @:$MONITOR_DEST $MONITOR_LIBS"
-
-
-### SDKMANAGER ###
-
-SDKMAN_LIBS="swt:swtmenubar"
-
-LIBS="$LIBS $SDKMAN_LIBS"
-
-
-### GL DEBUGGER ###
-
-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="make:host-libprotobuf-java-2.3.0-lite make:liblzf"
-
- LIBS="$LIBS $GLD_LIBS"
- CP_FILES="$CP_FILES @:$GLD_DEST $GLD_LIBS"
-fi
-
-
-#--- Determine what to build
-
-UNPROCESSED=""
-GRADLE_SWT=""
-GRADLE_BASE=""
-MAKE_TARGETS=""
-for LIB in $LIBS; do
- if [[ "${LIB:0:5}" == "base:" ]]; then
- GRADLE_BASE="$GRADLE_BASE :${LIB:5}:assemble"
- elif [[ "${LIB:0:4}" == "swt:" ]]; then
- GRADLE_SWT="$GRADLE_SWT :${LIB:4}:assemble"
- elif [[ "${LIB:0:5}" == "make:" ]]; then
- MAKE_TARGETS="$MAKE_TARGETS ${LIB:5}"
- else
- UNPROCESSED="$UNPROCESSED $LIB"
- fi
-done
-
-unset LIBS # we shouldn't use this anymore, it has been split up just above.
-
-
-if [[ -n $UNPROCESSED ]]; then
- die "## The following libs lack a prefix (make:, base: or swt:): $UNPROCESSED"
-fi
-
-# In the mode to only echo dependencies, output them and we're done
-if [[ -n $ONLY_SHOW_DEPS ]]; then
- echo $MAKE_TARGETS
- exit 0
-fi
-
-# --- Gradle Build ---
-
-# tools/base: if we need it for SWT, we build them all and public local.
-# Otherwise we do a specific tools/base build on just the requested targets.
-
-if [[ -n "$GRADLE_SWT" ]]; then
- echo "### Starting tools/base: gradlew assemble publishLocal"
- (cd tools/base && ./gradlew assemble publishLocal)
-elif [[ -n "$GRADLE_BASE" ]]; then
- echo "### Starting tools/base: gradlew $GRADLE_BASE"
- (cd tools/base && ./gradlew $GRADLE_BASE)
-fi
-
-# tools/swt: build requested targets
-
-if [[ -n "$GRADLE_SWT" ]]; then
- echo "### Starting tools/swt: gradlew $GRADLE_SWT"
- (cd tools/swt && ./gradlew $GRADLE_SWT)
-fi
-
-# --- Android.mk Build ---
-
-# 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.
-
-NEW_TARGETS=""
-for LIB in $MAKE_TARGETS; 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
- NEW_TARGETS="$NEW_TARGETS $LIB"
- fi
-done
-MAKE_TARGETS="$NEW_TARGETS"
-unset NEW_TARGETS
-
-if [[ -z $ONLY_COPY_DEPS ]]; then
- if [[ -n $MAKE_TARGETS ]]; then
- ( # Make sure we have lunch sdk-<something>
- if [[ ! "$TARGET_PRODUCT" ]]; then
- warn "## TARGET_PRODUCT is not set, running build/envsetup.sh"
- . build/envsetup.sh
- warn "## lunch sdk-eng"
- lunch sdk-eng
- fi
-
- J="4"
- [[ $(uname) == "Darwin" ]] && J=$(sysctl hw.ncpu | cut -d : -f 2 | tr -d ' ')
- [[ $(uname) == "Linux" ]] && J=$(cat /proc/cpuinfo | grep processor | wc -l)
-
- warn "## Building libs: make -j$J $MAKE_TARGETS"
- make -j${J} $MAKE_TARGETS
- )
- fi
-fi
-
-# --- Copy resulting files ---
-
-DEST=""
-for SRC in $CP_FILES; do
- if [[ "${SRC:0:2}" == "@:" ]]; then
- DEST="${SRC:2}"
- mkdir -vp "$DEST"
- continue
- fi
-
- ORIG_SRC="$SRC"
- DEST_FILE=""
-
- if [[ "${SRC:0:5}" == "base:" ]]; then
- SRC="${SRC:5}"
- ORIG_SRC="$SRC"
- DEST_FILE="$SRC.jar"
- SRC=$(printGradleJarPath tools/base $SRC)
- elif [[ "${SRC:0:4}" == "swt:" ]]; then
- SRC="${SRC:4}"
- ORIG_SRC="$SRC"
- DEST_FILE="$SRC.jar"
- SRC=$(printGradleJarPath tools/swt $SRC)
- elif [[ "${SRC:0:5}" == "make:" ]]; then
- SRC="${SRC:5}"
- ORIG_SRC="$SRC"
- fi
-
- if [[ ! -f "$SRC" ]]; then
- # 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
- die "Invalid cp_file dest directory: $DEST"
- fi
-
- cpfile "$SRC" "$DEST" "$DEST_FILE"
- else
- die "## Unknown source '$ORIG_SRC' to copy in '$DEST'"
- fi
-done
-
-# OS-specific post operations
-
-if [ "${HOST:0:6}" == "CYGWIN" ]; then
- chmod -v a+rx "$ADT_DEST"/*.jar
-fi
-
-echo "### $0 done"
diff --git a/eclipse/scripts/setup_eclipse.sh b/eclipse/scripts/setup_eclipse.sh
deleted file mode 100755
index 5942c06..0000000
--- a/eclipse/scripts/setup_eclipse.sh
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/bash
-
-# Quick script used to setup Eclipse for the ADT plugin build.
-#
-# usage:
-# setup_eclipse.sh [-p] <dest_dir>
-# -p: run Eclipse in the background and print its PID in dest_dir/eclipse.pid
-#
-# Workflow:
-# - downloads & unpack Eclipse if necessary
-# - *runs* it once
-
-
-#-----------------
-#
-# Note: right now this is invoked by sdk/eclipse/doBuild.sh
-# and it *MUST* be invoked with the following destination directory:
-#
-# $ setup_eclipse.sh /buildbot/eclipse-android/3.4.0/
-#
-#-----------------
-
-
-set -e # abort this script early if any command fails
-
-function die() {
- echo $@
- exit 1
-}
-
-V="--no-verbose"
-if [[ "$1" == "-v" ]]; then
- V=""
- shift
-fi
-
-if [[ "-p" == "$1" ]]; then
- GET_PID="-p"
- shift
-fi
-
-
-BASE_DIR="$1"
-
-[[ -n "$1" ]] || die "Usage: $0 <dest-dir>"
-
-# URL for Eclipse Linux RCP.
-DOWNLOAD_URL="http://archive.eclipse.org/technology/epp/downloads/release/helios/SR2/eclipse-rcp-helios-SR2-linux-gtk-x86_64.tar.gz"
-
-# URL for CDT
-CDT_DOWNLOAD_URL="http://download.eclipse.org/tools/cdt/releases/helios/dist/cdt-master-7.0.2.zip"
-
-BIN="$BASE_DIR/eclipse/eclipse" # path to installed binary
-TARGZ="$BASE_DIR/${DOWNLOAD_URL##*/}" # base dir + filename of the download URL
-CDTZIP="$BASE_DIR/${CDT_DOWNLOAD_URL##*/}"
-
-if [[ ! -f "$BIN" ]]; then
- echo "Downloading and installing Eclipse in $BASE_DIR."
- mkdir -p "$BASE_DIR"
-
- wget --continue $V --output-document="$TARGZ" "$DOWNLOAD_URL"
- echo "Unpacking $TARGZ"
- (cd "$BASE_DIR" && tar xzf "$TARGZ")
-
- wget --continue $V --output-document="$CDTZIP" "$CDT_DOWNLOAD_URL"
- echo "Unpacking $CDTZIP"
- (cd "$BASE_DIR/eclipse" && unzip -o "$CDTZIP")
-
- echo
- echo "*** WARNING: To setup Eclipse correctly, it must be ran at least once manually"
- echo "*** Eclipse will now start."
- echo
- if [[ -n "$GET_PID" ]]; then
- # if started from the automatic eclipse build, run Eclipse in the background
- "$BIN" &
- ECLIPSE_PID=$!
- echo "*** Eclipse started in background with PID $ECLIPSE_PID"
- echo "$ECLIPSE_PID" > "$BASE_DIR"/eclipse.pid
- sleep 5 # give some time for Eclipse to start and setup its environment
- else
- # if started manually, run Eclipse in the foreground
- "$BIN"
- fi
-fi
-