| OLD | NEW |
| 1 <?xml version="1.0" encoding="UTF-8"?> | 1 <?xml version="1.0" encoding="UTF-8"?> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (C) 2005-2008 The Android Open Source Project | 3 Copyright (C) 2005-2008 The Android Open Source Project |
| 4 | 4 |
| 5 Licensed under the Apache License, Version 2.0 (the "License"); | 5 Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 you may not use this file except in compliance with the License. | 6 you may not use this file except in compliance with the License. |
| 7 You may obtain a copy of the License at | 7 You may obtain a copy of the License at |
| 8 | 8 |
| 9 http://www.apache.org/licenses/LICENSE-2.0 | 9 http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | 10 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 <not> | 221 <not> |
| 222 <os family="unix"/> | 222 <os family="unix"/> |
| 223 </not> | 223 </not> |
| 224 </and> | 224 </and> |
| 225 </condition> | 225 </condition> |
| 226 | 226 |
| 227 <!-- ******************************************************* --> | 227 <!-- ******************************************************* --> |
| 228 <!-- ************************ Macros *********************** --> | 228 <!-- ************************ Macros *********************** --> |
| 229 <!-- ******************************************************* --> | 229 <!-- ******************************************************* --> |
| 230 | 230 |
| 231 <!-- macro to do a task on if project.is.library is false. | |
| 232 elseText attribute is displayed otherwise --> | |
| 233 <macrodef name="do-only-if-not-library"> | |
| 234 <attribute name="elseText" /> | |
| 235 <element name="task-to-do" implicit="yes" /> | |
| 236 <sequential> | |
| 237 <if condition="${project.is.library}"> | |
| 238 <else> | |
| 239 <task-to-do /> | |
| 240 </else> | |
| 241 <then> | |
| 242 <echo level="info">@{elseText}</echo> | |
| 243 </then> | |
| 244 </if> | |
| 245 </sequential> | |
| 246 </macrodef> | |
| 247 | |
| 248 <!-- macro to do a task on if manifest.hasCode is true. | |
| 249 elseText attribute is displayed otherwise --> | |
| 250 <macrodef name="do-only-if-manifest-hasCode"> | |
| 251 <attribute name="elseText" default=""/> | |
| 252 <element name="task-to-do" implicit="yes" /> | |
| 253 <sequential> | |
| 254 <if condition="${manifest.hasCode}"> | |
| 255 <then> | |
| 256 <task-to-do /> | |
| 257 </then> | |
| 258 <else> | |
| 259 <if> | |
| 260 <condition> | |
| 261 <length string="@{elseText}" trim="true" when="greater"
length="0" /> | |
| 262 </condition> | |
| 263 <then> | |
| 264 <echo level="info">@{elseText}</echo> | |
| 265 </then> | |
| 266 </if> | |
| 267 </else> | |
| 268 </if> | |
| 269 </sequential> | |
| 270 </macrodef> | |
| 271 | |
| 272 | |
| 273 <!-- Configurable macro, which allows to pass as parameters output directory
, | |
| 274 output dex filename and external libraries to dex (optional) --> | |
| 275 <macrodef name="dex-helper"> | |
| 276 <element name="external-libs" optional="yes" /> | |
| 277 <attribute name="nolocals" default="false" /> | |
| 278 <sequential> | |
| 279 <!-- sets the primary input for dex. If a pre-dex task sets it to | |
| 280 something else this has no effect --> | |
| 281 <property name="out.dex.input.absolute.dir" value="${out.classes.abs
olute.dir}" /> | |
| 282 | |
| 283 <dex executable="${dx}" | |
| 284 output="${intermediate.dex.file}" | |
| 285 dexedlibs="${out.dexed.absolute.dir}" | |
| 286 nolocals="@{nolocals}" | |
| 287 forceJumbo="${dex.force.jumbo}" | |
| 288 verbose="${verbose}"> | |
| 289 <path path="${out.dex.input.absolute.dir}"/> | |
| 290 <path refid="out.dex.jar.input.ref" /> | |
| 291 <external-libs /> | |
| 292 </dex> | |
| 293 </sequential> | |
| 294 </macrodef> | |
| 295 | |
| 296 <!-- This is macro that enable passing variable list of external jar files t
o ApkBuilder | |
| 297 Example of use: | |
| 298 <package-helper> | |
| 299 <extra-jars> | |
| 300 <jarfolder path="my_jars" /> | |
| 301 <jarfile path="foo/bar.jar" /> | |
| 302 <jarfolder path="your_jars" /> | |
| 303 </extra-jars> | |
| 304 </package-helper> --> | |
| 305 <macrodef name="package-helper"> | |
| 306 <element name="extra-jars" optional="yes" /> | |
| 307 <sequential> | |
| 308 <apkbuilder | |
| 309 outfolder="${out.absolute.dir}" | |
| 310 resourcefile="${resource.package.file.name}" | |
| 311 apkfilepath="${out.packaged.file}" | |
| 312 debugpackaging="${build.is.packaging.debug}" | |
| 313 debugsigning="${build.is.signing.debug}" | |
| 314 verbose="${verbose}" | |
| 315 hascode="${manifest.hasCode}" | |
| 316 previousBuildType="${build.last.is.packaging.debug}/${build.
last.is.signing.debug}" | |
| 317 buildType="${build.is.packaging.debug}/${build.is.signing.de
bug}"> | |
| 318 <dex path="${intermediate.dex.file}"/> | |
| 319 <sourcefolder path="${source.absolute.dir}"/> | |
| 320 <nativefolder path="${native.libs.absolute.dir}" /> | |
| 321 <extra-jars/> | |
| 322 </apkbuilder> | |
| 323 </sequential> | |
| 324 </macrodef> | |
| 325 | |
| 326 <!-- This is macro which zipaligns in.package and outputs it to out.package.
Used by targets | |
| 327 debug and release.--> | |
| 328 <macrodef name="zipalign-helper"> | |
| 329 <attribute name="in.package" /> | |
| 330 <attribute name="out.package" /> | |
| 331 <sequential> | |
| 332 <zipalign | |
| 333 executable="${zipalign}" | |
| 334 input="@{in.package}" | |
| 335 output="@{out.package}" | |
| 336 verbose="${verbose}" /> | |
| 337 </sequential> | |
| 338 </macrodef> | |
| 339 | |
| 340 <macrodef name="record-build-key"> | 231 <macrodef name="record-build-key"> |
| 341 <attribute name="key" default="false" /> | 232 <attribute name="key" default="false" /> |
| 342 <attribute name="value" default="false" /> | 233 <attribute name="value" default="false" /> |
| 343 <sequential> | 234 <sequential> |
| 344 <propertyfile file="${out.build.prop.file}" comment="Last build type
"> | 235 <propertyfile file="${out.build.prop.file}" comment="Last build type
"> |
| 345 <entry key="@{key}" value="@{value}"/> | 236 <entry key="@{key}" value="@{value}"/> |
| 346 </propertyfile> | 237 </propertyfile> |
| 347 </sequential> | 238 </sequential> |
| 348 </macrodef> | 239 </macrodef> |
| 349 | 240 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 <!-- Value of the hasCode attribute (Application node) extracted from ma
nifest file --> | 382 <!-- Value of the hasCode attribute (Application node) extracted from ma
nifest file --> |
| 492 <xpath input="${manifest.abs.file}" expression="/manifest/application/@a
ndroid:hasCode" | 383 <xpath input="${manifest.abs.file}" expression="/manifest/application/@a
ndroid:hasCode" |
| 493 output="manifest.hasCode" default="true"/> | 384 output="manifest.hasCode" default="true"/> |
| 494 | 385 |
| 495 <echo level="info">----------</echo> | 386 <echo level="info">----------</echo> |
| 496 <echo level="info">Creating output directories if needed...</echo> | 387 <echo level="info">Creating output directories if needed...</echo> |
| 497 <mkdir dir="${resource.absolute.dir}" /> | 388 <mkdir dir="${resource.absolute.dir}" /> |
| 498 <mkdir dir="${jar.libs.absolute.dir}" /> | 389 <mkdir dir="${jar.libs.absolute.dir}" /> |
| 499 <mkdir dir="${out.absolute.dir}" /> | 390 <mkdir dir="${out.absolute.dir}" /> |
| 500 <mkdir dir="${out.res.absolute.dir}" /> | 391 <mkdir dir="${out.res.absolute.dir}" /> |
| 501 <do-only-if-manifest-hasCode> | 392 <mkdir dir="${gen.absolute.dir}" /> |
| 502 <mkdir dir="${gen.absolute.dir}" /> | 393 <mkdir dir="${out.classes.absolute.dir}" /> |
| 503 <mkdir dir="${out.classes.absolute.dir}" /> | 394 <mkdir dir="${out.dexed.absolute.dir}" /> |
| 504 <mkdir dir="${out.dexed.absolute.dir}" /> | |
| 505 </do-only-if-manifest-hasCode> | |
| 506 </target> | 395 </target> |
| 507 | 396 |
| 508 <!-- empty default pre-build target. Create a similar target in | 397 <!-- empty default pre-build target. Create a similar target in |
| 509 your build.xml and it'll be called instead of this one. --> | 398 your build.xml and it'll be called instead of this one. --> |
| 510 <target name="-pre-build"/> | 399 <target name="-pre-build"/> |
| 511 | 400 |
| 512 <!-- Code Generation: compile resources (aapt -> R.java), aidl --> | 401 <!-- Code Generation: compile resources (aapt -> R.java), aidl --> |
| 513 <target name="-code-gen"> | 402 <target name="-code-gen"> |
| 514 <!-- always merge manifest --> | 403 <!-- always merge manifest --> |
| 515 <mergemanifest | 404 <mergemanifest |
| 516 appManifest="${manifest.abs.file}" | 405 appManifest="${manifest.abs.file}" |
| 517 outManifest="${out.manifest.abs.file}" | 406 outManifest="${out.manifest.abs.file}" |
| 518 enabled="${manifestmerger.enabled}"> | 407 enabled="${manifestmerger.enabled}"> |
| 519 </mergemanifest> | 408 </mergemanifest> |
| 520 | 409 |
| 521 <do-only-if-manifest-hasCode | 410 <echo level="info">----------</echo> |
| 522 elseText="hasCode = false. Skipping aidl/R.java"> | 411 <echo level="info">Handling Resources...</echo> |
| 523 <echo level="info">----------</echo> | 412 <aapt executable="${aapt}" |
| 524 <echo level="info">Handling Resources...</echo> | 413 command="package" |
| 525 <aapt executable="${aapt}" | 414 verbose="${verbose}" |
| 526 command="package" | 415 manifest="${out.manifest.abs.file}" |
| 527 verbose="${verbose}" | 416 androidjar="${project.target.android.jar}" |
| 528 manifest="${out.manifest.abs.file}" | 417 rfolder="${gen.absolute.dir}" |
| 529 androidjar="${project.target.android.jar}" | 418 nonConstantId="${android.library}" |
| 530 rfolder="${gen.absolute.dir}" | 419 libraryResFolderPathRefid="project.library.res.folder.path" |
| 531 nonConstantId="${android.library}" | 420 libraryPackagesRefid="project.library.packages" |
| 532 libraryResFolderPathRefid="project.library.res.folder.path" | 421 libraryRFileRefid="project.library.bin.r.file.path" |
| 533 libraryPackagesRefid="project.library.packages" | 422 ignoreAssets="${aapt.ignore.assets}" |
| 534 libraryRFileRefid="project.library.bin.r.file.path" | 423 binFolder="${out.absolute.dir}" |
| 535 ignoreAssets="${aapt.ignore.assets}" | 424 proguardFile="${out.absolute.dir}/proguard.txt"> |
| 536 binFolder="${out.absolute.dir}" | 425 <res path="${out.res.absolute.dir}" /> |
| 537 proguardFile="${out.absolute.dir}/proguard.txt"> | 426 <res path="${resource.absolute.dir}" /> |
| 538 <res path="${out.res.absolute.dir}" /> | 427 </aapt> |
| 539 <res path="${resource.absolute.dir}" /> | |
| 540 </aapt> | |
| 541 | 428 |
| 542 <echo level="info">----------</echo> | 429 <echo level="info">----------</echo> |
| 543 <echo level="info">Handling BuildConfig class...</echo> | 430 <echo level="info">Handling BuildConfig class...</echo> |
| 544 <buildconfig | 431 <buildconfig |
| 545 genFolder="${gen.absolute.dir}" | 432 genFolder="${gen.absolute.dir}" |
| 546 package="${project.app.package}" | 433 package="${project.app.package}" |
| 547 buildType="${build.is.packaging.debug}" | 434 buildType="${build.is.packaging.debug}" |
| 548 previousBuildType="${build.last.is.packaging.debug}"/> | 435 previousBuildType="${build.last.is.packaging.debug}"/> |
| 549 | |
| 550 </do-only-if-manifest-hasCode> | |
| 551 </target> | 436 </target> |
| 552 | 437 |
| 553 <!-- empty default pre-compile target. Create a similar target in | 438 <!-- empty default pre-compile target. Create a similar target in |
| 554 your build.xml and it'll be called instead of this one. --> | 439 your build.xml and it'll be called instead of this one. --> |
| 555 <target name="-pre-compile"> | 440 <target name="-pre-compile"> |
| 556 <!-- | 441 <!-- |
| 557 Remove all .class files from the output directory. This prevents inclusi
on of incorrect .class | 442 Remove all .class files from the output directory. This prevents inclusi
on of incorrect .class |
| 558 files in the final apk. For example, if a .java file was deleted, the ap
k should not contain | 443 files in the final apk. For example, if a .java file was deleted, the ap
k should not contain |
| 559 the .class files for that .java from previous builds. | 444 the .class files for that .java from previous builds. |
| 560 --> | 445 --> |
| 561 <delete> | 446 <delete> |
| 562 <fileset dir="${out.classes.absolute.dir}" includes="**/*.class"/> | 447 <fileset dir="${out.classes.absolute.dir}" includes="**/*.class"/> |
| 563 </delete> | 448 </delete> |
| 564 </target> | 449 </target> |
| 565 | 450 |
| 566 <!-- | 451 <!-- |
| 567 Override the -compile target. | 452 Override the -compile target. |
| 568 This target requires 'javac.custom.classpath' to be set to reference | 453 This target requires 'javac.custom.classpath' to be set to reference |
| 569 of classpath to be used for javac. Also accepts custom path for | 454 of classpath to be used for javac. Also accepts custom path for |
| 570 sources: 'javac.custom.sourcepath'. | 455 sources: 'javac.custom.sourcepath'. |
| 571 --> | 456 --> |
| 572 <!-- Compiles this project's .java files into .class files. --> | 457 <!-- Compiles this project's .java files into .class files. --> |
| 573 <target | 458 <target |
| 574 name="-compile" | 459 name="-compile" |
| 575 depends="-build-setup, -pre-build, -code-gen, -pre-compile"> | 460 depends="-build-setup, -pre-build, -code-gen, -pre-compile"> |
| 576 <do-only-if-manifest-hasCode elseText="hasCode = false. Skipping..." > | 461 <javac |
| 577 <javac | 462 bootclasspathref="project.target.class.path" |
| 578 bootclasspathref="project.target.class.path" | 463 classpathref="javac.custom.classpath" |
| 579 classpathref="javac.custom.classpath" | 464 debug="true" |
| 580 debug="true" | 465 destdir="${out.classes.absolute.dir}" |
| 581 destdir="${out.classes.absolute.dir}" | 466 encoding="${java.encoding}" |
| 582 encoding="${java.encoding}" | 467 extdirs="" |
| 583 extdirs="" | 468 fork="${need.javac.fork}" |
| 584 fork="${need.javac.fork}" | 469 includeantruntime="false" |
| 585 includeantruntime="false" | 470 source="${java.source}" |
| 586 source="${java.source}" | 471 target="${java.target}" |
| 587 target="${java.target}" | 472 verbose="${verbose}"> |
| 588 verbose="${verbose}"> | 473 <src path="${source.absolute.dir}"/> |
| 589 <src path="${source.absolute.dir}"/> | 474 <src path="${gen.absolute.dir}"/> |
| 590 <src path="${gen.absolute.dir}"/> | 475 <src> |
| 591 <src> | 476 <path refid="javac.srcdirs.additional"/> |
| 592 <path refid="javac.srcdirs.additional"/> | 477 </src> |
| 593 </src> | 478 <compilerarg value="-Xlint:unchecked"/> |
| 594 <compilerarg value="-Xlint:unchecked"/> | 479 <compilerarg line="${java.compilerargs}"/> |
| 595 <compilerarg line="${java.compilerargs}"/> | 480 </javac> |
| 596 </javac> | 481 <!-- |
| 597 <!-- | 482 If the project needs a test jar then generate a jar containing |
| 598 If the project needs a test jar then generate a jar containing | 483 all compiled classes and referenced jars. |
| 599 all compiled classes and referenced jars. | 484 project.is.testapp is set by Android's ant build system based on the |
| 600 project.is.testapp is set by Android's ant build system based on the | 485 target's manifest. It is true only for instrumentation apks. |
| 601 target's manifest. It is true only for instrumentation apks. | 486 --> |
| 602 --> | 487 <if condition="${project.is.testapp}"> |
| 603 <if condition="${project.is.testapp}"> | 488 <then> |
| 604 <then> | 489 <property-location name="create.test.jar.file" |
| 605 <property-location name="create.test.jar.file" | 490 location="${CHROMIUM_SRC}/build/android/ant/create-test-jar.js"/> |
| 606 location="${CHROMIUM_SRC}/build/android/ant/create-test-jar.js"/
> | 491 <script language="javascript" src="${create.test.jar.file}"/> |
| 607 <script language="javascript" src="${create.test.jar.file}"/> | 492 </then> |
| 608 </then> | 493 </if> |
| 609 </if> | |
| 610 | |
| 611 </do-only-if-manifest-hasCode> | |
| 612 </target> | 494 </target> |
| 613 | 495 |
| 614 <!-- empty default post-compile target. Create a similar target in | 496 <!-- empty default post-compile target. Create a similar target in |
| 615 your build.xml and it'll be called instead of this one. --> | 497 your build.xml and it'll be called instead of this one. --> |
| 616 <target name="-post-compile"> | 498 <target name="-post-compile"> |
| 617 <!-- | 499 <!-- |
| 618 Copy gdbserver to main libs directory if building a non-instrumentation
debug apk. | 500 Copy gdbserver to main libs directory if building a non-instrumentation
debug apk. |
| 619 --> | 501 --> |
| 620 <if> | 502 <if> |
| 621 <condition> | 503 <condition> |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 -printseeds "${obfuscate.absolute.dir}/seeds.txt" | 611 -printseeds "${obfuscate.absolute.dir}/seeds.txt" |
| 730 -printusage "${obfuscate.absolute.dir}/usage.txt" | 612 -printusage "${obfuscate.absolute.dir}/usage.txt" |
| 731 -printmapping "${obfuscate.absolute.dir}/mapping.txt" | 613 -printmapping "${obfuscate.absolute.dir}/mapping.txt" |
| 732 </proguard> | 614 </proguard> |
| 733 </then> | 615 </then> |
| 734 </if> | 616 </if> |
| 735 </target> | 617 </target> |
| 736 | 618 |
| 737 <!-- Converts this project's .class files into .dex files --> | 619 <!-- Converts this project's .class files into .dex files --> |
| 738 <target name="-dex" depends="-compile, -post-compile, -obfuscate"> | 620 <target name="-dex" depends="-compile, -post-compile, -obfuscate"> |
| 739 <do-only-if-manifest-hasCode elseText="hasCode = false. Skipping..."> | 621 <sequential> |
| 740 <!-- only convert to dalvik bytecode is *not* a library --> | 622 <!-- sets the primary input for dex. If a pre-dex task sets it to |
| 741 <do-only-if-not-library elseText="Library project: do not convert by
tecode..." > | 623 something else this has no effect --> |
| 742 <dex-helper /> | 624 <property name="out.dex.input.absolute.dir" value="${out.classes.abs
olute.dir}" /> |
| 743 </do-only-if-not-library> | 625 |
| 744 </do-only-if-manifest-hasCode> | 626 <dex executable="${dx}" |
| 627 output="${intermediate.dex.file}" |
| 628 dexedlibs="${out.dexed.absolute.dir}" |
| 629 nolocals="false" |
| 630 forceJumbo="${dex.force.jumbo}" |
| 631 verbose="${verbose}"> |
| 632 <path path="${out.dex.input.absolute.dir}"/> |
| 633 <path refid="out.dex.jar.input.ref" /> |
| 634 </dex> |
| 635 </sequential> |
| 745 </target> | 636 </target> |
| 746 | 637 |
| 747 <!-- Updates the pre-processed PNG cache --> | 638 <!-- Updates the pre-processed PNG cache --> |
| 748 <target name="-crunch"> | 639 <target name="-crunch"> |
| 749 <exec executable="${aapt}" taskName="crunch"> | 640 <exec executable="${aapt}" taskName="crunch"> |
| 750 <arg value="crunch" /> | 641 <arg value="crunch" /> |
| 751 <arg value="-v" /> | 642 <arg value="-v" /> |
| 752 <arg value="-S" /> | 643 <arg value="-S" /> |
| 753 <arg path="${resource.absolute.dir}" /> | 644 <arg path="${resource.absolute.dir}" /> |
| 754 <arg value="-C" /> | 645 <arg value="-C" /> |
| 755 <arg path="${out.res.absolute.dir}" /> | 646 <arg path="${out.res.absolute.dir}" /> |
| 756 </exec> | 647 </exec> |
| 757 </target> | 648 </target> |
| 758 | 649 |
| 759 <!-- Puts the project's resources into the output package file | 650 <!-- Puts the project's resources into the output package file |
| 760 This actually can create multiple resource package in case | 651 This actually can create multiple resource package in case |
| 761 Some custom apk with specific configuration have been | 652 Some custom apk with specific configuration have been |
| 762 declared in default.properties. | 653 declared in default.properties. |
| 763 --> | 654 --> |
| 764 <target name="-package-resources" depends="-crunch"> | 655 <target name="-package-resources" depends="-crunch"> |
| 765 <!-- only package resources if *not* a library project --> | 656 <aapt executable="${aapt}" |
| 766 <do-only-if-not-library elseText="Library project: do not package resour
ces..." > | 657 command="package" |
| 767 <aapt executable="${aapt}" | 658 versioncode="${version.code}" |
| 768 command="package" | 659 versionname="${version.name}" |
| 769 versioncode="${version.code}" | 660 debug="${build.is.packaging.debug}" |
| 770 versionname="${version.name}" | 661 manifest="${out.manifest.abs.file}" |
| 771 debug="${build.is.packaging.debug}" | 662 assets="${asset.absolute.dir}" |
| 772 manifest="${out.manifest.abs.file}" | 663 androidjar="${project.target.android.jar}" |
| 773 assets="${asset.absolute.dir}" | 664 apkfolder="${out.absolute.dir}" |
| 774 androidjar="${project.target.android.jar}" | 665 nocrunch="${build.packaging.nocrunch}" |
| 775 apkfolder="${out.absolute.dir}" | 666 resourcefilename="${resource.package.file.name}" |
| 776 nocrunch="${build.packaging.nocrunch}" | 667 resourcefilter="${aapt.resource.filter}" |
| 777 resourcefilename="${resource.package.file.name}" | 668 libraryResFolderPathRefid="project.library.res.folder.path" |
| 778 resourcefilter="${aapt.resource.filter}" | 669 libraryPackagesRefid="project.library.packages" |
| 779 libraryResFolderPathRefid="project.library.res.folder.path" | 670 libraryRFileRefid="project.library.bin.r.file.path" |
| 780 libraryPackagesRefid="project.library.packages" | 671 previousBuildType="${build.last.target}" |
| 781 libraryRFileRefid="project.library.bin.r.file.path" | 672 buildType="${build.target}" |
| 782 previousBuildType="${build.last.target}" | 673 ignoreAssets="${aapt.ignore.assets}"> |
| 783 buildType="${build.target}" | 674 <res path="${out.res.absolute.dir}" /> |
| 784 ignoreAssets="${aapt.ignore.assets}"> | 675 <res path="${resource.absolute.dir}" /> |
| 785 <res path="${out.res.absolute.dir}" /> | 676 <!-- <nocompress /> forces no compression on any files in assets or
res/raw --> |
| 786 <res path="${resource.absolute.dir}" /> | 677 <!-- <nocompress extension="xml" /> forces no compression on specifi
c file extensions in assets and res/raw --> |
| 787 <!-- <nocompress /> forces no compression on any files in assets
or res/raw --> | 678 </aapt> |
| 788 <!-- <nocompress extension="xml" /> forces no compression on spe
cific file extensions in assets and res/raw --> | |
| 789 </aapt> | |
| 790 </do-only-if-not-library> | |
| 791 </target> | 679 </target> |
| 792 | 680 |
| 793 <!-- Packages the application. --> | 681 <!-- Packages the application. --> |
| 794 <target name="-package" depends="-dex, -package-resources"> | 682 <target name="-package" depends="-dex, -package-resources"> |
| 795 <!-- only package apk if *not* a library project --> | 683 <sequential> |
| 796 <do-only-if-not-library elseText="Library project: do not package apk...
" > | 684 <apkbuilder |
| 797 <package-helper /> | 685 outfolder="${out.absolute.dir}" |
| 798 </do-only-if-not-library> | 686 resourcefile="${resource.package.file.name}" |
| 687 apkfilepath="${out.packaged.file}" |
| 688 debugpackaging="${build.is.packaging.debug}" |
| 689 debugsigning="${build.is.signing.debug}" |
| 690 verbose="${verbose}" |
| 691 hascode="${manifest.hasCode}" |
| 692 previousBuildType="${build.last.is.packaging.debug}/${build.
last.is.signing.debug}" |
| 693 buildType="${build.is.packaging.debug}/${build.is.signing.de
bug}"> |
| 694 <dex path="${intermediate.dex.file}"/> |
| 695 <sourcefolder path="${source.absolute.dir}"/> |
| 696 <nativefolder path="${native.libs.absolute.dir}" /> |
| 697 </apkbuilder> |
| 698 </sequential> |
| 799 </target> | 699 </target> |
| 800 | 700 |
| 801 <target name="-post-package" /> | 701 <target name="-post-package" /> |
| 802 <target name="-post-build" /> | 702 <target name="-post-build" /> |
| 803 | 703 |
| 804 <target name="-set-mode-check"> | 704 <target name="-set-mode-check"> |
| 805 <fail if="build.is.mode.set" | 705 <fail if="build.is.mode.set" |
| 806 message="Cannot run two different modes at the same time. If you
are running more than one debug/release/instrument type targets, call them from
different Ant calls." /> | 706 message="Cannot run two different modes at the same time. If you
are running more than one debug/release/instrument type targets, call them from
different Ant calls." /> |
| 807 </target> | 707 </target> |
| 808 | 708 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 value="${apks.dir}/${ant.project.name}-unaligned.apk" /> | 743 value="${apks.dir}/${ant.project.name}-unaligned.apk" /> |
| 844 | 744 |
| 845 <!-- By default, the SDK tools build only aligns the APK in the -do-debug ta
rget. --> | 745 <!-- By default, the SDK tools build only aligns the APK in the -do-debug ta
rget. --> |
| 846 <!-- Builds debug output package --> | 746 <!-- Builds debug output package --> |
| 847 <target name="-do-sign" | 747 <target name="-do-sign" |
| 848 depends="-package, -post-package"> | 748 depends="-package, -post-package"> |
| 849 <sequential> | 749 <sequential> |
| 850 <!-- Signs the APK --> | 750 <!-- Signs the APK --> |
| 851 <echo level="info">Signing final apk...</echo> | 751 <echo level="info">Signing final apk...</echo> |
| 852 <signapk | 752 <signapk |
| 853 input="${out.packaged.file}" | 753 input="${out.packaged.file}" |
| 854 output="${out.unaligned.file}" | 754 output="${out.unaligned.file}" |
| 855 keystore="${key.store}" | 755 keystore="${key.store}" |
| 856 storepass="${key.store.password}" | 756 storepass="${key.store.password}" |
| 857 alias="${key.alias}" | 757 alias="${key.alias}" |
| 858 keypass="${key.alias.password}"/> | 758 keypass="${key.alias.password}"/> |
| 859 | 759 |
| 860 <!-- Zip aligns the APK --> | 760 <!-- Zip aligns the APK --> |
| 861 <zipalign-helper | 761 <zipalign |
| 862 in.package="${out.unaligned.file}" | 762 executable="${zipalign}" |
| 863 out.package="${out.final.file}" /> | 763 input="${out.unaligned.file}" |
| 764 output="${out.final.file}" |
| 765 verbose="${verbose}" /> |
| 864 <echo level="info">Release Package: ${out.final.file}</echo> | 766 <echo level="info">Release Package: ${out.final.file}</echo> |
| 865 </sequential> | 767 </sequential> |
| 866 </target> | 768 </target> |
| 867 | 769 |
| 868 <target name="-do-debug" | 770 <target name="-do-debug" |
| 869 depends="-set-debug-mode, -debug-obfuscation-check, -do-sign"> | 771 depends="-set-debug-mode, -debug-obfuscation-check, -do-sign"> |
| 870 <record-build-info /> | 772 <record-build-info /> |
| 871 </target> | 773 </target> |
| 872 | 774 |
| 873 <!-- Builds debug output package --> | 775 <!-- Builds debug output package --> |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 937 | 839 |
| 938 <!-- This runs -package-release first and then runs | 840 <!-- This runs -package-release first and then runs |
| 939 only if release-sign is true (set in -release-check, | 841 only if release-sign is true (set in -release-check, |
| 940 called by -release-no-sign)--> | 842 called by -release-no-sign)--> |
| 941 <target name="release" | 843 <target name="release" |
| 942 depends="-set-release-mode, -release-obfuscation-check, -package
, -post-package, -release-sign, -post-build" | 844 depends="-set-release-mode, -release-obfuscation-check, -package
, -post-package, -release-sign, -post-build" |
| 943 description="Builds the application in release mode."> | 845 description="Builds the application in release mode."> |
| 944 </target> | 846 </target> |
| 945 | 847 |
| 946 </project> | 848 </project> |
| OLD | NEW |