aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSiva Velusamy <vsiva@google.com>2012-10-23 08:09:08 -0700
committerSiva Velusamy <vsiva@google.com>2012-10-23 16:14:23 -0700
commit86a218b2c1e22dde3b1c0360f51473816d1b7dc0 (patch)
treee9718e804c84f1fd964522af5952e3371a57c7b4
parent2e6256e4d39eec48653b683b9be44b9927b8dc8a (diff)
downloadsdk-86a218b2c1e22dde3b1c0360f51473816d1b7dc0.zip
sdk-86a218b2c1e22dde3b1c0360f51473816d1b7dc0.tar.gz
sdk-86a218b2c1e22dde3b1c0360f51473816d1b7dc0.tar.bz2
adtpackage: make adtpackage depend on, not include features
If adtpackage is declared to provide a bunch of features, then it doesn't seem possible upgrade those features to a later version. This CL makes adtpackage simply depend on those features being present, which allows for upgrading those features at a later time. In order to achieve this, we first build all the features, and dump them in the repository. Then the product build simply takes the collection of repositories, and the product definition, and creates the product. Change-Id: I8ff7a7ea05aea9f08d69c624499185ec1578fbdb
-rw-r--r--adtproductbuild/Android.mk11
-rw-r--r--adtproductbuild/build.xml73
-rw-r--r--eclipse/features/com.android.ide.eclipse.adt.package/feature.xml47
-rw-r--r--eclipse/features/com.android.ide.eclipse.adt/feature.xml6
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt.package/plugin.xml2
5 files changed, 78 insertions, 61 deletions
diff --git a/adtproductbuild/Android.mk b/adtproductbuild/Android.mk
index 61e5c70..dd1e2e4 100644
--- a/adtproductbuild/Android.mk
+++ b/adtproductbuild/Android.mk
@@ -23,8 +23,8 @@ include $(BUILD_SYSTEM)/base_rules.mk
ADT_IDE_MODULE_DEPS := $(TOPDIR)sdk/adtproductbuild/$(LOCAL_MODULE)
-ADT_IDE_BUILD_LOG := $(TOPDIR)out/host/eclipse/adtproduct/build/adtproduct.log
-ADT_IDE_ARTIFACT_DIR := $(TOPDIR)out/host/eclipse/adtproduct/build/I.RcpBuild
+ADT_IDE_BUILD_LOG := $(TOPDIR)out/host/eclipse/adtproduct/adtproduct.log
+ADT_IDE_ARTIFACT_DIR := $(TOPDIR)out/host/eclipse/adtproduct/pbuild/I.RcpBuild
ADT_IDE_RELEASE_DIR := $(TOPDIR)out/host/eclipse/adtproduct/release
ADT_IDE_JAVA_LIBS := $(shell $(TOPDIR)sdk/eclipse/scripts/create_all_symlinks.sh -d)
@@ -45,7 +45,8 @@ $(ADT_IDE_JAVA_TARGET) : $(TOPDIR)sdk/adtproductbuild/adt_eclipse_ide \
echo "*** [adt_eclipse_ide] ERROR: Missing prebuilts/eclipse-build-deps directory. Make sure to run 'repo init -g all;repo sync' first."; \
exit 1; \
fi
- $(hide)rm -rf $(TOPDIR)out/host/eclipse/adtproduct/build/plugins
+ $(hide)rm -rf $(TOPDIR)out/host/eclipse/adtproduct/fbuild/plugins
+ $(hide)rm -rf $(TOPDIR)out/host/eclipse/adtproduct/pbuild/plugins
$(hide)mkdir -p $(dir $@)
$(hide)$(TOPDIR)sdk/eclipse/scripts/create_all_symlinks.sh -c
$(hide)cd $(TOPDIR)sdk/adtproductbuild && \
@@ -53,8 +54,8 @@ $(ADT_IDE_JAVA_TARGET) : $(TOPDIR)sdk/adtproductbuild/adt_eclipse_ide \
( java -jar ../../external/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar \
org.eclipse.equinox.launcher.Main \
-application org.eclipse.ant.core.antRunner \
- -configuration ../../out/host/eclipse/adtproduct/build/configuration \
- -data ../../out/host/eclipse/adtproduct/workspace \
+ -configuration ../../out/host/eclipse/adtproduct/ant-configuration \
+ -data ../../out/host/eclipse/adtproduct/ant-workspace \
2>&1 && \
mv -f ../../$(ADT_IDE_BUILD_LOG) ../../$(ADT_IDE_BUILD_LOG).1 ) \
| tee ../../$(ADT_IDE_BUILD_LOG) \
diff --git a/adtproductbuild/build.xml b/adtproductbuild/build.xml
index c91bff0..3458479 100644
--- a/adtproductbuild/build.xml
+++ b/adtproductbuild/build.xml
@@ -1,4 +1,8 @@
<project name="com.android.eclipse.rcp.build" default="build">
+ <tstamp>
+ <format property="QUALIFIER" pattern="yyyy-M-d-H-m"/>
+ </tstamp>
+
<!-- Root of Android Source Tree -->
<property name="ANDROID_SRC" location="../../" />
@@ -12,14 +16,14 @@
<!-- Location where build happens and resulting binaries are generated -->
<property name="outDir" value="${ANDROID_SRC}/out/host/eclipse/adtproduct/" />
- <!-- Location where final results are released -->
- <property name="outDir" value="${ANDROID_SRC}/out/host/eclipse/androidide/" />
-
<!-- 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 where ADT feature build is performed -->
+ <property name="featureBuildDir" value="${outDir}/fbuild" />
+
+ <!-- Location where ADT feature build is performed -->
+ <property name="productBuildDir" value="${outDir}/pbuild" />
<!-- Location of the sources -->
<property name="srcDir" value="${ANDROID_SRC}/sdk/eclipse/" />
@@ -31,7 +35,7 @@
<condition property="buildconfigs" value="macosx,cocoa,x86_64">
<equals arg1="${buildFor}" arg2="darwin" />
</condition>
- <condition property="buildconfigs" value="win32,win32,x86 &amp; win32,win32,x86_64">
+ <condition property="buildconfigs" value="win32,win32,x86_64">
<equals arg1="${buildFor}" arg2="windows" />
</condition>
@@ -56,14 +60,20 @@
<!-- create the build directory, copy plugins and features into it -->
<target name="copy_srcs">
- <mkdir dir="${buildDir}" />
- <copy todir="${buildDir}" preservelastmodified="true">
+ <mkdir dir="${featureBuildDir}" />
+ <copy todir="${featureBuildDir}" preservelastmodified="true">
<fileset dir="${srcDir}/">
<include name="plugins/**" />
<include name="features/**" />
<exclude name="plugins/*/bin/**" />
</fileset>
</copy>
+ <mkdir dir="${productBuildDir}" />
+ <copy todir="${productBuildDir}" preservelastmodified="true">
+ <fileset dir="${srcDir}/">
+ <include name="features/com.android.ide.eclipse.adt.package/**" />
+ </fileset>
+ </copy>
</target>
<!-- create target platform -->
@@ -81,20 +91,47 @@
<unzip src="${targetSrcDir}/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">
+ <!-- Launch pde build to build the adtpackage product -->
+ <target name="feature-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="${featureBuildDir}/workspace" />
+ <arg value="-configuration" />
+ <arg value="${featureBuildDir}/configuration" />
+ <arg value="-Dtimestamp=${timestamp}" />
+ <arg value="-DeclipseLocation=${baseBuilder}" />
+ <arg value="-DbuildDirectory=${featureBuildDir}" />
+ <arg value="-Dbuilder=${ANDROID_SRC}/sdk/eclipse/buildConfig" />
+ <arg value="-DbaseLocation=${targetDir}/deltapack/eclipse" />
+ <arg value="-DrepoBaseLocation=${targetDir}/repos/" />
+ <arg value="-DtransformedRepoLocation=${targetDir}/transformedRepos/" />
+ <arg value="-DupdateSiteSource=${ANDROID_SRC}/sdk/eclipse/sites/external" />
+ <arg value="-DupdateSiteRoot=${targetDir}/repos/" />
+ <arg value="-DforceContextQualifier=${QUALIFIER}" />
+ <classpath>
+ <pathelement location="${equinox.launcher}" />
+ </classpath>
+ </java>
+ </target>
+
+ <!-- Launch pde build to build the adtpackage product -->
+ <target name="product-build" depends="feature-build">
<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/productBuild/productBuild.xml" />
<arg value="-data" />
- <arg value="${buildDir}/workspace" />
+ <arg value="${productBuildDir}/workspace" />
<arg value="-configuration" />
- <arg value="${buildDir}/configuration" />
+ <arg value="${productBuildDir}/configuration" />
<arg value="-Dtimestamp=${timestamp}" />
<arg value="-DeclipseLocation=${baseBuilder}" />
- <arg value="-DbuildDirectory=${buildDir}" />
+ <arg value="-DbuildDirectory=${productBuildDir}" />
<arg value="-DbaseLocation=${targetDir}/deltapack/eclipse" />
<arg value="-DrepoBaseLocation=${targetDir}/repos/" />
<arg value="-DtransformedRepoLocation=${targetDir}/transformedRepos/" />
@@ -110,5 +147,13 @@
<delete dir="${targetDir}" />
</target>
- <target name="build" depends="pde-build" />
+ <!-- Make sure that earlier build results are not present in the repository -->
+ <target name="clean-features">
+ <delete dir="${featureBuildDir}" />
+ <delete dir="${productBuildDir}" />
+ <delete dir="${targetDir}/repos/android-eclipse" />
+ <delete dir="${targetDir}/transformedRepos" />
+ </target>
+
+ <target name="build" depends="clean-features, product-build" />
</project>
diff --git a/eclipse/features/com.android.ide.eclipse.adt.package/feature.xml b/eclipse/features/com.android.ide.eclipse.adt.package/feature.xml
index 12e4ef3..33b8803 100644
--- a/eclipse/features/com.android.ide.eclipse.adt.package/feature.xml
+++ b/eclipse/features/com.android.ide.eclipse.adt.package/feature.xml
@@ -22,35 +22,6 @@
<update label="Android Update Site" url="https://dl-ssl.google.com/android/eclipse/"/>
</url>
- <includes
- id="org.eclipse.platform"
- version="0.0.0"
- search-location="both"/>
-
- <includes
- id="com.android.ide.eclipse.ddms"
- version="0.0.0"/>
-
- <includes
- id="com.android.ide.eclipse.adt"
- version="0.0.0"/>
-
- <includes
- id="com.android.ide.eclipse.gldebugger"
- version="0.0.0"/>
-
- <includes
- id="com.android.ide.eclipse.hierarchyviewer"
- version="0.0.0"/>
-
- <includes
- id="com.android.ide.eclipse.ndk"
- version="0.0.0"/>
-
- <includes
- id="com.android.ide.eclipse.traceview"
- version="0.0.0"/>
-
<requires>
<import feature="org.eclipse.platform"/>
<import plugin="org.eclipse.equinox.app"/>
@@ -82,15 +53,9 @@
<import plugin="org.eclipse.ltk.core.refactoring"/>
<import plugin="org.eclipse.ltk.ui.refactoring"/>
<import plugin="org.eclipse.core.expressions"/>
- <import feature="org.eclipse.platform"/>
- <import feature="org.eclipse.jdt" version="3.7.0" match="greaterOrEqual"/>
- <import feature="org.eclipse.platform"/>
- <import feature="org.eclipse.jdt" version="3.7.0" match="greaterOrEqual"/>
<import feature="org.eclipse.equinox.p2.user.ui"/>
<import feature="org.eclipse.help"/>
- <import feature="org.eclipse.platform"/>
<import feature="org.eclipse.rcp" version="3.7.0" match="greaterOrEqual"/>
- <import feature="org.eclipse.jdt" version="3.7.0" match="greaterOrEqual"/>
<import feature="org.eclipse.wst.common_core.feature"/>
<import feature="org.eclipse.wst.common_ui.feature"/>
<import feature="org.eclipse.wst.xml_core.feature"/>
@@ -106,12 +71,12 @@
<import plugin="org.eclipse.cdt.dsf.gdb"/>
<import plugin="org.eclipse.cdt.dsf.gdb.ui"/>
<import plugin="org.eclipse.cdt.launch"/>
+ <import feature="com.android.ide.eclipse.ddms" version="21.0.0" match="greaterOrEqual" />
+ <import feature="com.android.ide.eclipse.adt" version="21.0.0" match="greaterOrEqual" />
+ <import feature="com.android.ide.eclipse.gldebugger" version="21.0.0" match="greaterOrEqual" />
+ <import feature="com.android.ide.eclipse.hierarchyviewer" version="21.0.0" match="greaterOrEqual" />
+ <import feature="com.android.ide.eclipse.ndk" version="21.0.0" match="greaterOrEqual" />
+ <import feature="com.android.ide.eclipse.traceview" version="21.0.0" match="greaterOrEqual" />
</requires>
- <plugin
- id="com.android.ide.eclipse.adt.package"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
</feature>
diff --git a/eclipse/features/com.android.ide.eclipse.adt/feature.xml b/eclipse/features/com.android.ide.eclipse.adt/feature.xml
index 1360af0..d16c5a8 100644
--- a/eclipse/features/com.android.ide.eclipse.adt/feature.xml
+++ b/eclipse/features/com.android.ide.eclipse.adt/feature.xml
@@ -158,4 +158,10 @@ This Agreement is governed by the laws of the State of New York and the intellec
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="com.android.ide.eclipse.adt.package"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
</feature>
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/plugin.xml b/eclipse/plugins/com.android.ide.eclipse.adt.package/plugin.xml
index ce6baf9..5d4a993 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt.package/plugin.xml
+++ b/eclipse/plugins/com.android.ide.eclipse.adt.package/plugin.xml
@@ -41,7 +41,7 @@
point="org.eclipse.ui.intro">
<intro
class="org.eclipse.ui.intro.config.CustomizableIntroPart"
- icon="$nl$/icons/image_obj.gif"
+ icon="icons/adt16.png"
id="org.eclipse.intro.minimal"
label="Android IDE"/>
</extension>