|
19 | 19 | <property |
20 | 20 | name="scalac.banner" |
21 | 21 | value="Scala compiler version ${scala.version.number} - http://scala-lang.org" /> |
| 22 | + <property name="scala.compilerargs" value="" /> |
22 | 23 |
|
23 | 24 | <!-- Rules --> |
24 | 25 |
|
|
39 | 40 | <scalac |
40 | 41 | destdir="${out.classes.absolute.dir}" |
41 | 42 | bootclasspathref="android.target.classpath" |
42 | | - logging="${logging}" addparams="${scalac.addparams}" |
43 | | - classpath="${extensible.classpath}" |
44 | | - classpathref="jar.libs.ref"> |
| 43 | + logging="${logging}" addparams="${scala.compilerargs}" |
| 44 | + classpath="${extensible.classpath}"> |
45 | 45 | <src path="${source.absolute.dir}" /> |
46 | 46 | <src path="${gen.absolute.dir}" /> |
47 | 47 | <classpath> |
| 48 | + <fileset dir="${jar.libs.absolute.dir}" includes="*.jar" /> |
| 49 | + <path refid="project.libraries.jars" /> |
48 | 50 | <pathelement location="${scala-library.jar}" /> |
49 | 51 | <!-- include compiled resources --> |
50 | 52 | <pathelement location="${out.classes.absolute.dir}" /> |
|
89 | 91 | <condition property="release.mode" value="" else="#RELEASE#"> |
90 | 92 | <equals arg1="${build.target}" arg2="release" /> |
91 | 93 | </condition> |
92 | | - <!-- priority is given to local ProGuard configuration if present --> |
93 | | - <condition property="template.cfg" value="${basedir}/local-proguard-template.cfg"> |
94 | | - <available file="${basedir}/local-proguard-template.cfg" /> |
95 | | - </condition> |
96 | 94 | <condition property="template.cfg" value="${basedir}/proguard-template.cfg"> |
97 | 95 | <available file="${basedir}/proguard-template.cfg" /> |
98 | 96 | </condition> |
|
108 | 106 | <path id="project.libraries.jars"> |
109 | 107 | <pathelement location="${scala-library.jar}" /> |
110 | 108 | </path> |
111 | | - <!-- we use properties defined in main_rules.xml --> |
| 109 | + <!-- we use properties defined in tools/ant/build.xml --> |
112 | 110 | <property name="injars" value="" /> |
113 | 111 | <property name="outjars" value="" /> |
114 | 112 | <property name="libraryjars" value="" /> |
|
156 | 154 | <!-- Name of the application package extracted from manifest file --> |
157 | 155 | <xpath input="AndroidManifest.xml" expression="/manifest/@package" |
158 | 156 | output="manifest.package" /> |
| 157 | + <!-- we include local configuration if present --> |
| 158 | + <if> |
| 159 | + <condition> |
| 160 | + <available file="${basedir}/proguard-local.cfg" /> |
| 161 | + </condition> |
| 162 | + <then> |
| 163 | + <loadfile |
| 164 | + property="includes" srcfile="${basedir}/proguard-local.cfg" |
| 165 | + failonerror="false" quiet="true" /> |
| 166 | + </then> |
| 167 | + <else> |
| 168 | + <property name="includes" value="" /> |
| 169 | + </else> |
| 170 | + </if> |
159 | 171 | <copy file="${template.cfg}" tofile="${proguard.cfg}"> |
160 | 172 | <filterchain> |
161 | 173 | <replacetokens> |
|
166 | 178 | <token key="PACKAGENAME" value="${manifest.package}" /> |
167 | 179 | <token key="DEBUG" value="${debug.mode}" /> |
168 | 180 | <token key="RELEASE" value="${release.mode}" /> |
| 181 | + <token key="INCLUDES" value="${includes}" /> |
169 | 182 | </replacetokens> |
170 | 183 | </filterchain> |
171 | 184 | </copy> |
|
0 commit comments