Added the old ant Android build project structure
authorSam Lantinga <slouken@libsdl.org>
Sat, 28 Oct 2017 12:11:25 -0700
changeset 11659b2fd0f264cd3
parent 11658 fbfdee28682d
child 11660 2119394cbc86
Added the old ant Android build project structure
android-project-ant/AndroidManifest.xml
android-project-ant/ant.properties
android-project-ant/build.properties
android-project-ant/build.xml
android-project-ant/default.properties
android-project-ant/jni/Android.mk
android-project-ant/jni/Application.mk
android-project-ant/jni/src/Android.mk
android-project-ant/jni/src/Android_static.mk
android-project-ant/proguard-project.txt
android-project-ant/project.properties
android-project-ant/res/drawable-hdpi/ic_launcher.png
android-project-ant/res/drawable-mdpi/ic_launcher.png
android-project-ant/res/drawable-xhdpi/ic_launcher.png
android-project-ant/res/drawable-xxhdpi/ic_launcher.png
android-project-ant/res/layout/main.xml
android-project-ant/res/values/strings.xml
android-project-ant/src
docs/README-android.md
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/android-project-ant/AndroidManifest.xml	Sat Oct 28 12:11:25 2017 -0700
     1.3 @@ -0,0 +1,1 @@
     1.4 +../android-project/app/src/main/AndroidManifest.xml
     1.5 \ No newline at end of file
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/android-project-ant/ant.properties	Sat Oct 28 12:11:25 2017 -0700
     2.3 @@ -0,0 +1,17 @@
     2.4 +# This file is used to override default values used by the Ant build system.
     2.5 +#
     2.6 +# This file must be checked into Version Control Systems, as it is
     2.7 +# integral to the build system of your project.
     2.8 +
     2.9 +# This file is only used by the Ant script.
    2.10 +
    2.11 +# You can use this to override default values such as
    2.12 +#  'source.dir' for the location of your java source folder and
    2.13 +#  'out.dir' for the location of your output folder.
    2.14 +
    2.15 +# You can also use it define how the release builds are signed by declaring
    2.16 +# the following properties:
    2.17 +#  'key.store' for the location of your keystore and
    2.18 +#  'key.alias' for the name of the key to use.
    2.19 +# The password will be asked during the build when you use the 'release' target.
    2.20 +
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/android-project-ant/build.properties	Sat Oct 28 12:11:25 2017 -0700
     3.3 @@ -0,0 +1,17 @@
     3.4 +# This file is used to override default values used by the Ant build system.
     3.5 +# 
     3.6 +# This file must be checked in Version Control Systems, as it is
     3.7 +# integral to the build system of your project.
     3.8 +
     3.9 +# This file is only used by the Ant script.
    3.10 +
    3.11 +# You can use this to override default values such as
    3.12 +#  'source.dir' for the location of your java source folder and
    3.13 +#  'out.dir' for the location of your output folder.
    3.14 +
    3.15 +# You can also use it define how the release builds are signed by declaring
    3.16 +# the following properties:
    3.17 +#  'key.store' for the location of your keystore and
    3.18 +#  'key.alias' for the name of the key to use.
    3.19 +# The password will be asked during the build when you use the 'release' target.
    3.20 +
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/android-project-ant/build.xml	Sat Oct 28 12:11:25 2017 -0700
     4.3 @@ -0,0 +1,93 @@
     4.4 +<?xml version="1.0" encoding="UTF-8"?>
     4.5 +<!-- This should be changed to the name of your project -->
     4.6 +<project name="SDLActivity" default="help">
     4.7 +
     4.8 +    <!-- The local.properties file is created and updated by the 'android' tool.
     4.9 +         It contains the path to the SDK. It should *NOT* be checked into
    4.10 +         Version Control Systems. -->
    4.11 +    <property file="local.properties" />
    4.12 +
    4.13 +    <!-- The ant.properties file can be created by you. It is only edited by the
    4.14 +         'android' tool to add properties to it.
    4.15 +         This is the place to change some Ant specific build properties.
    4.16 +         Here are some properties you may want to change/update:
    4.17 +
    4.18 +         source.dir
    4.19 +             The name of the source directory. Default is 'src'.
    4.20 +         out.dir
    4.21 +             The name of the output directory. Default is 'bin'.
    4.22 +
    4.23 +         For other overridable properties, look at the beginning of the rules
    4.24 +         files in the SDK, at tools/ant/build.xml
    4.25 +
    4.26 +         Properties related to the SDK location or the project target should
    4.27 +         be updated using the 'android' tool with the 'update' action.
    4.28 +
    4.29 +         This file is an integral part of the build system for your
    4.30 +         application and should be checked into Version Control Systems.
    4.31 +
    4.32 +         -->
    4.33 +    <property file="ant.properties" />
    4.34 +
    4.35 +    <!-- if sdk.dir was not set from one of the property file, then
    4.36 +         get it from the ANDROID_HOME env var.
    4.37 +         This must be done before we load project.properties since
    4.38 +         the proguard config can use sdk.dir -->
    4.39 +    <property environment="env" />
    4.40 +    <condition property="sdk.dir" value="${env.ANDROID_HOME}">
    4.41 +        <isset property="env.ANDROID_HOME" />
    4.42 +    </condition>
    4.43 +
    4.44 +    <!-- The project.properties file is created and updated by the 'android'
    4.45 +         tool, as well as ADT.
    4.46 +
    4.47 +         This contains project specific properties such as project target, and library
    4.48 +         dependencies. Lower level build properties are stored in ant.properties
    4.49 +         (or in .classpath for Eclipse projects).
    4.50 +
    4.51 +         This file is an integral part of the build system for your
    4.52 +         application and should be checked into Version Control Systems. -->
    4.53 +    <loadproperties srcFile="project.properties" />
    4.54 +
    4.55 +    <!-- quick check on sdk.dir -->
    4.56 +    <fail
    4.57 +            message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
    4.58 +            unless="sdk.dir"
    4.59 +    />
    4.60 +
    4.61 +    <!--
    4.62 +        Import per project custom build rules if present at the root of the project.
    4.63 +        This is the place to put custom intermediary targets such as:
    4.64 +            -pre-build
    4.65 +            -pre-compile
    4.66 +            -post-compile (This is typically used for code obfuscation.
    4.67 +                           Compiled code location: ${out.classes.absolute.dir}
    4.68 +                           If this is not done in place, override ${out.dex.input.absolute.dir})
    4.69 +            -post-package
    4.70 +            -post-build
    4.71 +            -pre-clean
    4.72 +    -->
    4.73 +    <import file="custom_rules.xml" optional="true" />
    4.74 +
    4.75 +    <!-- Import the actual build file.
    4.76 +
    4.77 +         To customize existing targets, there are two options:
    4.78 +         - Customize only one target:
    4.79 +             - copy/paste the target into this file, *before* the
    4.80 +               <import> task.
    4.81 +             - customize it to your needs.
    4.82 +         - Customize the whole content of build.xml
    4.83 +             - copy/paste the content of the rules files (minus the top node)
    4.84 +               into this file, replacing the <import> task.
    4.85 +             - customize to your needs.
    4.86 +
    4.87 +         ***********************
    4.88 +         ****** IMPORTANT ******
    4.89 +         ***********************
    4.90 +         In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
    4.91 +         in order to avoid having your file be overridden by tools such as "android update project"
    4.92 +    -->
    4.93 +    <!-- version-tag: 1 -->
    4.94 +    <import file="${sdk.dir}/tools/ant/build.xml" />
    4.95 +
    4.96 +</project>
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/android-project-ant/default.properties	Sat Oct 28 12:11:25 2017 -0700
     5.3 @@ -0,0 +1,11 @@
     5.4 +# This file is automatically generated by Android Tools.
     5.5 +# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
     5.6 +# 
     5.7 +# This file must be checked in Version Control Systems.
     5.8 +# 
     5.9 +# To customize properties used by the Ant build system use,
    5.10 +# "build.properties", and override values to adapt the script to your
    5.11 +# project structure.
    5.12 +
    5.13 +# Project target.
    5.14 +target=android-16
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/android-project-ant/jni/Android.mk	Sat Oct 28 12:11:25 2017 -0700
     6.3 @@ -0,0 +1,1 @@
     6.4 +include $(call all-subdir-makefiles)
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/android-project-ant/jni/Application.mk	Sat Oct 28 12:11:25 2017 -0700
     7.3 @@ -0,0 +1,10 @@
     7.4 +
     7.5 +# Uncomment this if you're using STL in your project
     7.6 +# See CPLUSPLUS-SUPPORT.html in the NDK documentation for more information
     7.7 +# APP_STL := stlport_static 
     7.8 +
     7.9 +APP_ABI := armeabi armeabi-v7a x86
    7.10 +
    7.11 +# Min SDK level
    7.12 +APP_PLATFORM=android-10
    7.13 +
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/android-project-ant/jni/src/Android.mk	Sat Oct 28 12:11:25 2017 -0700
     8.3 @@ -0,0 +1,18 @@
     8.4 +LOCAL_PATH := $(call my-dir)
     8.5 +
     8.6 +include $(CLEAR_VARS)
     8.7 +
     8.8 +LOCAL_MODULE := main
     8.9 +
    8.10 +SDL_PATH := ../SDL
    8.11 +
    8.12 +LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include
    8.13 +
    8.14 +# Add your application source files here...
    8.15 +LOCAL_SRC_FILES := YourSourceHere.c
    8.16 +
    8.17 +LOCAL_SHARED_LIBRARIES := SDL2
    8.18 +
    8.19 +LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog
    8.20 +
    8.21 +include $(BUILD_SHARED_LIBRARY)
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/android-project-ant/jni/src/Android_static.mk	Sat Oct 28 12:11:25 2017 -0700
     9.3 @@ -0,0 +1,12 @@
     9.4 +LOCAL_PATH := $(call my-dir)
     9.5 +
     9.6 +include $(CLEAR_VARS)
     9.7 +
     9.8 +LOCAL_MODULE := main
     9.9 +
    9.10 +LOCAL_SRC_FILES := YourSourceHere.c
    9.11 +
    9.12 +LOCAL_STATIC_LIBRARIES := SDL2_static
    9.13 +
    9.14 +include $(BUILD_SHARED_LIBRARY)
    9.15 +$(call import-module,SDL)LOCAL_PATH := $(call my-dir)
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/android-project-ant/proguard-project.txt	Sat Oct 28 12:11:25 2017 -0700
    10.3 @@ -0,0 +1,20 @@
    10.4 +# To enable ProGuard in your project, edit project.properties
    10.5 +# to define the proguard.config property as described in that file.
    10.6 +#
    10.7 +# Add project specific ProGuard rules here.
    10.8 +# By default, the flags in this file are appended to flags specified
    10.9 +# in ${sdk.dir}/tools/proguard/proguard-android.txt
   10.10 +# You can edit the include path and order by changing the ProGuard
   10.11 +# include property in project.properties.
   10.12 +#
   10.13 +# For more details, see
   10.14 +#   http://developer.android.com/guide/developing/tools/proguard.html
   10.15 +
   10.16 +# Add any project specific keep options here:
   10.17 +
   10.18 +# If your project uses WebView with JS, uncomment the following
   10.19 +# and specify the fully qualified class name to the JavaScript interface
   10.20 +# class:
   10.21 +#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
   10.22 +#   public *;
   10.23 +#}
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/android-project-ant/project.properties	Sat Oct 28 12:11:25 2017 -0700
    11.3 @@ -0,0 +1,14 @@
    11.4 +# This file is automatically generated by Android Tools.
    11.5 +# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
    11.6 +#
    11.7 +# This file must be checked in Version Control Systems.
    11.8 +#
    11.9 +# To customize properties used by the Ant build system edit
   11.10 +# "ant.properties", and override values to adapt the script to your
   11.11 +# project structure.
   11.12 +#
   11.13 +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
   11.14 +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
   11.15 +
   11.16 +# Project target.
   11.17 +target=android-16
    12.1 Binary file android-project-ant/res/drawable-hdpi/ic_launcher.png has changed
    13.1 Binary file android-project-ant/res/drawable-mdpi/ic_launcher.png has changed
    14.1 Binary file android-project-ant/res/drawable-xhdpi/ic_launcher.png has changed
    15.1 Binary file android-project-ant/res/drawable-xxhdpi/ic_launcher.png has changed
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/android-project-ant/res/layout/main.xml	Sat Oct 28 12:11:25 2017 -0700
    16.3 @@ -0,0 +1,13 @@
    16.4 +<?xml version="1.0" encoding="utf-8"?>
    16.5 +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    16.6 +    android:orientation="vertical"
    16.7 +    android:layout_width="fill_parent"
    16.8 +    android:layout_height="fill_parent"
    16.9 +    >
   16.10 +<TextView  
   16.11 +    android:layout_width="fill_parent" 
   16.12 +    android:layout_height="wrap_content" 
   16.13 +    android:text="Hello World, SDLActivity"
   16.14 +    />
   16.15 +</LinearLayout>
   16.16 +
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/android-project-ant/res/values/strings.xml	Sat Oct 28 12:11:25 2017 -0700
    17.3 @@ -0,0 +1,4 @@
    17.4 +<?xml version="1.0" encoding="utf-8"?>
    17.5 +<resources>
    17.6 +    <string name="app_name">SDL App</string>
    17.7 +</resources>
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/android-project-ant/src	Sat Oct 28 12:11:25 2017 -0700
    18.3 @@ -0,0 +1,1 @@
    18.4 +../android-project/app/src/main/java
    18.5 \ No newline at end of file
    19.1 --- a/docs/README-android.md	Thu Oct 26 16:37:20 2017 -0700
    19.2 +++ b/docs/README-android.md	Sat Oct 28 12:11:25 2017 -0700
    19.3 @@ -4,7 +4,10 @@
    19.4  Matt Styles wrote a tutorial on building SDL for Android with Visual Studio:
    19.5  http://trederia.blogspot.de/2017/03/building-sdl2-for-android-with-visual.html
    19.6  
    19.7 -The rest of this README covers the traditional style build process.
    19.8 +The rest of this README covers the Android gradle style build process.
    19.9 +
   19.10 +If you are using the older ant build process, it is no longer officially
   19.11 +supported, but you can use the "android-project-ant" directory as a template.
   19.12  
   19.13  
   19.14  ================================================================================