diff options
| author | The Android Open Source Project <initial-contribution@android.com> | 2008-10-21 07:00:00 -0700 |
|---|---|---|
| committer | The Android Open Source Project <initial-contribution@android.com> | 2008-10-21 07:00:00 -0700 |
| commit | 5c11852110eeb03dc5a69111354b383f98d15336 (patch) | |
| tree | 7b26fde6effb80c241f28fc3e620016e7f86418e /tools/scripts | |
| download | android_development-5c11852110eeb03dc5a69111354b383f98d15336.tar.gz android_development-5c11852110eeb03dc5a69111354b383f98d15336.tar.bz2 android_development-5c11852110eeb03dc5a69111354b383f98d15336.zip | |
Initial Contribution
Diffstat (limited to 'tools/scripts')
| -rw-r--r-- | tools/scripts/AndroidManifest.alias.template | 15 | ||||
| -rw-r--r-- | tools/scripts/AndroidManifest.template | 15 | ||||
| -rwxr-xr-x | tools/scripts/add-accounts | 131 | ||||
| -rwxr-xr-x | tools/scripts/add-accounts-sdk | 128 | ||||
| -rw-r--r-- | tools/scripts/alias.template | 5 | ||||
| -rw-r--r-- | tools/scripts/android.el | 131 | ||||
| -rw-r--r-- | tools/scripts/build.alias.template | 62 | ||||
| -rw-r--r-- | tools/scripts/build.template | 293 | ||||
| -rw-r--r-- | tools/scripts/default.properties.template | 5 | ||||
| -rw-r--r-- | tools/scripts/iml.template | 14 | ||||
| -rw-r--r-- | tools/scripts/ipr.template | 232 | ||||
| -rw-r--r-- | tools/scripts/iws.template | 470 | ||||
| -rw-r--r-- | tools/scripts/java_file.template | 15 | ||||
| -rw-r--r-- | tools/scripts/layout.template | 13 | ||||
| -rw-r--r-- | tools/scripts/plugin.prop | 4 | ||||
| -rwxr-xr-x | tools/scripts/sdk_clean.sh | 48 | ||||
| -rw-r--r-- | tools/scripts/strings.template | 4 |
17 files changed, 1585 insertions, 0 deletions
diff --git a/tools/scripts/AndroidManifest.alias.template b/tools/scripts/AndroidManifest.alias.template new file mode 100644 index 000000000..b1be4c870 --- /dev/null +++ b/tools/scripts/AndroidManifest.alias.template @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="PACKAGE" + android:versionCode="1" + android:versionName="1.0"> + <application android:hasCode="false"> + <activity android:name="android.app.AliasActivity" android:label="@string/app_name"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + <meta-data android:name="android.app.alias" android:resource="@xml/alias" /> + </activity> + </application> +</manifest> diff --git a/tools/scripts/AndroidManifest.template b/tools/scripts/AndroidManifest.template new file mode 100644 index 000000000..2b06e76ac --- /dev/null +++ b/tools/scripts/AndroidManifest.template @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="PACKAGE" + android:versionCode="1" + android:versionName="1.0"> + <application android:label="@string/app_name"> + <activity android:name=".ACTIVITY_NAME" + android:label="@string/app_name"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> +</manifest> diff --git a/tools/scripts/add-accounts b/tools/scripts/add-accounts new file mode 100755 index 000000000..d2cddc087 --- /dev/null +++ b/tools/scripts/add-accounts @@ -0,0 +1,131 @@ +#!/usr/bin/env python +# +# 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. + +""" +A faux Setup Wizard. Stuffs one or two usernames + passwords into the +database on the device. +""" + +import sys +if sys.hexversion < 0x02040000: + print "This script requires python 2.4 or higher." + sys.exit(1) + +import getpass +import subprocess +import time +import sha + +DB = "/data/data/com.google.android.googleapps/databases/accounts.db" + +def RunCmd(args): + proc = subprocess.Popen(args, stdout=subprocess.PIPE) + out = proc.stdout.read() + if proc.wait(): + print + print "failed: %s" % " ".join(args) + return None + return out + +def GetProp(adb_flags, name): + args = ("adb",) + adb_flags + ("shell", "su", "root", + "/system/bin/getprop", name) + return RunCmd(args) + +def SetProp(adb_flags, name, value): + args = ("adb",) + adb_flags + ("shell", "su", "root", + "/system/bin/setprop", name, value) + return RunCmd(args) + +def DbExists(adb_flags): + args = ("adb",) + adb_flags + ("shell", "su", "root", + "/system/bin/ls", DB) + result = RunCmd(args) + if result is None: return None + return "No such file" not in result + +def main(argv): + if len(argv) == 1: + print ("usage: %s [adb flags] " + "[<dasher address[:password]>] " + "[<gmail address[:password]>]") % (argv[0],) + sys.exit(2) + + argv = argv[1:] + + gmail = None + dasher = None + while argv and "@" in argv[-1]: + addr = argv.pop() + if "@gmail.com" in addr or "@googlemail.com" in addr: + gmail = addr + else: + dasher = addr + + adb_flags = tuple(argv) + + while True: + db = DbExists(adb_flags) + if db is None: + print "failed to contact device; will retry in 3 seconds" + time.sleep(3) + continue + + if db: + print + print "GoogleLoginService has already started on this device;" + print "it's too late to use this script to add accounts." + print + print "This script only works on a freshly-wiped device (or " + print "emulator) while booting for the first time." + print + break + + hosted_account = GetProp(adb_flags, "ro.config.hosted_account").strip() + google_account = GetProp(adb_flags, "ro.config.google_account").strip() + + if dasher and hosted_account: + print + print "A dasher account is already configured on this device;" + print "can't add", hosted_account + print + dasher = None + + if gmail and google_account: + print + print "A google account is already configured on this device;" + print "can't add", google_account + print + gmail = None + + if not gmail and not dasher: break + + if dasher: + SetProp(adb_flags, "ro.config.hosted_account", dasher) + print "set hosted_account to", dasher + if gmail: + SetProp(adb_flags, "ro.config.google_account", gmail) + print "set google_account to", gmail + + break + + + + + + +if __name__ == "__main__": + main(sys.argv) diff --git a/tools/scripts/add-accounts-sdk b/tools/scripts/add-accounts-sdk new file mode 100755 index 000000000..bb3447fab --- /dev/null +++ b/tools/scripts/add-accounts-sdk @@ -0,0 +1,128 @@ +#!/usr/bin/env python +# +# 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. + +""" +A faux Setup Wizard. Stuffs one or two usernames + passwords into the +database on the device. +""" + +import sys +if sys.hexversion < 0x02040000: + print "This script requires python 2.4 or higher." + sys.exit(1) + +import getpass +import subprocess +import time +import sha + +DB = "/data/data/com.google.android.googleapps/databases/accounts.db" + +def RunCmd(args): + proc = subprocess.Popen(args, stdout=subprocess.PIPE) + out = proc.stdout.read() + if proc.wait(): + print + print "failed: %s" % " ".join(args) + return None + return out + +def GetProp(adb_flags, name): + args = ("adb",) + adb_flags + ("shell", "/system/bin/getprop", name) + return RunCmd(args) + +def SetProp(adb_flags, name, value): + args = ("adb",) + adb_flags + ("shell", "/system/bin/setprop", name, value) + return RunCmd(args) + +def DbExists(adb_flags): + args = ("adb",) + adb_flags + ("shell", "/system/bin/ls", DB) + result = RunCmd(args) + if result is None: return None + return "No such file" not in result + +def main(argv): + if len(argv) == 1: + print ("usage: %s [adb flags] " + "[<hosted address[:password]>] " + "[<gmail address[:password]>]") % (argv[0],) + sys.exit(2) + + argv = argv[1:] + + gmail = None + hosted = None + while argv and "@" in argv[-1]: + addr = argv.pop() + if "@gmail.com" in addr or "@googlemail.com" in addr: + gmail = addr + else: + hosted = addr + + adb_flags = tuple(argv) + + while True: + db = DbExists(adb_flags) + if db is None: + print "failed to contact device; will retry in 3 seconds" + time.sleep(3) + continue + + if db: + print + print "GoogleLoginService has already started on this device;" + print "it's too late to use this script to add accounts." + print + print "This script only works on a freshly-wiped device (or " + print "emulator) while booting for the first time." + print + break + + hosted_account = GetProp(adb_flags, "ro.config.hosted_account").strip() + google_account = GetProp(adb_flags, "ro.config.google_account").strip() + + if hosted and hosted_account: + print + print "A hosted account is already configured on this device;" + print "can't add", hosted_account + print + hosted = None + + if gmail and google_account: + print + print "A google account is already configured on this device;" + print "can't add", google_account + print + gmail = None + + if not gmail and not hosted: break + + if hosted: + SetProp(adb_flags, "ro.config.hosted_account", hosted) + print "set hosted_account to", hosted + if gmail: + SetProp(adb_flags, "ro.config.google_account", gmail) + print "set google_account to", gmail + + break + + + + + + +if __name__ == "__main__": + main(sys.argv) diff --git a/tools/scripts/alias.template b/tools/scripts/alias.template new file mode 100644 index 000000000..8be355b36 --- /dev/null +++ b/tools/scripts/alias.template @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<alias xmlns:android="http://schemas.android.com/apk/res/android"> + <intent android:action="android.intent.action.VIEW" + android:data="ALIASDATA"/> +</alias>
\ No newline at end of file diff --git a/tools/scripts/android.el b/tools/scripts/android.el new file mode 100644 index 000000000..49f2f1e8b --- /dev/null +++ b/tools/scripts/android.el @@ -0,0 +1,131 @@ +;;;; Copyright 2007 The Android Open Source Project + +;;; Set up GUD+JDB to attach to a Java process running on the phone or +;;; under the emulator. + +(defvar android-jdb-port-history '("8700") + "history of ports supplied to `android-jdb'") + +(defvar android-jdb-project-root-history '() + "history of project roots supplied to `android-jdb'") +(defvar android-jdb-history nil + "history of commands supplied to `android-jdb'") + +(defvar android-jdb-activity-class-history () + "history of activity classes supplied to `start-android-activity'") + +(defcustom android-jdb-command-name "jdb" + "Name of Java debugger." + :type 'string + :group 'android) + +(defgroup android nil + "Android Applications." + :group 'applications) + +(defcustom android-project-root nil + "This is where your Android project root is stored." + :type 'directory + :group 'android ) + +(defcustom android-apk nil + "This is where your Android Application Package is stored." + :type 'string + :group 'android) + +(defcustom android-activity-class nil + "This is where your Android Activity class is stored." + :type 'string + :group 'android) + +(defun android-read-project-root () + (if (or (string-match "XEmacs" emacs-version) + (>= emacs-major-version 22)) + (read-file-name "Android project root: " + android-project-root + nil + t + nil + 'file-directory-p) + (labels ((read-directory () + (read-file-name "Android project root: " + android-project-root + nil + t + nil))) + (do ((entered-root (read-directory) (read-directory))) + ((and entered-root + (file-directory-p entered-root)) + (expand-file-name entered-root)))))) + +(defun android-jdb (port root) + "Set GUD+JDB up to run against Android on PORT in directory ROOT." + (interactive + (list + (read-from-minibuffer "Activity's JDWP DDMS port: " + (car android-jdb-port-history) + nil + t + 'android-jdb-port-history) + (android-read-project-root))) + (setq android-project-root root) + (let ((jdb-command + (format "%s -attach localhost:%s -sourcepath%s" + android-jdb-command-name + port + (format "%s/src" root)))) + (if (not (string= jdb-command (car android-jdb-history))) + (push jdb-command android-jdb-history)) + (jdb jdb-command))) + +(defun android-emulate () + "Run the Android emulator. This expects the SDK tools directory to be in the current path." + (interactive) + (compile "emulator")) + +(defun android-install-app (apk) + "Install an Android application package APK in the Android emulator. This expects the SDK tools directory to be in the current path." + (interactive (list (expand-file-name + (read-file-name "Android Application Package (.apk): " + nil + android-apk + t + nil + nil)))) + (setq android-apk apk) + (compile (format "adb install -r %s" apk))) + +(defun android-uninstall-app (package-name) + "Uninstall an Android application package APK in the Android emulator. This expects the SDK tools directory to be in the current path. +Specify the package name --- and not the name of the application e.g., com.android.foo." + (interactive + (list + (read-from-minibuffer "Package: "))) + (compile (format "adb install -r %s" package))) + +(defun android-start-activity (package class) + "Start the activity PACKAGE/CLASS in the Android emulator. This expects the SDK tools directory to be in the current path." + (interactive + (list + (read-from-minibuffer "Package: ") + (read-from-minibuffer "Activity Java class: " + (car android-jdb-activity-class-history) + nil + t + 'android-jdb-activity-class-history))) + (compile (format "adb shell am start -n %s/%s" package class))) + +(defun android-debug-activity (package class) + "Start the activity PACKAGE/CLASS within the debugger in the Android emulator. This expects the SDK tools directory to be in the current path." + (interactive + (list + (read-from-minibuffer "Package: ") + (read-from-minibuffer "Activity Java class: " + (car android-jdb-activity-class-history) + nil + t + 'android-jdb-activity-class-history))) + (compile (format "adb shell am start -D -n %s/%s" package class))) + +(provide 'android) + diff --git a/tools/scripts/build.alias.template b/tools/scripts/build.alias.template new file mode 100644 index 000000000..22252aa8b --- /dev/null +++ b/tools/scripts/build.alias.template @@ -0,0 +1,62 @@ +<?xml version="1.0" ?> +<project name="ACTIVITY_NAME" default="package"> + + <!-- The build.properties file can be created by you and is never touched + by activitycreator. If you want to manually set properties, this is + the best place to set them. --> + <property file="build.properties"/> + + <!-- The default.properties file is created and updated by activitycreator. + It will set any properties not already defined by build.properties. --> + <property file="default.properties"/> + + <!-- ************************************************************************************* --> + <!-- No user servicable parts below. --> + + <!-- Input directories --> + <property name="resource-dir" value="res" /> + + <!-- The final package file to generate --> + <property name="out-package" value="${ant.project.name}.apk" /> + + <!-- Tools --> + <condition property="aapt" value="${android-tools}/aapt.exe" else="${android-tools}/aapt" > + <os family="windows"/> + </condition> + <condition property="adb" value="${android-tools}/adb.exe" else="${android-tools}/adb" > + <os family="windows"/> + </condition> + <property name="android-jar" value="${sdk-folder}/android.jar" /> + + <!-- Rules --> + + <!-- Packages the manifest and the resource files --> + <target name="package-res"> + <echo>Packaging resources...</echo> + <exec executable="${aapt}" failonerror="true"> + <arg value="package" /> + <arg value="-f" /> + <arg value="-M" /> + <arg value="AndroidManifest.xml" /> + <arg value="-S" /> + <arg value="${resource-dir}" /> + <arg value="-I" /> + <arg value="${android-jar}" /> + <arg value="-F" /> + <arg value="${out-package}" /> + </exec> + </target> + + <!-- Create the package file for this project from the sources. --> + <target name="package" depends="package-res" /> + + <!-- Create the package and install package on the default emulator --> + <target name="install" depends="package"> + <echo>Sending package to default emulator...</echo> + <exec executable="${adb}" failonerror="true"> + <arg value="install" /> + <arg value="${out-package}" /> + </exec> + </target> + +</project> diff --git a/tools/scripts/build.template b/tools/scripts/build.template new file mode 100644 index 000000000..0081c336d --- /dev/null +++ b/tools/scripts/build.template @@ -0,0 +1,293 @@ +<?xml version="1.0" ?> +<project name="ACTIVITY_NAME" default="debug"> + + <!-- The build.properties file can be created by you and is never touched + by activitycreator. If you want to manually set properties, this is + the best place to set them. --> + <property file="build.properties"/> + + <!-- The default.properties file is created and updated by activitycreator. + It will set any properties not already defined by build.properties. --> + <property file="default.properties"/> + + <!-- ************************************************************************************* --> + <!-- These settings were written by activitycreator. + Do not change them unless you really know what you are doing. --> + + <!-- Application Package Name --> + <property name="application-package" value="PACKAGE" /> + + <!-- The intermediates directory, Eclipse uses "bin" + for its own output, so we do the same. --> + <property name="outdir" value="bin" /> + + <!-- ************************************************************************************* --> + <!-- No user servicable parts below. --> + + <property name="android-tools" value="${sdk-folder}/tools" /> + <property name="android-framework" value="${android-tools}/lib/framework.aidl" /> + + <!-- Input directories --> + <property name="resource-dir" value="res" /> + <property name="asset-dir" value="assets" /> + <property name="srcdir" value="src" /> + <condition property="srcdir-ospath" + value="${basedir}\${srcdir}" + else="${basedir}/${srcdir}" > + <os family="windows"/> + </condition> + + <!-- folder for the 3rd party java libraries --> + <property name="external-libs" value="libs" /> + <condition property="external-libs-ospath" + value="${basedir}\${external-libs}" + else="${basedir}/${external-libs}" > + <os family="windows"/> + </condition> + + <!-- folder for the native libraries --> + <property name="native-libs" value="libs" /> + <condition property="native-libs-ospath" + value="${basedir}\${native-libs}" + else="${basedir}/${native-libs}" > + <os family="windows"/> + </condition> + + <!-- Output directories --> + <property name="outdir-classes" value="${outdir}/classes" /> + <condition property="outdir-classes-ospath" + value="${basedir}\${outdir-classes}" + else="${basedir}/${outdir-classes}" > + <os family="windows"/> + </condition> + + <!-- Create R.java in the source directory --> + <property name="outdir-r" value="src" /> + + <!-- Intermediate files --> + <property name="dex-file" value="classes.dex" /> + <property name="intermediate-dex" value="${outdir}/${dex-file}" /> + <condition property="intermediate-dex-ospath" + value="${basedir}\${intermediate-dex}" + else="${basedir}/${intermediate-dex}" > + <os family="windows"/> + </condition> + + <!-- The final package file to generate --> + <property name="resources-package" value="${outdir}/${ant.project.name}.ap_" /> + <condition property="resources-package-ospath" + value="${basedir}\${resources-package}" + else="${basedir}/${resources-package}" > + <os family="windows"/> + </condition> + + <property name="out-debug-package" value="${outdir}/${ant.project.name}-debug.apk" /> + <condition property="out-debug-package-ospath" + value="${basedir}\${out-debug-package}" + else="${basedir}/${out-debug-package}" > + <os family="windows"/> + </condition> + + <property name="out-unsigned-package" value="${outdir}/${ant.project.name}-unsigned.apk" /> + <condition property="out-unsigned-package-ospath" + value="${basedir}\${out-unsigned-package}" + else="${basedir}/${out-unsigned-package}" > + <os family="windows"/> + </condition> + + <!-- Tools --> + <condition property="aapt" value="${android-tools}/aapt.exe" else="${android-tools}/aapt" > + <os family="windows"/> + </condition> + <condition property="aidl" value="${android-tools}/aidl.exe" else="${android-tools}/aidl" > + <os family="windows"/> + </condition> + <condition property="adb" value="${android-tools}/adb.exe" else="${android-tools}/adb" > + <os family="windows"/> + </condition> + <condition property="dx" value="${android-tools}/dx.bat" else="${android-tools}/dx" > + <os family="windows"/> + </condition> + <condition property="apk-builder" value="${android-tools}/apkbuilder.bat" else="${android-tools}/apkbuilder" > + <os family="windows"/> + </condition> + + <property name="android-jar" value="${sdk-folder}/android.jar" /> + + <!-- Rules --> + + <!-- Create the output directories if they don't exist yet. --> + <target name="dirs"> + <echo>Creating output directories if needed...</echo> + <mkdir dir="${outdir}" /> + <mkdir dir="${outdir-classes}" /> + </target> + + <!-- Generate the R.java file for this project's resources. --> + <target name="resource-src" depends="dirs"> + <echo>Generating R.java / Manifest.java from the resources...</echo> + <exec executable="${aapt}" failonerror="true"> + <arg value="package" /> + <arg value="-m" /> + <arg value="-J" /> + <arg value="${outdir-r}" /> + <arg value="-M" /> + <arg value="AndroidManifest.xml" /> + <arg value="-S" /> + <arg value="${resource-dir}" /> + <arg value="-I" /> + <arg value="${android-jar}" /> + </exec> + </target> + + <!-- Generate java classes from .aidl files. --> + <target name="aidl" depends="dirs"> + <echo>Compiling aidl files into Java classes...</echo> + <apply executable="${aidl}" failonerror="true"> + <arg value="-p${android-framework}" /> + <arg value="-I${srcdir}" /> + <fileset dir="${srcdir}"> + <include name="**/*.aidl"/> + </fileset> + </apply> + </target> + + <!-- Compile this project's .java files into .class files. --> + <target name="compile" depends="dirs, resource-src, aidl"> + <javac encoding="ascii" target="1.5" debug="true" extdirs="" + srcdir="." + destdir="${outdir-classes}" + bootclasspath="${android-jar}"> + <classpath> + <fileset dir="${external-libs}" includes="*.jar"/> + </classpath> + </javac> + </target> + + <!-- Convert this project's .class files into .dex files. --> + <target name="dex" depends="compile"> + <echo>Converting compiled files and external libraries into ${outdir}/${dex-file}...</echo> + <apply executable="${dx}" failonerror="true" parallel="true"> + <arg value="--dex" /> + <arg value="--output=${intermediate-dex-ospath}" /> + <arg path="${outdir-classes-ospath}" /> + <fileset dir="${external-libs}" includes="*.jar"/> + </apply> + </target> + + <!-- Put the project's resources into the output package file. --> + <target name="package-res-and-assets"> + <echo>Packaging resources and assets...</echo> + <exec executable="${aapt}" failonerror="true"> + <arg value="package" /> + <arg value="-f" /> + <arg value="-M" /> + <arg value="AndroidManifest.xml" /> + <arg value="-S" /> + <arg value="${resource-dir}" /> + <arg value="-A" /> + <arg value="${asset-dir}" /> + <arg value="-I" /> + <arg value="${android-jar}" /> + <arg value="-F" /> + <arg value="${resources-package}" /> + </exec> + </target> + + <!-- Same as package-res-and-assets, but without "-A ${asset-dir}" --> + <target name="package-res-no-assets"> + <echo>Packaging resources...</echo> + <exec executable="${aapt}" failonerror="true"> + <arg value="package" /> + <arg value="-f" /> + <arg value="-M" /> + <arg value="AndroidManifest.xml" /> + <arg value="-S" /> + <arg value="${resource-dir}" /> + <!-- No assets directory --> + <arg value="-I" /> + <arg value="${android-jar}" /> + <arg value="-F" /> + <arg value="${resources-package}" /> + </exec> + </target> + + <!-- Invoke the proper target depending on whether or not + an assets directory is present. --> + <!-- TODO: find a nicer way to include the "-A ${asset-dir}" argument + only when the assets dir exists. --> + <target name="package-res"> + <available file="${asset-dir}" type="dir" + property="res-target" value="and-assets" /> + <property name="res-target" value="no-assets" /> + <antcall target="package-res-${res-target}" /> + </target> + + <!-- Package the application and sign it with a debug key. + This is the default target when building. It is used for debug. --> + <target name="debug" depends="dex, package-res"> + <echo>Packaging ${out-debug-package}, and signing it with a debug key...</echo> + <exec executable="${apk-builder}" failonerror="true"> + <arg value="${out-debug-package-ospath}" /> + <arg value="-z" /> + <arg value="${resources-package-ospath}" /> + <arg value="-f" /> + <arg value="${intermediate-dex-ospath}" /> + <arg value="-rf" /> + <arg value="${srcdir-ospath}" /> + <arg value="-rj" /> + <arg value="${external-libs-ospath}" /> + <arg value="-nf" /> + <arg value="${native-libs-ospath}" /> + </exec> + </target> + + <!-- Package the application without signing it. + This allows for the application to be signed later with an official publishing key. --> + <target name="release" depends="dex, package-res"> + <echo>Packaging ${out-unsigned-package} for release...</echo> + <exec executable="${apk-builder}" failonerror="true"> + <arg value="${out-unsigned-package-ospath}" /> + <arg value="-u" /> + <arg value="-z" /> + <arg value="${resources-package-ospath}" /> + <arg value="-f" /> + <arg value="${intermediate-dex-ospath}" /> + <arg value="-rf" /> + <arg value="${srcdir-ospath}" /> + <arg value="-rj" /> + <arg value="${external-libs-ospath}" /> + <arg value="-nf" /> + <arg value="${native-libs-ospath}" /> + </exec> + <echo>It will need to be signed with jarsigner before being published.</echo> + </target> + + <!-- Install the package on the default emulator --> + <target name="install" depends="debug"> + <echo>Installing ${out-debug-package} onto default emulator...</echo> + <exec executable="${adb}" failonerror="true"> + <arg value="install" /> + <arg value="${out-debug-package}" /> + </exec> + </target> + + <target name="reinstall" depends="debug"> + <echo>Installing ${out-debug-package} onto default emulator...</echo> + <exec executable="${adb}" failonerror="true"> + <arg value="install" /> + <arg value="-r" /> + <arg value="${out-debug-package}" /> + </exec> + </target> + + <!-- Uinstall the package from the default emulator --> + <target name="uninstall"> + <echo>Uninstalling ${application-package} from the default emulator...</echo> + <exec executable="${adb}" failonerror="true"> + <arg value="uninstall" /> + <arg value="${application-package}" /> + </exec> + </target> + +</project> diff --git a/tools/scripts/default.properties.template b/tools/scripts/default.properties.template new file mode 100644 index 000000000..5d708f20b --- /dev/null +++ b/tools/scripts/default.properties.template @@ -0,0 +1,5 @@ +# This file is automatically generated by activitycreator. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# Instead customize values in a "build.properties" file. + +sdk-folder=ANDROID_SDK_FOLDER diff --git a/tools/scripts/iml.template b/tools/scripts/iml.template new file mode 100644 index 000000000..c4fe3a332 --- /dev/null +++ b/tools/scripts/iml.template @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module version="4" relativePaths="true" type="JAVA_MODULE"> + <component name="ModuleRootManager" /> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> + </content> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="library" name="android" level="project" /> + <orderEntry type="inheritedJdk" /> + <orderEntryProperties /> + </component> +</module> diff --git a/tools/scripts/ipr.template b/tools/scripts/ipr.template new file mode 100644 index 000000000..cb3d65e2c --- /dev/null +++ b/tools/scripts/ipr.template @@ -0,0 +1,232 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4" relativePaths="false"> + <component name="AntConfiguration"> + <defaultAnt bundledAnt="true" /> + <buildFile url="file://$PROJECT_DIR$/build.xml"> + <additionalClassPath /> + <antReference projectDefault="true" /> + <customJdkName value="" /> + <maximumHeapSize value="128" /> + <properties /> + </buildFile> + </component> + <component name="BuildJarProjectSettings"> + <option name="BUILD_JARS_ON_MAKE" value="false" /> + </component> + <component name="CodeStyleProjectProfileManger"> + <option name="PROJECT_PROFILE" /> + <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" /> + </component> + <component name="CodeStyleSettingsManager"> + <option name="PER_PROJECT_SETTINGS" /> + <option name="USE_PER_PROJECT_SETTINGS" value="false" /> + </component> + <component name="CompilerConfiguration"> + <option name="DEFAULT_COMPILER" value="Javac" /> + <option name="DEPLOY_AFTER_MAKE" value="0" /> + <resourceExtensions> + <entry name=".+\.(properties|xml|html|dtd|tld)" /> + <entry name=".+\.(gif|png|jpeg|jpg)" /> + </resourceExtensions> + <wildcardResourcePatterns> + <entry name="?*.properties" /> + <entry name="?*.xml" /> + <entry name="?*.gif" /> + <entry name="?*.png" /> + <entry name="?*.jpeg" /> + <entry name="?*.jpg" /> + <entry name="?*.html" /> + <entry name="?*.dtd" /> + <entry name="?*.tld" /> + </wildcardResourcePatterns> + </component> + <component name="DataSourceManagerImpl" /> + <component name="DependenciesAnalyzeManager"> + <option name="myForwardDirection" value="false" /> + </component> + <component name="DependencyValidationManager" /> + <component name="EclipseCompilerSettings"> + <option name="DEBUGGING_INFO" value="true" /> + <option name="GENERATE_NO_WARNINGS" value="true" /> + <option name="DEPRECATION" value="false" /> + <option name="ADDITIONAL_OPTIONS_STRING" value="" /> + <option name="MAXIMUM_HEAP_SIZE" value="128" /> + </component> + <component name="EclipseEmbeddedCompilerSettings"> + <option name="DEBUGGING_INFO" value="true" /> + <option name="GENERATE_NO_WARNINGS" value="true" /> + <option name="DEPRECATION" value="false" /> + <option name="ADDITIONAL_OPTIONS_STRING" value="" /> + <option name="MAXIMUM_HEAP_SIZE" value="128" /> + </component> + <component name="EntryPointsManager"> + <entry_points /> + </component> + <component name="ExportToHTMLSettings"> + <option name="PRINT_LINE_NUMBERS" value="false" /> + <option name="OPEN_IN_BROWSER" value="false" /> + <option name="OUTPUT_DIRECTORY" /> + </component> + <component name="GUI Designer component loader factory" /> + <component name="IdProvider" IDEtalkID="F6EC4D80E2C03FEF19EDD201903A6DFE" /> + <component name="InspectionProjectProfileManager"> + <option name="PROJECT_PROFILE" value="Project Default" /> + <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" /> + <scopes /> + <profiles> + <profile version="1.0" is_locked="false"> + <option name="myName" value="Project Default" /> + <option name="myLocal" value="false" /> + <used_levels> + <error> + <option name="myName" value="ERROR" /> + <option name="myVal" value="400" /> + </error> + <warning> + <option name="myName" value="WARNING" /> + <option name="myVal" value="300" /> + </warning> + <information> + <option name="myName" value="INFO" /> + <option name="myVal" value="200" /> + </information> + <server> + <option name="myName" value="SERVER PROBLEM" /> + <option name="myVal" value="100" /> + </server> + </used_levels> + <inspection_tool class="ClassReferencesSubclass" level="WARNING" enabled="true" /> + <inspection_tool class="MissingOverrideAnnotation" level="WARNING" enabled="true" /> + <inspection_tool class="Finalize" level="WARNING" enabled="true" /> + <inspection_tool class="UnusedImport" level="WARNING" enabled="true" /> + <inspection_tool class="StaticInheritance" level="WARNING" enabled="true" /> + <inspection_tool class="RedundantMethodOverride" level="WARNING" enabled="true" /> + <inspection_tool class="AbstractMethodCallInConstructor" level="WARNING" enabled="true" /> + <inspection_tool class="RawUseOfParameterizedType" level="WARNING" enabled="true"> + <option name="ignoreObjectConstruction" value="true" /> + <option name="ignoreTypeCasts" value="false" /> + </inspection_tool> + <inspection_tool class="SystemGC" level="WARNING" enabled="true" /> + <inspection_tool class="ConstantNamingConvention" level="WARNING" enabled="true"> + <option name="m_regex" value="[A-Z_\d]*" /> + <option name="m_minLength" value="5" /> + <option name="m_maxLength" value="32" /> + </inspection_tool> + <inspection_tool class="EnumeratedConstantNamingConvention" level="WARNING" enabled="true"> + <option name="m_regex" value="[A-Z][A-Za-z\d]*" /> + <option name="m_minLength" value="5" /> + <option name="m_maxLength" value="32" /> + </inspection_tool> + <inspection_tool class="DivideByZero" level="WARNING" enabled="true" /> + <inspection_tool class="CloneCallsConstructors" level="WARNING" enabled="true" /> + <inspection_tool class="CloneDeclaresCloneNotSupported" level="WARNING" enabled="false" /> + <inspection_tool class="CloneInNonCloneableClass" level="WARNING" enabled="true" /> + <inspection_tool class="UtilityClassWithoutPrivateConstructor" level="WARNING" enabled="true"> + <option name="ignoreClassesWithOnlyMain" value="false" /> + </inspection_tool> + <inspection_tool class="UtilityClassWithPublicConstructor" level="WARNING" enabled="true" /> + <inspection_tool class="ConditionalExpressionWithIdenticalBranches" level="WARNING" enabled="true" /> + <inspection_tool class="CanBeFinal" level="WARNING" enabled="false"> + <option name="REPORT_CLASSES" value="false" /> + <option name="REPORT_METHODS" value="false" /> + <option name="REPORT_FIELDS" value="true" /> + </inspection_tool> + <inspection_tool class="ThisEscapedInConstructor" level="WARNING" enabled="true" /> + <inspection_tool class="NonThreadSafeLazyInitialization" level="WARNING" enabled="true" /> + <inspection_tool class="FieldMayBeStatic" level="WARNING" enabled="true" /> + <inspection_tool class="InnerClassMayBeStatic" level="WARNING" enabled="true" /> + <inspection_tool class="MethodMayBeStatic" level="WARNING" enabled="true"> + <option name="m_onlyPrivateOrFinal" value="false" /> + <option name="m_ignoreEmptyMethods" value="true" /> + </inspection_tool> + <inspection_tool class="ComponentRegistrationProblems" level="ERROR" enabled="false"> + <option name="CHECK_PLUGIN_XML" value="true" /> + <option name="CHECK_JAVA_CODE" value="true" /> + <option name="CHECK_ACTIONS" value="true" /> + </inspection_tool> + <inspection_tool class="ComponentNotRegistered" level="WARNING" enabled="false"> + <option name="CHECK_ACTIONS" value="true" /> + <option name="IGNORE_NON_PUBLIC" value="true" /> + </inspection_tool> + <inspection_tool class="BusyWait" level="WARNING" enabled="true" /> + <inspection_tool class="UnconditionalWait" level="WARNING" enabled="true" /> + <inspection_tool class="WaitNotInLoop" level="WARNING" enabled="true" /> + </profile> + </profiles> + </component> + <component name="JavacSettings"> + <option name="DEBUGGING_INFO" value="true" /> + <option name="GENERATE_NO_WARNINGS" value="false" /> + <option name="DEPRECATION" value="true" /> + <option name="ADDITIONAL_OPTIONS_STRING" value="" /> + <option name="MAXIMUM_HEAP_SIZE" value="128" /> + </component> + <component name="JavadocGenerationManager"> + <option name="OUTPUT_DIRECTORY" /> + <option name="OPTION_SCOPE" value="protected" /> + <option name="OPTION_HIERARCHY" value="true" /> + <option name="OPTION_NAVIGATOR" value="true" /> + <option name="OPTION_INDEX" value="true" /> + <option name="OPTION_SEPARATE_INDEX" value="true" /> + <option name="OPTION_DOCUMENT_TAG_USE" value="false" /> + <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" /> + <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" /> + <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" /> + <option name="OPTION_DEPRECATED_LIST" value="true" /> + <option name="OTHER_OPTIONS" value="" /> + <option name="HEAP_SIZE" /> + <option name="LOCALE" /> + <option name="OPEN_IN_BROWSER" value="true" /> + </component> + <component name="JikesSettings"> + <option name="JIKES_PATH" value="" /> + <option name="DEBUGGING_INFO" value="true" /> + <option name="DEPRECATION" value="true" /> + <option name="GENERATE_NO_WARNINGS" value="false" /> + <option name="IS_EMACS_ERRORS_MODE" value="true" /> + <option name="ADDITIONAL_OPTIONS_STRING" value="" /> + </component> + <component name="LogConsolePreferences"> + <option name="FILTER_ERRORS" value="false" /> + <option name="FILTER_WARNINGS" value="false" /> + <option name="FILTER_INFO" value="true" /> + <option name="CUSTOM_FILTER" /> + </component> + <component name="ProjectModuleManager"> + <modules> + <module fileurl="file://$PROJECT_DIR$/ACTIVITY_NAME.iml" filepath="$PROJECT_DIR$/ACTIVITY_NAME.iml" /> + </modules> + </component> + <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.5" project-jdk-type="JavaSDK"> + <output url="file://$PROJECT_DIR$/bin" /> + </component> + <component name="ProjectRunConfigurationManager" /> + <component name="RmicSettings"> + <option name="IS_EANABLED" value="false" /> + <option name="DEBUGGING_INFO" value="true" /> + <option name="GENERATE_NO_WARNINGS" value="false" /> + <option name="GENERATE_IIOP_STUBS" value="false" /> + <option name="ADDITIONAL_OPTIONS_STRING" value="" /> + </component> + <component name="StarteamVcsAdapter" /> + <component name="XSLT-Support.FileAssociationsManager" /> + <component name="com.intellij.jsf.UserDefinedFacesConfigs"> + <option name="USER_DEFINED_CONFIGS"> + <value> + <list size="0" /> + </value> + </option> + </component> + <component name="libraryTable"> + <library name="android"> + <CLASSES> + <root url="jar://ANDROID_SDK_FOLDER/android.jar!/" /> + </CLASSES> + <JAVADOC> + <root url="file://ANDROID_SDK_FOLDER/docs/reference" /> + </JAVADOC> + <SOURCES /> + </library> + </component> + <UsedPathMacros /> +</project> diff --git a/tools/scripts/iws.template b/tools/scripts/iws.template new file mode 100644 index 000000000..67d2053a1 --- /dev/null +++ b/tools/scripts/iws.template @@ -0,0 +1,470 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4" relativePaths="false"> + <component name="AntConfiguration"> + <defaultAnt bundledAnt="true" /> + <buildFile url="file://$PROJECT_DIR$/build.xml"> + <additionalClassPath /> + <antReference projectDefault="true" /> + <customJdkName value="" /> + <maximumHeapSize value="128" /> + <properties /> + </buildFile> + </component> + <component name="BookmarkManager" /> + <component name="ChangeBrowserSettings"> + <option name="MAIN_SPLITTER_PROPORTION" value="0.3" /> + <option name="MESSAGES_SPLITTER_PROPORTION" value="0.8" /> + <option name="USE_DATE_BEFORE_FILTER" value="false" /> + <option name="USE_DATE_AFTER_FILTER" value="false" /> + <option name="USE_CHANGE_BEFORE_FILTER" value="false" /> + <option name="USE_CHANGE_AFTER_FILTER" value="false" /> + <option name="DATE_BEFORE" value="" /> + <option name="DATE_AFTER" value="" /> + <option name="CHANGE_BEFORE" value="" /> + <option name="CHANGE_AFTER" value="" /> + <option name="USE_USER_FILTER" value="false" /> + <option name="USER" value="" /> + </component> + <component name="ChangeListManager"> + <list default="true" name="Default" comment="" /> + </component> + <component name="ChangeListSynchronizer" /> + <component name="ChangesViewManager" flattened_view="true" /> + <component name="CheckinPanelState" /> + <component name="Commander"> + <leftPanel /> + <rightPanel /> + <splitter proportion="0.5" /> + </component> + <component name="CompilerWorkspaceConfiguration"> + <option name="COMPILE_IN_BACKGROUND" value="false" /> + <option name="AUTO_SHOW_ERRORS_IN_EDITOR" value="true" /> + <option name="CLOSE_MESSAGE_VIEW_IF_SUCCESS" value="true" /> + <option name="COMPILE_DEPENDENT_FILES" value="false" /> + <option name="CLEAR_OUTPUT_DIRECTORY" value="false" /> + <option name="ASSERT_NOT_NULL" value="true" /> + </component> + <component name="CoverageDataManager" /> + <component name="Cvs2Configuration"> + <option name="PRUNE_EMPTY_DIRECTORIES" value="true" /> + <option name="MERGING_MODE" value="0" /> + <option name="MERGE_WITH_BRANCH1_NAME" value="HEAD" /> + <option name="MERGE_WITH_BRANCH2_NAME" value="HEAD" /> + <option name="RESET_STICKY" value="false" /> + <option name="CREATE_NEW_DIRECTORIES" value="true" /> + <option name="DEFAULT_TEXT_FILE_SUBSTITUTION" value="kv" /> + <option name="PROCESS_UNKNOWN_FILES" value="false" /> + <option name="PROCESS_DELETED_FILES" value="false" /> + <option name="PROCESS_IGNORED_FILES" value="false" /> + <option name="RESERVED_EDIT" value="false" /> + <option name="CHECKOUT_DATE_OR_REVISION_SETTINGS"> + <value> + <option name="BRANCH" value="" /> + <option name="DATE" value="" /> + <option name="USE_BRANCH" value="false" /> + <option name="USE_DATE" value="false" /> + </value> + </option> + <option name="UPDATE_DATE_OR_REVISION_SETTINGS"> + <value> + <option name="BRANCH" value="" /> + <option name="DATE" value="" /> + <option name="USE_BRANCH" value="false" /> + <option name="USE_DATE" value="false" /> + </value> + </option> + <option name="SHOW_CHANGES_REVISION_SETTINGS"> + <value> + <option name="BRANCH" value="" /> + <option name="DATE" value="" /> + <option name="USE_BRANCH" value="false" /> + <option name="USE_DATE" value="false" /> + </value> + </option> + <option name="SHOW_OUTPUT" value="false" /> + <option name="ADD_WATCH_INDEX" value="0" /> + <option name="REMOVE_WATCH_INDEX" value="0" /> + <option name="UPDATE_KEYWORD_SUBSTITUTION" /> + <option name="MAKE_NEW_FILES_READONLY" value="false" /> + <option name="SHOW_CORRUPTED_PROJECT_FILES" value="0" /> + <option name="TAG_AFTER_PROJECT_COMMIT" value="false" /> + <option name="OVERRIDE_EXISTING_TAG_FOR_PROJECT" value="true" /> + <option name="TAG_AFTER_PROJECT_COMMIT_NAME" value="" /> + <option name="CLEAN_COPY" value="false" /> + </component> + <component name="DaemonCodeAnalyzer"> + <disable_hints /> + </component> + <component name="DebuggerManager"> + <breakpoint_any> + <breakpoint> + <option name="NOTIFY_CAUGHT" value="true" /> + <option name="NOTIFY_UNCAUGHT" value="true" /> + <option name="ENABLED" value="false" /> + <option name="SUSPEND_POLICY" value="SuspendAll" /> + <option name="LOG_ENABLED" value="false" /> + <option name="LOG_EXPRESSION_ENABLED" value="false" /> + <option name="COUNT_FILTER_ENABLED" value="false" /> + <option name="COUNT_FILTER" value="0" /> + <option name="CONDITION_ENABLED" value="false" /> + <option name="CLASS_FILTERS_ENABLED" value="false" /> + <option name="INSTANCE_FILTERS_ENABLED" value="false" /> + <option name="CONDITION" value="" /> + <option name="LOG_MESSAGE" value="" /> + </breakpoint> + <breakpoint> + <option name="NOTIFY_CAUGHT" value="true" /> + <option name="NOTIFY_UNCAUGHT" value="true" /> + <option name="ENABLED" value="false" /> + <option name="SUSPEND_POLICY" value="SuspendAll" /> + <option name="LOG_ENABLED" value="false" /> + <option name="LOG_EXPRESSION_ENABLED" value="false" /> + <option name="COUNT_FILTER_ENABLED" value="false" /> + <option name="COUNT_FILTER" value="0" /> + <option name="CONDITION_ENABLED" value="false" /> + <option name="CLASS_FILTERS_ENABLED" value="false" /> + <option name="INSTANCE_FILTERS_ENABLED" value="false" /> + <option name="CONDITION" value="" /> + <option name="LOG_MESSAGE" value="" /> + </breakpoint> + </breakpoint_any> + <breakpoint_rules /> + <ui_properties /> + </component> + <component name="ErrorTreeViewConfiguration"> + <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" /> + <option name="HIDE_WARNINGS" value="false" /> + </component> + <component name="FavoritesManager"> + <favorites_list name="LunarLander" /> + </component> + <component name="FavoritesProjectViewPane" /> + <component name="FileEditorManager"> + <leaf> + <file leaf-file-name="ACTIVITY_NAME.java" pinned="false" current="true" current-in-tab="true"> + <entry file="file://$PROJECT_DIR$/src/PACKAGE_PATH/ACTIVITY_NAME.java"> + <provider selected="true" editor-type-id="text-editor"> + <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.08211144"> + <folding /> + </state> + </provider> + </entry> + </file> + </leaf> + </component> + <component name="FindManager"> + <FindUsagesManager> + <setting name="OPEN_NEW_TAB" value="false" /> + </FindUsagesManager> + </component> + <component name="HierarchyBrowserManager"> + <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" /> + <option name="SORT_ALPHABETICALLY" value="false" /> + <option name="HIDE_CLASSES_WHERE_METHOD_NOT_IMPLEMENTED" value="false" /> + </component> + <component name="InspectionManager"> + <option name="AUTOSCROLL_TO_SOURCE" value="false" /> + <option name="SPLITTER_PROPORTION" value="0.5" /> + <option name="GROUP_BY_SEVERITY" value="false" /> + <option name="FILTER_RESOLVED_ITEMS" value="true" /> + <option name="ANALYZE_TEST_SOURCES" value="true" /> + <option name="SHOW_DIFF_WITH_PREVIOUS_RUN" value="false" /> + <option name="SCOPE_TYPE" value="1" /> + <option name="CUSTOM_SCOPE_NAME" value="" /> + <option name="SHOW_ONLY_DIFF" value="false" /> + <option name="myCurrentProfileName" value="Default" /> + </component> + <component name="J2EEProjectPane" /> + <component name="JspContextManager" /> + <component name="ModuleEditorState"> + <option name="LAST_EDITED_MODULE_NAME" /> + <option name="LAST_EDITED_TAB_NAME" /> + </component> + <component name="NamedScopeManager" /> + <component name="PackagesPane"> + <subPane> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="ACTIVITY_NAME.ipr" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="ACTIVITY_NAME" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" /> + </PATH_ELEMENT> + </PATH> + </subPane> + </component> + <component name="PerforceChangeBrowserSettings"> + <option name="USE_CLIENT_FILTER" value="true" /> + <option name="CLIENT" value="" /> + </component> + <component name="PerforceDirect.Settings"> + <option name="useP4CONFIG" value="true" /> + <option name="port" value="<perforce_server>:1666" /> + <option name="client" value="" /> + <option name="user" value="" /> + <option name="passwd" value="" /> + <option name="showCmds" value="false" /> + <option name="useNativeApi" value="false" /> + <option name="pathToExec" value="p4" /> + <option name="useCustomPathToExec" value="false" /> + <option name="SYNC_FORCE" value="false" /> + <option name="SYNC_RUN_RESOLVE" value="true" /> + <option name="REVERT_UNCHANGED_FILES" value="true" /> + <option name="CHARSET" value="none" /> + <option name="SHOW_BRANCHES_HISTORY" value="true" /> + <option name="ENABLED" value="true" /> + <option name="USE_LOGIN" value="false" /> + <option name="LOGIN_SILENTLY" value="false" /> + <option name="INTEGRATE_RUN_RESOLVE" value="true" /> + <option name="INTEGRATE_REVERT_UNCHANGED" value="true" /> + <option name="SERVER_TIMEOUT" value="20000" /> + </component> + <component name="ProjectLevelVcsManager"> + <OptionsSetting value="true" id="Add" /> + <OptionsSetting value="true" id="Remove" /> + <OptionsSetting value="true" id="Checkin" /> + <OptionsSetting value="true" id="Checkout" /> + <OptionsSetting value="true" id="Update" /> + <OptionsSetting value="true" id="Status" /> + <OptionsSetting value="true" id="Edit" /> + <ConfirmationsSetting value="0" id="Add" /> + <ConfirmationsSetting value="0" id="Remove" /> + </component> + <component name="ProjectPane"> + <subPane> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="ACTIVITY_NAME.ipr" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="ACTIVITY_NAME" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + </PATH> + </subPane> + </component> + <component name="ProjectReloadState"> + <option name="STATE" value="0" /> + </component> + <component name="ProjectView"> + <navigator currentView="ProjectPane" proportions="0.1" version="1" splitterProportion="0.5"> + <flattenPackages /> + <showMembers /> + <showModules /> + <showLibraryContents /> + <hideEmptyPackages /> + <abbreviatePackageNames /> + <showStructure PackagesPane="false" ProjectPane="false" /> + <autoscrollToSource /> + <autoscrollFromSource /> + <sortByType /> + </navigator> + </component> + <component name="PropertiesComponent"> + <property name="MemberChooser.copyJavadoc" value="false" /> + <property name="GoToClass.includeLibraries" value="false" /> + <property name="MemberChooser.showClasses" value="true" /> + <property name="MemberChooser.sorted" value="false" /> + <property name="GoToFile.includeJavaFiles" value="false" /> + <property name="GoToClass.toSaveIncludeLibraries" value="false" /> + </component> + <component name="ReadonlyStatusHandler"> + <option name="SHOW_DIALOG" value="true" /> + </component> + <component name="RecentsManager" /> + <component name="RestoreUpdateTree" /> + <component name="RunManager"> + <configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false"> + <option name="MAIN_CLASS_NAME" /> + <option name="VM_PARAMETERS" /> + <option name="PROGRAM_PARAMETERS" /> + <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="ENABLE_SWING_INSPECTOR" value="false" /> + <module name="" /> + </configuration> + <configuration default="true" type="Applet" factoryName="Applet"> + <module name="" /> + <option name="MAIN_CLASS_NAME" /> + <option name="HTML_FILE_NAME" /> + <option name="HTML_USED" value="false" /> + <option name="WIDTH" value="400" /> + <option name="HEIGHT" value="300" /> + <option name="POLICY_FILE" value="/Developer/Applications/IntelliJ IDEA 6.0.4.app/bin/appletviewer.policy" /> + <option name="VM_PARAMETERS" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + </configuration> + <configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false"> + <module name="" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="PACKAGE_NAME" /> + <option name="MAIN_CLASS_NAME" /> + <option name="METHOD_NAME" /> + <option name="TEST_OBJECT" value="class" /> + <option name="VM_PARAMETERS" /> + <option name="PARAMETERS" /> + <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> + <option name="ADDITIONAL_CLASS_PATH" /> + <option name="TEST_SEARCH_SCOPE"> + <value defaultName="wholeProject" /> + </option> + </configuration> + <configuration default="true" type="Remote" factoryName="Remote"> + <option name="USE_SOCKET_TRANSPORT" value="true" /> + <option name="SERVER_MODE" value="false" /> + <option name="SHMEM_ADDRESS" value="javadebug" /> + <option name="HOST" value="localhost" /> + <option name="PORT" value="5005" /> + </configuration> + </component> + <component name="ScopeViewComponent" /> + <component name="SelectInManager" /> + <component name="StarteamConfiguration"> + <option name="SERVER" value="" /> + <option name="PORT" value="49201" /> + <option name="USER" value="" /> + <option name="PASSWORD" value="" /> + <option name="PROJECT" value="" /> + <option name="VIEW" value="" /> + <option name="ALTERNATIVE_WORKING_PATH" value="" /> + <option name="LOCK_ON_CHECKOUT" value="false" /> + <option name="UNLOCK_ON_CHECKIN" value="false" /> + </component> + <component name="StructuralSearchPlugin" /> + <component name="StructureViewFactory"> + <option name="AUTOSCROLL_MODE" value="true" /> + <option name="AUTOSCROLL_FROM_SOURCE" value="false" /> + <option name="ACTIVE_ACTIONS" value="" /> + </component> + <component name="Struts Assistant"> + <option name="showInputs" value="true" /> + <option name="resources"> + <value> + <option name="strutsPath" /> + <option name="strutsHelp" /> + </value> + </option> + <option name="selectedTaglibs" /> + <option name="selectedTaglibs" /> + <option name="myStrutsValidationEnabled" value="true" /> + <option name="myTilesValidationEnabled" value="true" /> + <option name="myValidatorValidationEnabled" value="true" /> + <option name="myReportErrorsAsWarnings" value="true" /> + </component> + <component name="SvnChangesBrowserSettings"> + <option name="USE_AUTHOR_FIELD" value="true" /> + <option name="AUTHOR" value="" /> + <option name="LOCATION" value="" /> + <option name="USE_PROJECT_SETTINGS" value="true" /> + <option name="USE_ALTERNATE_LOCATION" value="false" /> + </component> + <component name="SvnConfiguration"> + <option name="USER" value="" /> + <option name="PASSWORD" value="" /> + <option name="PROCESS_UNRESOLVED" value="false" /> + <option name="LAST_MERGED_REVISION" /> + <option name="UPDATE_RUN_STATUS" value="false" /> + <option name="UPDATE_RECURSIVELY" value="true" /> + <option name="MERGE_DRY_RUN" value="false" /> + <upgradeMode>auto</upgradeMode> + </component> + <component name="TodoView" selected-index="0"> + <todo-panel id="selected-file"> + <are-packages-shown value="false" /> + <are-modules-shown value="false" /> + <flatten-packages value="false" /> + <is-autoscroll-to-source value="true" /> + </todo-panel> + <todo-panel id="all"> + <are-packages-shown value="true" /> + <are-modules-shown value="false" /> + <flatten-packages value="false" /> + <is-autoscroll-to-source value="true" /> + </todo-panel> + </component> + <component name="ToolWindowManager"> + <frame x="0" y="22" width="1440" height="834" extended-state="0" /> + <editor active="false" /> + <layout> + <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" /> + <window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" /> + <window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" /> + <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" /> + <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24946082" order="0" /> + <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="1" /> + <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" /> + <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" /> + <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="6" /> + <window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" /> + <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" /> + <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" /> + <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" /> + <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" /> + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="2" /> + <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" /> + <window_info id="File View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" /> + <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="4" /> + <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="0" /> + <window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" /> + <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" /> + <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" /> + <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="0" /> + <window_info id="EJB" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="3" /> + <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="5" /> + </layout> + </component> + <component name="VCS.FileViewConfiguration"> + <option name="SELECTED_STATUSES" value="DEFAULT" /> + <option name="SELECTED_COLUMNS" value="DEFAULT" /> + <option name="SHOW_FILTERS" value="true" /> + <option name="CUSTOMIZE_VIEW" value="true" /> + <option name="SHOW_FILE_HISTORY_AS_TREE" value="true" /> + </component> + <component name="VcsManagerConfiguration"> + <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" /> + <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" /> + <option name="PERFORM_UPDATE_IN_BACKGROUND" value="false" /> + <option name="PERFORM_COMMIT_IN_BACKGROUND" value="false" /> + <option name="PUT_FOCUS_INTO_COMMENT" value="false" /> + <option name="FORCE_NON_EMPTY_COMMENT" value="false" /> + <option name="LAST_COMMIT_MESSAGE" /> + <option name="SAVE_LAST_COMMIT_MESSAGE" value="true" /> + <option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" /> + <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" /> + <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" /> + <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" /> + <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" /> + <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" /> + <option name="ERROR_OCCURED" value="false" /> + <option name="ACTIVE_VCS_NAME" value="CVS" /> + <option name="UPDATE_GROUP_BY_PACKAGES" value="false" /> + <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" /> + <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" /> + </component> + <component name="XPathView.XPathProjectComponent"> + <history /> + <find-history /> + </component> + <component name="XSLT-Support.FileAssociationsSettings" /> + <component name="antWorkspaceConfiguration"> + <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" /> + <option name="FILTER_TARGETS" value="false" /> + </component> + <component name="com.intellij.ide.util.scopeChooser.ScopeChooserConfigurable" proportions="" version="1"> + <option name="myLastEditedConfigurable" /> + </component> + <component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.1" version="1"> + <option name="myPlainMode" value="false" /> + <option name="myLastEditedConfigurable" value="android" /> + </component> + <component name="com.intellij.profile.ui.ErrorOptionsConfigurable" proportions="" version="1"> + <option name="myLastEditedConfigurable" /> + </component> + <component name="editorHistoryManager" /> +</project>
\ No newline at end of file diff --git a/tools/scripts/java_file.template b/tools/scripts/java_file.template new file mode 100644 index 000000000..aeb541f7b --- /dev/null +++ b/tools/scripts/java_file.template @@ -0,0 +1,15 @@ +package PACKAGE; + +import android.app.Activity; +import android.os.Bundle; + +public class ACTIVITY_NAME extends Activity +{ + /** Called when the activity is first created. */ + @Override + public void onCreate(Bundle savedInstanceState) + { + super.onCreate(savedInstanceState); + setContentView(R.layout.main); + } +} diff --git a/tools/scripts/layout.template b/tools/scripts/layout.template new file mode 100644 index 000000000..864e99748 --- /dev/null +++ b/tools/scripts/layout.template @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + > +<TextView + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="Hello World, ACTIVITY_NAME" + /> +</LinearLayout> + diff --git a/tools/scripts/plugin.prop b/tools/scripts/plugin.prop new file mode 100644 index 000000000..15593ef68 --- /dev/null +++ b/tools/scripts/plugin.prop @@ -0,0 +1,4 @@ +# begin plugin.prop +plugin.version=0.8.0 +plugin.platform=android +# end plugin.prop
\ No newline at end of file diff --git a/tools/scripts/sdk_clean.sh b/tools/scripts/sdk_clean.sh new file mode 100755 index 000000000..467d5605a --- /dev/null +++ b/tools/scripts/sdk_clean.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# +# This script processes a set of files given as arguments as sample code to be released +# in the SDK. +# +# Note that these files are modified in-place. +# + +DIR=$1 + +# +# Remove BEGIN_INCLUDE and END_INCLUDE lines used by the javadoc. +# +# This does it by replacing these lines with blank lines so line numbers aren't +# changed in the process, making it easier to match 3rd party complaints/questions +# with the source tree. +# +# sed on Mac OS takes -i SUFFIX and sed on Linux takes -iSUFFIX +# +if [ $HOST_OS = darwin ] ; then +find $DIR -name "*.java" -o -name "*.xml" | xargs -n 1 \ + sed \ + -e "s/.*BEGIN_INCLUDE(.*//" \ + -e "s/.*END_INCLUDE(.*//" \ + -i "" +else +find $DIR -name "*.java" -o -name "*.xml" | xargs -n 1 \ + sed \ + -e "s/.*BEGIN_INCLUDE(.*//" \ + -e "s/.*END_INCLUDE(.*//" \ + -i +fi + +# +# Fix up the line endings of all text files +# +if [ $HOST_OS = windows ] ; then + ENDING_TYPE=dos +else + ENDING_TYPE=unix +fi +find $DIR -name "*.aidl" -o -name "*.css" -o -name "*.html" -o -name "*.java" \ + -o -name "*.js" -o -name "*.prop" -o -name "*.py" \ + -o -name "*.template" -o -name "*.txt" -o -name "*.windows" \ + -o -name "*.xml" \ + | xargs $HOST_OUT_EXECUTABLES/line_endings $ENDING_TYPE + + diff --git a/tools/scripts/strings.template b/tools/scripts/strings.template new file mode 100644 index 000000000..acc28e29d --- /dev/null +++ b/tools/scripts/strings.template @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="app_name">ACTIVITY_NAME</string> +</resources> |
