summaryrefslogtreecommitdiffstats
path: root/media/base/android/java/media.xml
blob: 8516e3e59f313775377d762e21240e2970d6517a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!-- 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.
-->
<project name="Media" default="dist" basedir=".">
  <description>
    building media java source code with ant
  </description>
  <!-- set global properties for this build -->
  <property environment="env"/>
  <property name="sdk.dir" location="${env.ANDROID_SDK_ROOT}"/>
  <property name="sdk.version" value="${env.ANDROID_SDK_VERSION}"/>
  <property name="src" location="."/>
  <property name="build" location="build"/>
  <property name="dist"  location="dist"/>
  <property name="out.dir" location="${PRODUCT_DIR}/lib.java"/>
  <property name="dest.dir" location="${PRODUCT_DIR}/java/media"/>

  <condition property="location.base"
             value="${sdk.dir}"
             else="${sdk.dir}/platforms/android-${sdk.version}">
    <isset property="env.ANDROID_BUILD_TOP"/>
  </condition>

  <target name="init">
    <!-- Create the time stamp -->
    <tstamp/>
    <!-- Create the build directory structure used by compile -->
    <mkdir dir="${out.dir}"/>
    <mkdir dir="${dest.dir}"/>
  </target>

  <target name="compile" depends="init"
          description="compile the source " >
    <!-- Compile the java code from ${src} into ${dest.dir} -->
    <javac srcdir="${src}" destdir="${dest.dir}">
      <classpath>
        <pathelement path="${location.base}/android.jar" />
        <pathelement path="${out.dir}/chromium_base.jar" />
      </classpath>
    </javac>
  </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_media.jar file -->
    <jar jarfile="${out.dir}/chromium_media.jar" basedir="${dest.dir}"/>
  </target>

  <target name="clean"
          description="clean up" >
    <!-- Delete the appropriate directory trees -->
    <delete dir="${dest.dir}"/>
    <delete dir="${dist}"/>
  </target>
</project>