summaryrefslogtreecommitdiffstats
path: root/base/android/java
diff options
context:
space:
mode:
authornavabi@google.com <navabi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-29 06:06:07 +0000
committernavabi@google.com <navabi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-29 06:06:07 +0000
commite511f1c2d0b9accaee311da5a3f295a8bce54376 (patch)
tree5602a86905318f2b02a503d0c1eec1c61a87eec0 /base/android/java
parentfa6e2d555df8ffa9b192038cc87380abdc8bd33e (diff)
downloadchromium_src-e511f1c2d0b9accaee311da5a3f295a8bce54376.zip
chromium_src-e511f1c2d0b9accaee311da5a3f295a8bce54376.tar.gz
chromium_src-e511f1c2d0b9accaee311da5a3f295a8bce54376.tar.bz2
Add first java source code and gyp/ant changes to build java code.
Introduce the first java source for chrome on android to base/android/java. Also add new target to build the java source in the directory. Currently there is a dummy java file called DeleteStaging.java that should be replaced when real base java source code is upstreamed. This will be the java files from this patch: https://chromiumcodereview.appspot.com/9443018/. The DeleteStaging.java file should be removed once real java code is checked in. BUG= TEST= Review URL: http://codereview.chromium.org/9514018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124134 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/android/java')
-rw-r--r--base/android/java/base.xml38
-rw-r--r--base/android/java/java.gyp30
-rw-r--r--base/android/java/org/chromium/base/DeleteStaging.java16
3 files changed, 84 insertions, 0 deletions
diff --git a/base/android/java/base.xml b/base/android/java/base.xml
new file mode 100644
index 0000000..a688eab
--- /dev/null
+++ b/base/android/java/base.xml
@@ -0,0 +1,38 @@
+<project name="Base" default="dist" basedir=".">
+ <description>
+ building base java source code with ant
+ </description>
+ <!-- set global properties for this build -->
+ <property name="src" location="."/>
+ <property name="build" location="build"/>
+ <property name="dist" location="dist"/>
+
+ <target name="init">
+ <!-- Create the time stamp -->
+ <tstamp/>
+ <!-- Create the build directory structure used by compile -->
+ <mkdir dir="${build}"/>
+ </target>
+
+ <target name="compile" depends="init"
+ description="compile the source " >
+ <!-- Compile the java code from ${src} into ${build} -->
+ <javac srcdir="${src}" destdir="${build}"/>
+ </target>
+
+ <target name="dist" depends="compile"
+ description="generate the distribution" >
+ <!-- Create the distribution directory -->
+ <mkdir dir="${dist}/lib"/>
+
+ <!-- Put everything in ${build} into the chromium_base.jar file -->
+ <jar jarfile="${dist}/lib/chromium_base.jar" basedir="${build}"/>
+ </target>
+
+ <target name="clean"
+ description="clean up" >
+ <!-- Delete the ${build} and ${dist} directory trees -->
+ <delete dir="${build}"/>
+ <delete dir="${dist}"/>
+ </target>
+</project>
diff --git a/base/android/java/java.gyp b/base/android/java/java.gyp
new file mode 100644
index 0000000..7358743
--- /dev/null
+++ b/base/android/java/java.gyp
@@ -0,0 +1,30 @@
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'base_java',
+ 'message': 'building base java sources',
+ 'type': 'none',
+ 'actions': [
+ {
+ 'action_name': 'base_java',
+ 'inputs': [
+ '<(DEPTH)/base/android/java/base.xml',
+ '<!@(find . -name "*.java")'
+ ],
+ 'outputs': [
+ '<(DEPTH)/base/android/java/dist/lib/chromium_base.jar',
+ ],
+ 'action': [
+ 'ant',
+ '-buildfile',
+ '<(DEPTH)/base/android/java/base.xml',
+ ]
+ },
+ ],
+ },
+ ],
+}
diff --git a/base/android/java/org/chromium/base/DeleteStaging.java b/base/android/java/org/chromium/base/DeleteStaging.java
new file mode 100644
index 0000000..5f0718c
--- /dev/null
+++ b/base/android/java/org/chromium/base/DeleteStaging.java
@@ -0,0 +1,16 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.base;
+
+// This class serves as arbitrary Java code that can be compiled as part of
+// base_java, which builds base Java code that will be upstreamed. Please
+// delete this file and replace with actual base Java source files (e.g.
+// CallByNative.java and PathUtils.java).
+
+public class DeleteStaging {
+ public static void main(String[] args) {
+ return;
+ }
+}