|
65 | 65 | <attribute name="keystore.alias" default="${android.keystore.alias}" />
|
66 | 66 | <attribute name="keystore.storepass" default="${android.keystore.storepass}" />
|
67 | 67 | <attribute name="keystore.keypass" default="${android.keystore.keypass}" />
|
| 68 | + <element name="d8-classpaths" implicit="no" optional="true" /> |
68 | 69 |
|
69 | 70 | <sequential>
|
70 | 71 | <var name="m.aapt.apkbasename0" unset="true"/>
|
|
171 | 172 | <pathelement path="${android.jar}"/>
|
172 | 173 | </classpath>
|
173 | 174 | </javac>
|
| 175 | + <zip destfile="${m.aapt.build.apk}/temp/classes.zip" level="0"> |
| 176 | + <fileset dir="${m.aapt.build.apk}/temp/classes"/> |
| 177 | + </zip> |
174 | 178 |
|
175 | 179 | <echo>aapt.signed ${m.aapt.apkbasename}: dex'ing</echo>
|
176 |
| - <exec dir="." executable="dx" logError="true" failonerror="true" failifexecutionfails="true"> |
177 |
| - <arg line="--dex"/> |
178 |
| - <arg line="--output=${m.aapt.dex.file}"/> |
| 180 | + <!-- exec dir="." executable="dx" logError="true" failonerror="true" failifexecutionfails="true"> |
| 181 | + <arg line="- -dex"/> |
| 182 | + <arg line="- -output=${m.aapt.dex.file}"/> |
| 183 | + <arg line="- -min-sdk-version=${android.api.level.min}"/> |
179 | 184 | <arg line="@{jarbuilddir}/@{jarbasename}.jar"/>
|
180 | 185 | <arg line="${m.aapt.build.apk}/temp/classes"/>
|
| 186 | + </exec --> |
| 187 | + <exec dir="." executable="d8" logError="true" failonerror="true" failifexecutionfails="true"> |
| 188 | + <arg line="--output ${m.aapt.build.apk}/image"/> |
| 189 | + |
| 190 | + <arg line="--classpath ${android-min.jar}"/> |
| 191 | + <arg line="--classpath ${target.rt.jar}"/> |
| 192 | + <d8-classpaths/> |
| 193 | + |
| 194 | + <arg line="--min-api ${android.api.level.min}"/> |
| 195 | + |
| 196 | + <arg line="--release"/> |
| 197 | + <!-- arg line="- -debug"/ --> |
| 198 | + |
| 199 | + <arg line="@{jarbuilddir}/@{jarbasename}.jar"/> |
| 200 | + <arg line="${m.aapt.build.apk}/temp/classes.zip"/> |
181 | 201 | </exec>
|
182 | 202 |
|
183 | 203 | <echo>aapt.signed ${m.aapt.apkbasename}: packaging</echo>
|
|
0 commit comments