diff options
author | Siva Velusamy <vsiva@google.com> | 2014-06-10 14:29:11 -0700 |
---|---|---|
committer | Siva Velusamy <vsiva@google.com> | 2014-06-10 15:32:43 -0700 |
commit | da9cddc36601cc91d13a6256cc24c4c628f2c870 (patch) | |
tree | 4df1ab26cb8c9a63bc2043e0917329e95a87bada /eclipse/plugins/com.android.ide.eclipse.adt | |
parent | f970b9a6676679fdaef6388c44b6575f95bc5875 (diff) | |
download | sdk-da9cddc36601cc91d13a6256cc24c4c628f2c870.zip sdk-da9cddc36601cc91d13a6256cc24c4c628f2c870.tar.gz sdk-da9cddc36601cc91d13a6256cc24c4c628f2c870.tar.bz2 |
Revert back from OSGI -> bundled jars
We tried the approach of replacing bundled jars with OSGI
jars. However, this eventually ended up resulting in
ClassCircularityError thrown at runtime when running on
Java 7. As far as we could diagnose, the issue seems to
be that:
- LayoutLibrary attempts to load layoutlib.jar (which is
a regular jar present inside the android sdk data folder).
- The class loader passed to layoutlib is the LayoutLibrary's
class loader.
- The classes inside the layout library then attempt to
load classes from a different OSGI jar (layoutlib-api)
- At this time, we receive a ClassCircularityError
Most of our other jars depend on layoutlib-api, so it is
not possible to just bundle layoutlib-api. So for now, we
are back to bundling jars.
Change-Id: Ic8c838a1a7e90e1bc6b8c5251341b1ded46053ba
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.adt')
5 files changed, 51 insertions, 29 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/.classpath b/eclipse/plugins/com.android.ide.eclipse.adt/.classpath index 10b4873..fcf27a5 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/.classpath +++ b/eclipse/plugins/com.android.ide.eclipse.adt/.classpath @@ -3,5 +3,20 @@ <classpathentry excluding="Makefile|resources/" kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry exported="true" kind="lib" path="libs/ninepatch.jar" sourcepath="/ninepatch"/> + <classpathentry exported="true" kind="lib" path="libs/sdkuilib.jar" sourcepath="/sdkuilib"/> + <classpathentry exported="true" kind="lib" path="libs/rule-api.jar" sourcepath="/rule-api"/> + <classpathentry exported="true" kind="lib" path="libs/lint-api.jar" sourcepath="/lint-api"/> + <classpathentry exported="true" kind="lib" path="libs/lint-checks.jar" sourcepath="/lint-checks"/> + <classpathentry exported="true" kind="lib" path="libs/asset-studio.jar" sourcepath="/asset-studio"/> + <classpathentry exported="true" kind="lib" path="libs/ant-glob.jar"/> + <classpathentry exported="true" kind="lib" path="libs/freemarker-2.3.20.jar"/> + <classpathentry exported="true" kind="lib" path="libs/manifest-merger.jar" sourcepath="/ManifestMerger"/> + <classpathentry exported="true" kind="lib" path="libs/lombok-ast-0.2.2.jar"/> + <classpathentry exported="true" kind="lib" path="libs/propertysheet.jar"/> + <classpathentry exported="true" kind="lib" path="libs/asm-4.0.jar"/> + <classpathentry exported="true" kind="lib" path="libs/asm-analysis-4.0.jar"/> + <classpathentry exported="true" kind="lib" path="libs/asm-tree-4.0.jar"/> + <classpathentry exported="true" kind="lib" path="libs/swtmenubar.jar"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/.gitignore b/eclipse/plugins/com.android.ide.eclipse.adt/.gitignore deleted file mode 100644 index c944794..0000000 --- a/eclipse/plugins/com.android.ide.eclipse.adt/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.jar -*.target diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.adt/META-INF/MANIFEST.MF index ba3a01e..5df52db 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/META-INF/MANIFEST.MF +++ b/eclipse/plugins/com.android.ide.eclipse.adt/META-INF/MANIFEST.MF @@ -3,7 +3,22 @@ Bundle-ManifestVersion: 2 Bundle-Name: Android Development Toolkit Bundle-SymbolicName: com.android.ide.eclipse.adt;singleton:=true Bundle-Version: 22.6.2.qualifier -Bundle-ClassPath: . +Bundle-ClassPath: ., + libs/sdkuilib.jar, + libs/ninepatch.jar, + libs/freemarker-2.3.20.jar, + libs/rule-api.jar, + libs/asset-studio.jar, + libs/lint-api.jar, + libs/lint-checks.jar, + libs/lombok-ast-0.2.2.jar, + libs/asm-4.0.jar, + libs/asm-tree-4.0.jar, + libs/asm-analysis-4.0.jar, + libs/propertysheet.jar, + libs/ant-glob.jar, + libs/swtmenubar.jar, + libs/manifest-merger.jar Bundle-Activator: com.android.ide.eclipse.adt.AdtPlugin Bundle-Vendor: The Android Open Source Project Require-Bundle: com.android.ide.eclipse.base, @@ -36,30 +51,7 @@ Require-Bundle: com.android.ide.eclipse.base, org.eclipse.ltk.core.refactoring, org.eclipse.ltk.ui.refactoring, org.eclipse.core.expressions, - org.eclipse.compare, - com.android.tools.asset-studio;bundle-version="22.9.0", - com.android.tools.common;bundle-version="22.9.0", - com.android.tools.layoutlib.api;bundle-version="22.9.0", - com.android.tools.sdk-common;bundle-version="22.9.0", - com.google.guava;bundle-version="15.0.0", - com.android.tools.sdklib;bundle-version="22.9.0", - org.ow2.asm;bundle-version="4.0.0", - org.ow2.asm.analysis;bundle-version="4.0.0", - org.ow2.asm.tree;bundle-version="4.0.0", - com.android.tools.sdkstats;bundle-version="22.9.0", - com.android.tools.sdkuilib;bundle-version="22.9.0", - com.android.tools.build.manifest-merger;bundle-version="22.9.0", - com.android.tools.ddms.ddmlib;bundle-version="22.9.0", - com.android.tools.lint.api;bundle-version="22.9.0", - com.android.tools.lint.checks;bundle-version="22.9.0", - com.android.tools.external.lombok.ast;bundle-version="0.2.2", - com.android.tools.ddms.ddmuilib;bundle-version="22.9.0", - com.android.tools.dvlib;bundle-version="22.9.0", - com.android.tools.rule-api;bundle-version="22.9.0", - com.android.tools.external.propertysheet;bundle-version="1.0.0", - net.sf.kxml.2;bundle-version="2.3.0", - com.android.tools.external.ant-glob;bundle-version="1.0.0", - org.freemarker.freemarker;bundle-version="2.3.20" + org.eclipse.compare Bundle-ActivationPolicy: lazy Export-Package: com.android.ide.common.layout;x-friends:="com.android.ide.eclipse.tests", com.android.ide.common.layout.grid;x-friends:="com.android.ide.eclipse.tests", @@ -125,7 +117,22 @@ Export-Package: com.android.ide.common.layout;x-friends:="com.android.ide.eclips com.android.ide.eclipse.adt.internal.wizards.newproject;x-friends:="com.android.ide.eclipse.tests", com.android.ide.eclipse.adt.internal.wizards.newxmlfile;x-friends:="com.android.ide.eclipse.tests", com.android.ide.eclipse.adt.internal.wizards.templates;x-friends:="com.android.ide.eclipse.tests", - com.android.ide.eclipse.adt.io;x-friends:="com.android.ide.eclipse.tests" + com.android.ide.eclipse.adt.io;x-friends:="com.android.ide.eclipse.tests", + com.android.manifmerger;x-friends:="com.android.ide.eclipse.tests", + com.android.ninepatch;x-friends:="com.android.ide.eclipse.tests", + com.android.sdkuilib.internal.repository;x-friends:="com.android.ide.eclipse.tests", + com.android.sdkuilib.internal.repository.core;x-friends:="com.android.ide.eclipse.tests", + com.android.sdkuilib.internal.repository.icons;x-friends:="com.android.ide.eclipse.tests", + com.android.sdkuilib.internal.repository.ui;x-friends:="com.android.ide.eclipse.tests", + com.android.sdkuilib.internal.tasks;x-friends:="com.android.ide.eclipse.tests", + com.android.sdkuilib.internal.widgets;x-friends:="com.android.ide.eclipse.tests", + com.android.sdkuilib.repository;x-friends:="com.android.ide.eclipse.tests", + com.android.sdkuilib.ui;x-friends:="com.android.ide.eclipse.tests", + com.android.tools.lint.checks;x-friends:="com.android.ide.eclipse.tests", + com.android.tools.lint.client.api;x-friends:="com.android.ide.eclipse.tests", + com.android.tools.lint.detector.api;x-friends:="com.android.ide.eclipse.tests", + freemarker.cache;x-friends:="com.android.ide.eclipse.tests", + freemarker.template;x-friends:="com.android.ide.eclipse.tests" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Import-Package: com.ibm.icu.text, org.eclipse.core.variables diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/build.properties b/eclipse/plugins/com.android.ide.eclipse.adt/build.properties index fc68022..32d7d7e 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/build.properties +++ b/eclipse/plugins/com.android.ide.eclipse.adt/build.properties @@ -2,6 +2,7 @@ bin.includes = plugin.xml,\ META-INF/,\ icons/,\ .,\ + libs/,\ templates/,\ about.ini,\ about.properties,\ diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/DexWrapper.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/DexWrapper.java index 1c7c2e3..3f88284 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/DexWrapper.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/DexWrapper.java @@ -76,7 +76,8 @@ public final class DexWrapper { } URL url = f.toURI().toURL(); - URLClassLoader loader = new URLClassLoader(new URL[] { url }, + @SuppressWarnings("resource") + URLClassLoader loader = new URLClassLoader(new URL[] { url }, DexWrapper.class.getClassLoader()); // get the classes. |