diff options
20 files changed, 28 insertions, 136 deletions
diff --git a/anttasks/.classpath b/anttasks/.classpath index d6ce15a..08ced21 100644 --- a/anttasks/.classpath +++ b/anttasks/.classpath @@ -4,6 +4,5 @@ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry combineaccessrules="false" kind="src" path="/SdkLib"/> <classpathentry kind="var" path="ANDROID_SRC/prebuilt/common/ant/ant.jar"/> - <classpathentry combineaccessrules="false" kind="src" path="/ApkBuilder"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/anttasks/src/Android.mk b/anttasks/src/Android.mk index 94d6d3f..dbaf2bc 100644 --- a/anttasks/src/Android.mk +++ b/anttasks/src/Android.mk @@ -20,7 +20,6 @@ LOCAL_SRC_FILES := $(call all-subdir-java-files) LOCAL_JAVA_LIBRARIES := \ sdklib \ - apkbuilder \ ant LOCAL_MODULE := anttasks diff --git a/anttasks/src/com/android/ant/ApkBuilderTask.java b/anttasks/src/com/android/ant/ApkBuilderTask.java index 55e1ab3..bec0417 100644 --- a/anttasks/src/com/android/ant/ApkBuilderTask.java +++ b/anttasks/src/com/android/ant/ApkBuilderTask.java @@ -16,9 +16,9 @@ package com.android.ant; -import com.android.apkbuilder.internal.ApkBuilderHelper; -import com.android.apkbuilder.internal.ApkBuilderHelper.ApkCreationException; -import com.android.apkbuilder.internal.ApkBuilderHelper.ApkFile; +import com.android.sdklib.internal.build.ApkBuilderHelper; +import com.android.sdklib.internal.build.ApkBuilderHelper.ApkCreationException; +import com.android.sdklib.internal.build.ApkBuilderHelper.ApkFile; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; diff --git a/apkbuilder/.classpath b/apkbuilder/.classpath deleted file mode 100644 index 63ec892..0000000 --- a/apkbuilder/.classpath +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry combineaccessrules="false" kind="src" path="/AndroidPrefs"/> - <classpathentry combineaccessrules="false" kind="src" path="/SdkLib"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/apkbuilder/.gitignore b/apkbuilder/.gitignore deleted file mode 100644 index fe99505..0000000 --- a/apkbuilder/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -bin - diff --git a/apkbuilder/.project b/apkbuilder/.project deleted file mode 100644 index cc97afc..0000000 --- a/apkbuilder/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>ApkBuilder</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/apkbuilder/Android.mk b/apkbuilder/Android.mk deleted file mode 100644 index bdfe5c8..0000000 --- a/apkbuilder/Android.mk +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (C) 2008 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. -# -APKBUILDER_LOCAL_DIR := $(call my-dir) -include $(APKBUILDER_LOCAL_DIR)/etc/Android.mk -include $(APKBUILDER_LOCAL_DIR)/src/Android.mk diff --git a/apkbuilder/etc/Android.mk b/apkbuilder/etc/Android.mk deleted file mode 100644 index d74db17..0000000 --- a/apkbuilder/etc/Android.mk +++ /dev/null @@ -1,22 +0,0 @@ -# -# Copyright (C) 2008 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. -# - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_PREBUILT_EXECUTABLES := apkbuilder -include $(BUILD_HOST_PREBUILT) - diff --git a/apkbuilder/etc/apkbuilder b/apkbuilder/etc/apkbuilder index 3e7e822..2116cdc 100755 --- a/apkbuilder/etc/apkbuilder +++ b/apkbuilder/etc/apkbuilder @@ -33,18 +33,15 @@ progdir=`pwd` prog="${progdir}"/`basename "${prog}"` cd "${oldwd}" -jarfile=apkbuilder.jar +jarfile=sdklib.jar frameworkdir="$progdir" -libdir="$progdir" if [ ! -r "$frameworkdir/$jarfile" ] then frameworkdir=`dirname "$progdir"`/tools/lib - libdir=`dirname "$progdir"`/tools/lib fi if [ ! -r "$frameworkdir/$jarfile" ] then frameworkdir=`dirname "$progdir"`/framework - libdir=`dirname "$progdir"`/lib fi if [ ! -r "$frameworkdir/$jarfile" ] then @@ -62,20 +59,11 @@ else java_debug= fi -# Mac OS X needs an additional arg, or you get an "illegal thread" complaint. -if [ `uname` = "Darwin" ]; then - os_opts="-XstartOnFirstThread" -else - os_opts= -fi - if [ "$OSTYPE" = "cygwin" ] ; then jarpath=`cygpath -w "$frameworkdir/$jarfile"` - progdir=`cygpath -w "$progdir"` else jarpath="$frameworkdir/$jarfile" fi -# need to use "java.ext.dirs" because "-jar" causes classpath to be ignored # might need more memory, e.g. -Xmx128M -exec java -Xmx128M $os_opts $java_debug -Djava.ext.dirs="$frameworkdir" -Djava.library.path="$libdir" -jar "$jarpath" "$@" +exec java -Xmx128M $java_debug -classpath "$jarpath" com.android.sdklib.build.ApkBuilderMain "$@" diff --git a/apkbuilder/etc/apkbuilder.bat b/apkbuilder/etc/apkbuilder.bat index eaaf9b8..c82f01d 100755 --- a/apkbuilder/etc/apkbuilder.bat +++ b/apkbuilder/etc/apkbuilder.bat @@ -29,20 +29,17 @@ set java_exe= call lib\find_java.bat if not defined java_exe goto :EOF -set jarfile=apkbuilder.jar +set jarfile=sdklib.jar set frameworkdir= -set libdir= if exist %frameworkdir%%jarfile% goto JarFileOk set frameworkdir=lib\ - set libdir=lib\ if exist %frameworkdir%%jarfile% goto JarFileOk set frameworkdir=..\framework\ - set libdir=..\lib\ :JarFileOk set jarpath=%frameworkdir%%jarfile% -call %java_exe% -Djava.ext.dirs=%frameworkdir% -Djava.library.path=%libdir% -jar %jarpath% %* +call %java_exe% -classpath %jarpath% com.android.sdklib.build.ApkBuilderMain %* diff --git a/apkbuilder/etc/manifest.txt b/apkbuilder/etc/manifest.txt deleted file mode 100644 index 6aafb16..0000000 --- a/apkbuilder/etc/manifest.txt +++ /dev/null @@ -1 +0,0 @@ -Main-Class: com.android.apkbuilder.ApkBuilder diff --git a/apkbuilder/readme.txt b/apkbuilder/readme.txt new file mode 100644 index 0000000..1bb7bc8 --- /dev/null +++ b/apkbuilder/readme.txt @@ -0,0 +1,5 @@ +The apkbuilder command line tool is deprecated, and is not maintained anymore. +It is lacking recent build improvements such as support for Library Projects. + +Its source code has been moved into sdklib. +It is recommended to directly use the com.android.sdklib.build.ApkBuilder class instead.
\ No newline at end of file diff --git a/apkbuilder/src/Android.mk b/apkbuilder/src/Android.mk deleted file mode 100644 index 24ab27a..0000000 --- a/apkbuilder/src/Android.mk +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright (C) 2008 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. -# - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := $(call all-subdir-java-files) -LOCAL_JAR_MANIFEST := ../etc/manifest.txt -LOCAL_JAVA_LIBRARIES := \ - androidprefs \ - sdklib - -LOCAL_MODULE := apkbuilder - -include $(BUILD_HOST_JAVA_LIBRARY) - diff --git a/sdkmanager/app/etc/android b/sdkmanager/app/etc/android index b1dc839..fe2ae41 100755 --- a/sdkmanager/app/etc/android +++ b/sdkmanager/app/etc/android @@ -35,16 +35,13 @@ cd "${oldwd}" jarfile=sdkmanager.jar frameworkdir="$progdir" -libdir="$progdir" if [ ! -r "$frameworkdir/$jarfile" ] then frameworkdir=`dirname "$progdir"`/tools/lib - libdir=`dirname "$progdir"`/tools/lib fi if [ ! -r "$frameworkdir/$jarfile" ] then frameworkdir=`dirname "$progdir"`/framework - libdir=`dirname "$progdir"`/lib fi if [ ! -r "$frameworkdir/$jarfile" ] then diff --git a/sdkmanager/libs/sdklib/manifest.txt b/sdkmanager/libs/sdklib/manifest.txt new file mode 100644 index 0000000..8f2b7f7 --- /dev/null +++ b/sdkmanager/libs/sdklib/manifest.txt @@ -0,0 +1 @@ +Class-Path: androidprefs.jar diff --git a/sdkmanager/libs/sdklib/src/Android.mk b/sdkmanager/libs/sdklib/src/Android.mk index c8d6f71..5a7a7c7 100644 --- a/sdkmanager/libs/sdklib/src/Android.mk +++ b/sdkmanager/libs/sdklib/src/Android.mk @@ -18,7 +18,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(call all-subdir-java-files) LOCAL_JAVA_RESOURCE_DIRS := . - +LOCAL_JAR_MANIFEST := ../manifest.txt LOCAL_JAVA_LIBRARIES := \ androidprefs \ commons-compress-1.0 diff --git a/apkbuilder/src/com/android/apkbuilder/ApkBuilderMain.java b/sdkmanager/libs/sdklib/src/com/android/sdklib/build/ApkBuilderMain.java index 08124ad..fb6ee6a 100644 --- a/apkbuilder/src/com/android/apkbuilder/ApkBuilderMain.java +++ b/sdkmanager/libs/sdklib/src/com/android/sdklib/build/ApkBuilderMain.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.android.apkbuilder; +package com.android.sdklib.build; -import com.android.apkbuilder.internal.ApkBuilderHelper; -import com.android.apkbuilder.internal.ApkBuilderHelper.ApkCreationException; -import com.android.apkbuilder.internal.ApkBuilderHelper.ApkFile; +import com.android.sdklib.internal.build.ApkBuilderHelper; +import com.android.sdklib.internal.build.ApkBuilderHelper.ApkCreationException; +import com.android.sdklib.internal.build.ApkBuilderHelper.ApkFile; import java.io.File; import java.io.FileInputStream; @@ -139,6 +139,12 @@ public final class ApkBuilderMain { private static void printUsageAndQuit() { // 80 cols marker: 01234567890123456789012345678901234567890123456789012345678901234567890123456789 + System.err.println("\n\n<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"); + System.err.println("THIS TOOL IS DEPRECATED!\n"); + System.err.println("If you wish to use apkbuilder for a custom build system, please look at the"); + System.err.println("com.android.sdklib.build.ApkBuilder which provides support for"); + System.err.println("recent build improvements including library projects."); + System.err.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n\n"); System.err.println("A command line tool to package an Android application from various sources."); System.err.println("Usage: apkbuilder <out archive> [-v][-u][-storetype STORE_TYPE] [-z inputzip]"); System.err.println(" [-f inputfile] [-rf input-folder] [-rj -input-path]"); @@ -175,4 +181,7 @@ public final class ApkBuilderMain { } System.exit(1); } + + private ApkBuilderMain() { + } } diff --git a/apkbuilder/src/com/android/apkbuilder/internal/ApkBuilderHelper.java b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/build/ApkBuilderHelper.java index 3046942..ba1c878 100644 --- a/apkbuilder/src/com/android/apkbuilder/internal/ApkBuilderHelper.java +++ b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/build/ApkBuilderHelper.java @@ -14,12 +14,9 @@ * limitations under the License. */ -package com.android.apkbuilder.internal; +package com.android.sdklib.internal.build; import com.android.prefs.AndroidLocation.AndroidLocationException; -import com.android.sdklib.internal.build.DebugKeyProvider; -import com.android.sdklib.internal.build.JavaResourceFilter; -import com.android.sdklib.internal.build.SignedJarBuilder; import com.android.sdklib.internal.build.DebugKeyProvider.KeytoolException; import java.io.File; diff --git a/templates/build.export.template b/templates/build.export.template index 6a83a76..3df9f8f 100644 --- a/templates/build.export.template +++ b/templates/build.export.template @@ -19,8 +19,6 @@ <pathelement path="${sdk.dir}/tools/lib/anttasks.jar" /> <pathelement path="${sdk.dir}/tools/lib/sdklib.jar" /> <pathelement path="${sdk.dir}/tools/lib/androidprefs.jar" /> - <pathelement path="${sdk.dir}/tools/lib/apkbuilder.jar" /> - <pathelement path="${sdk.dir}/tools/lib/jarutils.jar" /> </path> <taskdef name="android-export" diff --git a/templates/build.template b/templates/build.template index d814b6c..d8bd709 100644 --- a/templates/build.template +++ b/templates/build.template @@ -39,7 +39,6 @@ <pathelement path="${sdk.dir}/tools/lib/anttasks.jar" /> <pathelement path="${sdk.dir}/tools/lib/sdklib.jar" /> <pathelement path="${sdk.dir}/tools/lib/androidprefs.jar" /> - <pathelement path="${sdk.dir}/tools/lib/apkbuilder.jar" /> </path> <taskdef name="setup" |