Skip to content

Commit 7faf62c

Browse files
committed
Updated build file
1 parent 2c310fb commit 7faf62c

File tree

3 files changed

+32
-25
lines changed

3 files changed

+32
-25
lines changed

example/project.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
# project structure.
99

1010
# Project target.
11-
target=android-7
11+
target=android-17
1212
android.library.reference.1=../main

main/build.xml

+30-23
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project name="main" default="help">
2+
<project name="sharethis_mobile" default="help">
33

44
<!-- The local.properties file is created and updated by the 'android' tool.
55
It contains the path to the SDK. It should *NOT* be checked into
66
Version Control Systems. -->
7-
<loadproperties srcFile="local.properties" />
7+
<property file="local.properties"/>
88

99
<!-- The ant.properties file can be created by you. It is only edited by the
1010
'android' tool to add properties to it.
@@ -26,7 +26,16 @@
2626
application and should be checked into Version Control Systems.
2727
2828
-->
29-
<property file="ant.properties" />
29+
<property file="ant.properties"/>
30+
31+
<!-- if sdk.dir was not set from one of the property file, then
32+
get it from the ANDROID_HOME env var.
33+
This must be done before we load project.properties since
34+
the proguard config can use sdk.dir -->
35+
<property environment="env"/>
36+
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
37+
<isset property="env.ANDROID_HOME"/>
38+
</condition>
3039

3140
<!-- The project.properties file is created and updated by the 'android'
3241
tool, as well as ADT.
@@ -37,29 +46,27 @@
3746
3847
This file is an integral part of the build system for your
3948
application and should be checked into Version Control Systems. -->
40-
<loadproperties srcFile="project.properties" />
49+
<loadproperties srcFile="project.properties"/>
4150

4251
<!-- quick check on sdk.dir -->
4352
<fail
44-
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
53+
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."
4554
unless="sdk.dir"
46-
/>
47-
48-
49-
<!-- extension targets. Uncomment the ones where you want to do custom work
50-
in between standard targets -->
51-
<!--
52-
<target name="-pre-build">
53-
</target>
54-
<target name="-pre-compile">
55-
</target>
56-
57-
/* This is typically used for code obfuscation.
58-
Compiled code location: ${out.classes.absolute.dir}
59-
If this is not done in place, override ${out.dex.input.absolute.dir} */
60-
<target name="-post-compile">
61-
</target>
62-
-->
55+
/>
56+
57+
<!--
58+
Import per project custom build rules if present at the root of the project.
59+
This is the place to put custom intermediary targets such as:
60+
-pre-build
61+
-pre-compile
62+
-post-compile (This is typically used for code obfuscation.
63+
Compiled code location: ${out.classes.absolute.dir}
64+
If this is not done in place, override ${out.dex.input.absolute.dir})
65+
-post-package
66+
-post-build
67+
-pre-clean
68+
-->
69+
<import file="custom_rules.xml" optional="true"/>
6370

6471
<!-- Import the actual build file.
6572
@@ -80,6 +87,6 @@
8087
in order to avoid having your file be overridden by tools such as "android update project"
8188
-->
8289
<!-- version-tag: 1 -->
83-
<import file="${sdk.dir}/tools/ant/build.xml" />
90+
<import file="${sdk.dir}/tools/ant/build.xml"/>
8491

8592
</project>

main/project.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
# project structure.
99

1010
# Project target.
11-
target=android-7
11+
target=android-17
1212
android.library=true

0 commit comments

Comments
 (0)