Commit graph

606 commits

Author SHA1 Message Date
ShuJie Wang
76e93ba6cf build: clean up proguard_flag_files
we should clean up proguard_flag_files if LOCAL_PROGUARD_ENABLED
not defined in current module in case legacy proguard_flag_files
slips into current jack_all_deps dependencies.

Test: make -j8

Change-Id: I45618fc8e821ab7a8b964fa621824209e1e9894c
Signed-off-by: ShuJie Wang <wangshujie@xiaomi.com>
2017-11-09 15:26:28 +08:00
Søren Gjesse
3ae1b684b3 Merge "Use prebuild R8 for USE_R8=true" am: 8639879e60
am: 58c6122f44

Change-Id: Ic0d489cf48c5fc0881df824c4a70c753b1bf0a5c
2017-11-08 07:56:56 +00:00
Søren Gjesse
c66d297e0a Use prebuild R8 for USE_R8=true
Instead of building R8 from external/r8 use the prebuild jar in
prebuilds/r8.

Test: m -j USE_R8=true

Change-Id: I9680ae430cdbc2b3beb910873c8eed27354f6af1
2017-11-07 16:21:50 +01:00
Tobias Thierer
f79c5c07a1 Merge "Skip Proguard for EXPERIMENTAL_USE_OPENJDK9=true" am: 96257655c5
am: 718de33ef9

Change-Id: Ia162ffb7c8415e5573bc68c0c1fbc028e9ac8cdb
2017-11-02 12:46:18 +00:00
Tobias Thierer
89740664a5 Skip Proguard for EXPERIMENTAL_USE_OPENJDK9=true
Proguard doesn't support v53 class files. For now, this
CL simply replaces the Proguard step with a plain 'cp',
which is essentially a no-op.

To avoid apps exceeding the dex limit in this mode, this
CL also enables --multi-dex for those builds.

Test: Treehugger
Bug: 67673860
Change-Id: I17dc5d827360d606a0cac12e324f97e8dedbb630
2017-10-31 21:02:14 +00:00
Colin Cross
db4599249c Merge changes I3bafbb2d,If30943ef am: 0239edea1d
am: a07bd94354

Change-Id: I323247384441ea00698df0eeb37c0572a6d01ac1
2017-10-27 01:54:01 +00:00
Colin Cross
0239edea1d Merge changes I3bafbb2d,If30943ef
* changes:
  Desugar default methods if required
  Fix desugaring when LOCAL_SDK_VERSION is not set
2017-10-27 01:40:15 +00:00
Colin Cross
98caed6e7f Fix desugaring when LOCAL_SDK_VERSION is not set
When LOCAL_SDK_VERSION is not set, frameworks.jar is put
in the classpath for javac.  If it is also in the classpath
(as opposed to the bootclasspath) for desugar then desugar
tries to rewrite classes that implement interfaces with
default methods to contain calls to the generated companion
classes for those interfaces.  frameworks.jar will not
contain the companion classes, which causes proguard to
fail.

Move frameworks.jar to the bootclasspath, which matches more
closely with builds against the SDK stubs jars.

Also remove the static libraries from the classpath, they have
already been merged into the input jar.

Test: m checkbuild
Change-Id: If30943efcaea44b2db1b38a6c1d558113324757f
2017-10-26 13:09:07 -07:00
Søren Gjesse
2c48f8b97e Merge "Define proguard dictionary output for R8" am: 2f05802a78
am: 85a4b57d94

Change-Id: I8a8b130931cd15f4c9bf6181b16d158eef4dec18
2017-10-26 06:29:30 +00:00
Søren Gjesse
2f05802a78 Merge "Define proguard dictionary output for R8" 2017-10-26 06:08:43 +00:00
Colin Cross
71f13835f6 Merge changes I81796b45,Iaf585336 am: 437bbed858
am: aecdb6a3e5

Change-Id: Ica8bef18a5f0799b3339d1e6bfdc927e7f8ff5a1
2017-10-25 21:53:04 +00:00
Colin Cross
437bbed858 Merge changes I81796b45,Iaf585336
* changes:
  Desugar default methods if required
  Always raise proguard libraries
2017-10-25 21:44:18 +00:00
Søren Gjesse
4ab5b02e62 Define proguard dictionary output for R8
When running with R8 instead of Proguard + dx the proguard mapping is
produced together with the dex output.

Bug: 68249935
Test: m -j ahat-test
Change-Id: Ica5ef455eb3bd1eabe55c43e9e026f47cadace1c
2017-10-25 17:16:53 +02:00
Colin Cross
b5f25a257f Always raise proguard libraries
The platform build system doesn't have the concept of a "compile sdk
version", it uses the "min sdk version" throughout the compilation
process.  This means that no stage of the compilation process can
introduce references to APIs that do not exist in the selected
LOCAL_MIN_SDK_VERSION without causing problems.  Support library
worked around this by effectively making the "compile sdk version"
"current" when running proguard if support library was in the direct
dependency list.

Extend the support library hack everywhere, and always use "current"
or the full bootclasspath when running proguard.

Test: m checkbuild
Change-Id: Iaf5853361767f0ea3e9ad4ec908aadd72d639c79
2017-10-24 13:29:36 -07:00
Søren Gjesse
8347c5baef Merge "Added support for using R8 instead of Proguard + dx" am: 9047dce212
am: 6836c47b8b

Change-Id: I83dae746e1ee7d04fd10244203c42930643d185b
2017-10-24 06:50:11 +00:00
Søren Gjesse
0c1fe64ce8 Added support for using R8 instead of Proguard + dx
With this change building with USE_R8=true will run R8 instead of Proguard + dx
for all targets that have LOCAL_PROGUARD_ENABLED set. R8 (through the
compatproguard wrapper) will use the same options as Proguard for now.

Additional Proguard configurations for R8 can be added using LOCAL_R8_FLAG_FILES
on individual targets. This makes it possible to make configuration updates
without touching the Proguard + dx configuration

Test: m -j
Test: m -j USE_D8=true USE_R8=true
Test: m -j USE_D8=true USE_R8=false
Test: m -j USE_D8=true
Change-Id: I78e8a0fd17cc5cefedccffe95b93c94a60a727f1
2017-10-23 08:58:30 +02:00
Colin Cross
c5122aee9d Merge "Use system modules generated by soong when using javac -target 1.9" am: 58cd98dc47 am: 7c381d8015
am: 3541a96d76

Change-Id: I70c1cabb3fe7f3c34c54d9b360259229d7bb6243
2017-10-17 18:57:03 +00:00
Colin Cross
f960257c14 Use system modules generated by soong when using javac -target 1.9
Soong has support for building system modules.  Use the directories
produced by Soong with --system to replace -bootclasspath arguments
when using javac -target 1.9.

Since soong can't generate current SDK stubs yet, and no existing
SDK stubs need -target, only use -target 1.9 for modules that are
not compiling against the SDK.  That means in practice the only
system modules that will be used for now is the default one,
core-system-modules.

Bug: 63986449
Test: m -j EXPERIMENTAL_USE_OPENJDK9=true makes some progress
Change-Id: I350ef50aedf36fdd72458c23d4fe8a2edf1a9a02
2017-10-16 17:55:24 -07:00
Nan Zhang
29d28e58fb Merge "Support java compilation sharding for target side." am: 60e1f8ee27 am: 72165e0c29
am: bbc5a69fc5

Change-Id: I8c65cdeb4d1fc37f86a44c82f82bfe1a10440667
2017-10-13 07:31:27 +00:00
Nan Zhang
ad818dcbea Support java compilation sharding for target side.
Add "LOCAL_JAVAC_SHARD_SIZE" to represent the number of java
source path entries in each shard.

Sharding is not allowed when "LOCAL_JAVAC_SHARD_SIZE" and
"LOCAL_JAR_PROCESSORS" are both enabled.

Limitation:
1. 0 <= LOCAL_JAVAC_SHARD_SIZE <= 8192
1. 0 < NUM(java_sources) <= 8192
2. 0 <= NUM(shards) <= 100

Performance Compare:
<Unsharded Build------------------------------------------------>
1. Build from clean state
rm -r -f out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/
&& time m
out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar

real	1m2.720s user	5m26.604s sys	0m39.552s

2. Incremental build
m out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar &&
touch frameworks/base/core/java/android/net/http/HttpResponseCache.java && time m
out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar

real	0m37.586s user	5m47.804s sys	0m50.388s

<Sharded Build-------------------------------------------------->
1. Build from clean state
rm -r -f out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/
&& time m
out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar

Javac Shard Size: 50----real	1m10.163s user	25m59.008s sys	1m58.460s
Javac Shard Size: 100---real	1m2.115s user	21m3.600s sys	1m15.964s
Javac Shard Size: 150---real	0m59.520s user	18m10.544s sys	1m12.628s
Javac Shard Size: 200---real	0m56.894s user	15m39.244s sys	1m11.608s
Javac Shard Size: 250---real	0m55.991s user	14m38.716s sys	1m2.292s
Javac Shard Size: 300---real	0m55.114s user	13m6.568s sys	1m8.200s
Javac Shard Size: 350---real	0m53.144s user	12m7.740s sys	1m3.836s
Javac Shard Size: 400---real	0m54.929s user	12m9.324s sys	1m4.340s
Javac Shard Size: 450---real	1m30.194s user	25m31.468s sys	1m52.416s
Javac Shard Size: 500---real	0m53.976s user	10m35.500s sys	0m55.160s

2. Incremental build
m out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar &&
touch frameworks/base/core/java/android/net/http/HttpResponseCache.java && time m
out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar

Javac Shard Size: 50-----real	0m16.322s user	1m8.648s sys	0m31.700s
Javac Shard Size: 100----real	0m16.163s user	1m22.932s sys	0m29.440s
Javac Shard Size: 150----real	0m16.611s user	1m37.828s sys	0m21.168s
Javac Shard Size: 200----real	0m16.936s user	1m49.248s sys	0m28.636s
Javac Shard Size: 250----real	0m17.509s user	1m54.944s sys	0m32.768s
Javac Shard Size: 300----real	0m18.868s user	1m54.088s sys	0m28.824s
Javac Shard Size: 350----real	0m17.629s user	1m54.108s sys	0m31.056s
Javac Shard Size: 400----real	0m18.658s user	2m7.712s sys	0m30.636s
Javac Shard Size: 450----real	0m18.874s user	2m8.808s sys	0m33.540s
Javac Shard Size: 500----real	0m19.432s user	2m24.400s sys	0m30.368s

time m nothing:
real 0m5.799s user 0m7.236s sys 0m3.068s

Test: m clean && m -j checkbuild
Bug: b/67424047
Change-Id: Id0766d2b7de7c4546d29bbc7f8a0dd0e4b9ad45b
2017-10-12 13:23:06 -07:00
Treehugger Robot
b039cf792f Merge "Delete jack support" 2017-10-03 01:17:25 +00:00
Dan Willemsen
4def685881 Merge changes I7b2fc184,I71f6fcaf am: ea655a138f am: cd4d0d4cc3
am: 6da385ffe4

Change-Id: I4f4059752411a213f84f51c2d11726f9b4fda1b2
2017-10-02 21:05:59 +00:00
Dan Willemsen
cd4d0d4cc3 Merge changes I7b2fc184,I71f6fcaf
am: ea655a138f

Change-Id: Icd7c2390a0a35777bda0a93af534d6a4254fff9b
2017-10-02 20:46:14 +00:00
Colin Cross
69ced5de5e Delete jack support am: a6bc3a8a4c
am: 37bf2b1250

Change-Id: I19133aedbfe91f7cd49588b33f517dc4bb17b91c
2017-10-02 20:00:16 +00:00
Colin Cross
e673deb280 Delete jack support
Remove all support for running jack.

Bug: 65302138
Test: m -j checkbuild
Change-Id: I1ef87c88af3f2689f8b0dcf1a01c958b16159631
Merged-In: I1ef87c88af3f2689f8b0dcf1a01c958b16159631
(cherry picked from commit 5db5d31d73)
2017-10-02 11:15:19 -07:00
Colin Cross
a6bc3a8a4c Delete jack support
Remove all support for running jack.

Bug: 65302138
Test: m -j checkbuild
Change-Id: I1ef87c88af3f2689f8b0dcf1a01c958b16159631
Merged-In: I1ef87c88af3f2689f8b0dcf1a01c958b16159631
(cherry picked from commit 5db5d31d73)
2017-10-02 18:06:56 +00:00
Dan Willemsen
4d99527dcd Move generated aidl/logtags java classes to a subfolder
So that they can't be generated into src/, which would be added to the
source list automatically.

Bug: 36698184
Test: m telephony-common without this change, pass
Test: m telephony-common without the cleanspec, fail with dup class
Test: m telephony-common with the cleanspec, pass
Change-Id: I7b2fc1847d52ff4a9ba8c69e76123fe152629ef8
2017-09-29 20:36:50 -07:00
Colin Cross
e3248f5eef Merge "Respect LOCAL_MIN_SDK_VERSION for dx" am: a426e0e974 am: bf7020608f
am: 01b57501d8

Change-Id: I7ac0abdd8ee4a0fe0d4d60f05a967efcbbc59688
2017-09-29 20:28:23 +00:00
Colin Cross
9deb331f20 Respect LOCAL_MIN_SDK_VERSION for dx
Follow Jack's behavior for now and pass LOCAL_MIN_SDK_VERSION to
dx.  Don't pass it to desugar for now, desugar with low
--min_sdk_version numbers enables features we haven't verified
yet, and existing apps won't be using the new language features
that require extra desugaring.

Test: examine classes.dex from an app with LOCAL_MIN_SDK_VERSION
Change-Id: Ic7d679b1b11fba98a33418a4f79d4762a91f1f9c
2017-09-28 21:40:35 -07:00
Colin Cross
ec346cf1fd Merge changes I06179fca,Ie48746c8,Ia47ebc95 am: b182ea7bcb am: 2c717745b2
am: 1e7f83bf49

Change-Id: I538de57657bfc334dc6d3d24b22baccb01d9b0d5
2017-09-27 02:48:39 +00:00
Treehugger Robot
b182ea7bcb Merge changes I06179fca,Ie48746c8,Ia47ebc95
* changes:
  Disable turbine for unbundled builds
  Allow disabling turbine
  Simplify the *-lib-* functions
2017-09-27 02:36:24 +00:00
Colin Cross
7dc9043546 Allow disabling turbine
m -j TURBINE_ENABLED=false will build without turbine.  This is
primarily useful for A/B comparisions of turbine builds, but will
also be used to temporarily disable turbine for unbundled builds
until we have turbine prebuilts.

Bug: 64308460
Test: m -j TURBINE_ENABLED=false java
Test: m -j java
Change-Id: Ie48746c8bfc60c361be9634cb1805ca1c09aa1fe
2017-09-26 16:23:00 -07:00
Dan Willemsen
f031150a03 Merge "Only define proguard dictionary as output if obfuscating" am: 96a782f1ea am: 13c0785b09
am: 73acd38175

Change-Id: Iea98bc51e8dbeba0cb15ec460d5dda9db481b133
2017-09-26 21:55:49 +00:00
Treehugger Robot
96a782f1ea Merge "Only define proguard dictionary as output if obfuscating" 2017-09-26 21:45:28 +00:00
Dan Willemsen
bdd6a756d1 Only define proguard dictionary as output if obfuscating
If we're not obfuscating, proguard doesn't generate the mapping file,
and ninja will consider the edge dirty, since one of the output files
does not exist.

Also disable it for jack, since jack writes to a different file.

Bug: 66929996
Test: m cts; m cts
Test: m ahat-test with a clean build
Change-Id: Iff6707c44cbd86cd9328bbad8322398bc9d960fd
2017-09-26 13:01:49 -07:00
Colin Cross
b0d243f336 Merge changes from topic "bootclasspath_default_libs" am: e58881ac38 am: df0c2fd298
am: 665dce738a

Change-Id: Ieb69b355cc0ad74af7ea58ccbbdb36254633f05d
2017-09-26 01:27:26 +00:00
Colin Cross
8547be2e38 Add dependencies on bootclasspath libraries am: 1d1e5ef61b am: fa4d9fbfdd
am: c70fcc848c

Change-Id: I0572197334015acc14bc2f43031ba3467228171a
2017-09-26 01:27:18 +00:00
Colin Cross
b541aae17c Remove duplication of bootclasspath in LOCAL_JAVA_LIBRARIES
The bootclasspath libraries have direct dependencies now, so
remove them from LOCAL_JAVA_LIBRARIES so they don't also end
up in the classpath.

Test: m -j checkbuild
Test: m -j ANDROID_COMPILE_WITH_JACK=true java
Test: manually inspection of build-${TARGET_PRODUCT}.ninja
      only has expected changes
Test: no changes to system.img
Change-Id: Icbc8987468f237aa351708b33c3abe5ea3d1816e
2017-09-25 16:15:10 -07:00
Colin Cross
1d1e5ef61b Add dependencies on bootclasspath libraries
The libraries in the bootclasspath were getting their dependencies
because they were also in the default libraries list.  Make the
dependencies explicit in preparation for rearranging the default
libraries.

Test: m -j checkbuild
Change-Id: I3ea004714a31cd648ec2ef57ed3099bce70bc6b9
2017-09-25 16:14:42 -07:00
Miao Wang
1d6d78ef38 Merge "Correctly set the linker search path for libm and libc." am: b463cdc874 am: 6062710fed
am: e277ce63f8

Change-Id: Ib34fe4f4f47f68cbdf0271c61f5102b35a4db9f0
2017-09-23 00:48:05 +00:00
Miao Wang
28e78f4600 Correctly set the linker search path for libm and libc.
- ndk/r10 is removed, we need to use SOONG ndk stubs instead.
  - Use MIN_SUPPORTED_SDK_VERSION instead of hard coded version 9 for
    32 bit compilation.

Bug: 38342163
Test: mm
Test: make -j40 FORCE_BUILD_RS_COMPAT=true RSTest_Compat
Change-Id: I9549446cb7f8faee8842b06f096d035535dc7f3d
2017-09-22 14:57:02 -07:00
Richard Uhler
d7551bd0fa Merge "Proguard implicitly generates a proguard_dictionary" am: 58e0b8c0a3 am: b1fe04371b
am: f71eea848b

Change-Id: Ie9c91ed5f4dc94757bafb1c2ae97d63afe06fb35
2017-09-22 08:33:28 +00:00
Richard Uhler
58e0b8c0a3 Merge "Proguard implicitly generates a proguard_dictionary" 2017-09-22 08:23:52 +00:00
Richard Uhler
b32775a9b5 Proguard implicitly generates a proguard_dictionary
Use .KATI_IMPLICIT_OUTPUTS to convey as such.

This is to support a use case for building platform/art/tools/ahat,
which depends on the generated proguard_dictionary for running tests.

Test: m
Test: m ahat-test with relevant changes from clean build.
Change-Id: Ic8f3b6819cfd4cd18620a2eaafd80d672fde8f5c
2017-09-21 10:53:09 +01:00
Nan Zhang
c128894560 Merge "Move private_manifest file insertion to jars merging phase." am: 3d6aaa2f56 am: d43952b8f8
am: abbb6a1fa1

Change-Id: I3fa4dd88b143119aa5692a437a9da6e9aa535542
2017-09-21 03:26:18 +00:00
Nan Zhang
b88011768d Move private_manifest file insertion to jars merging phase.
By doing this, the change of private_manifest file won't trigger
Javac to re-run during re-build.

Bug: b/65455145
Test: m clean && m -j32
Change-Id: Ib90d56daf0be5f31b51e07b7714a933bc5cf4496
2017-09-20 14:56:48 -07:00
Nan Zhang
6cdb1f8bc7 Merge "Use merge_zips to merge jars during Java build in Make." am: 39bbfe217a am: d9001d2733
am: 177e7ffb20

Change-Id: I2178aa1eb4a0e74a3057758f4651ad569bdd6257
2017-09-20 20:00:46 +00:00
Nan Zhang
39bbfe217a Merge "Use merge_zips to merge jars during Java build in Make." 2017-09-20 19:48:27 +00:00
Nan Zhang
9bd540594d Use merge_zips to merge jars during Java build in Make.
1. Use merge_zips to merge jars without unzipping/rezipping static Java
libraries. And seperate merging process as a independent Make target so
that Javac can only depend on Turbine.

2. Remove duplicate vars: "full_java_lib_deps" in droiddoc.mk

3. Also use classes-header.jar for link_apk & link_instr

Bug: b/65455145
Test: m clean && m -j32

Change-Id: I7b0307664a6b86075c983284fce099bd3946318c
2017-09-19 18:49:33 -07:00
Colin Cross
1fe8e3c66d Merge "Move jacocoagent into the bootclasspath" am: 68dad73d34 am: a6af8ef91f
am: e9a7688567

Change-Id: I8941916da85a2c221c5ac7d6bb5217bd9b79baef
2017-09-18 20:32:10 +00:00
Treehugger Robot
68dad73d34 Merge "Move jacocoagent into the bootclasspath" 2017-09-18 19:57:53 +00:00
Nan Zhang
0d3dcc62c7 Merge "Move classes.jar generation right below JarJar phase." am: 729a221a16 am: 32fc9a5c46
am: 46010dda39

Change-Id: Iea2acd5e5fc736ef933b1d50e1ca39c7c7890e19
2017-09-15 22:47:03 +00:00
Colin Cross
69b7f3f0b1 Move jacocoagent into the bootclasspath
Move jacocoagent out of core-libart and into its own jar on the
bootclasspath.

Test: m -j EMMA_INSTRUMENT=true
Test: https://android-build.googleplex.com/builds/view-workplan?viewType=Table&workplanId=L19400000103297394&nodeType=Trybot
Change-Id: I9e6e3dc59dba8b93685d59b258d4ebc7835eab8b
2017-09-15 22:27:35 +00:00
Nan Zhang
870025f89b Move classes.jar generation right below JarJar phase.
By doing this, we don't need run desugar/Jacoco/proguard twice for
static java libraries(one for their self build, another for downstream
dependents).

Test: m clean && m java
Bug: b/65455145
Change-Id: I87aee34940937dbde33a977f55d1faf2c8054561
2017-09-14 14:44:40 -07:00
Nan Zhang
d1bbc2b26c Merge changes from topic "turbine" am: 872246de0f am: fa8b66f5cc
am: 5d52f85261

Change-Id: I6e71c2e2874bba64f2105c8cf26647ae5c9af25b
2017-09-01 00:37:45 +00:00
Nan Zhang
b3ec534bd1 Revert "Revert "Add Turbine as part of java build toolchain in Make.""
This reverts commit 33dcd0c5eb.

Reason for revert: <stub.jar.toc needs classes.jar.toc which is no longer existed after Turbine was introduced. So use classes.jar to represent stub.jar.toc>

Bug: b/64308460
Test: m clean && time m -j32 ANDROID_COMPILE_WITH_JACK=true
Change-Id: If618993f1e0c789d93cc15664212603f994fd460
2017-08-31 14:56:54 -07:00
Colin Cross
9a594e05af Remove GLOBAL_JAVAC_DEBUG_FLAGS
GLOBAL_JAVAC_DEBUG_FLAGS is no longer set, -g is already included
in the javac command line.  Jack is on its way out, just use -g
directly there for now.

Test: m -j checkbuild
Change-Id: Ib99c248bbb8b65fa2cd2b55449a502fc20deffa8
2017-08-31 14:48:31 -07:00
Nan Zhang
3b202bde3f Merge "Revert "Add Turbine as part of java build toolchain in Make."" am: 91ffbf2fbe am: 2c82a22d96
am: 40403cdded

Change-Id: Ib9a5a8506bb85b6582421ed20fa1c11d9aba4375
2017-08-31 20:47:54 +00:00
Nan Zhang
33dcd0c5eb Revert "Add Turbine as part of java build toolchain in Make."
This reverts commit 0739155c86.

Reason for revert: <sdk_google_aw_x86-sdk (linux) build 4310016 in git_master is broken>

Change-Id: I525d48557bd0425917e61a85f596663ccc63c887
2017-08-31 19:56:59 +00:00
Nan Zhang
672898977f Merge "Add Turbine as part of java build toolchain in Make." am: 0b23748128 am: 2764a16085
am: 3c30f84e2d

Change-Id: I3e42a07747ffb09b10ab07785d761ddc84574ae0
2017-08-31 18:25:44 +00:00
Nan Zhang
0739155c86 Add Turbine as part of java build toolchain in Make.
1. Bundle static_java_header_libs during turbine-classes.jar if
necessary. This can be improved if we have the ability to merge jars on
the fly.

2. Copy sdk/stubs-classes.jar to sdk/stubs-classes-header.jar, and Use
.KATI_RESTAT to cut un-necessary targets rebuilt.

3. Copy prebuilt-classes.jar to prebuilt-classes-header.jar since
Turbine doesn't apply to prebuilt.

4. Run jarjar after Turbine compilation, otherwise downstream targets
won't find corresponding symbols.

5. Change classes.jar in -classpath used in Desugar to
classes-header.jar.

6. Change legacy-libs in Proguard from classes.jar to
classes-header.jar.

7. Add .KATI_RESTAT for turbine-classes.jar, and remove IJAR.

8.boot.art is re-generated during the incremental rebuild since
javalib.jar got re-generated. Then boot.art re-triggered lots of
downstream targets to be rebuilt. So we add .KATI_RESTAT for javalib.jar
to prevent downstream to be rebuilt. The ziptime & commit-change-to-toc
operation for javalib.jar(small) didn't bring too much overhead when we build
from clean state.

Next step: specify static_java_header_libs in -classpath, and merge jars
at the end.

touch frameworks/base/core/java/com/google/android/util/Procedure.java &&
time m
time: 1m58s (794 -> 49 targets)

m clean && time m java
time: 9m34s

Bug: b/64308460

Test: m clean && m checkbuild

Change-Id: Iefcc234405b9f461b6882c06bba15e21fa783d28
2017-08-30 16:01:39 -07:00
Colin Cross
c1ca2cfbf4 Merge "Separate java source list generation into its own rule" am: f61712fbf1 am: bf386cafec
am: 1770c0cc2b

Change-Id: I4644762f6094922044c46be94ca5e368736db81a
2017-08-30 20:15:43 +00:00
Colin Cross
dfc45ec337 Separate java source list generation into its own rule
Move the java source list generation step into its own rule.  This
has a couple of advantages.  It consolidates the source list
generation so that it only has to run once for javac, jack, and
jack-check.  It also massively reduces the length of the javac
command line, so that error messages are significantly shorter,
and allows easily rerunning the failing build command because
the file list is still on disk.

The primary disadvantage is that javac error messages no longer
include the list of files passed to javac, but the list is
available earlier in the build long when the file list was written,
and is still available on disk.

Test: m -j javac-check
Change-Id: I9730b352b33a060e08221b61c11c617d23320d67
2017-08-29 16:50:11 -07:00
Narayan Kamath
bfd42129d3 Merge "dex_preopt: Use the unstripped jar file for generating profiles." into oc-mr1-dev
am: afb81de1f2

Change-Id: I1795eb230b2c3388b5c2daa8a710d6e1c678b418
2017-08-29 08:52:59 +00:00
Narayan Kamath
bbcdc07d12 dex_preopt: Use the unstripped jar file for generating profiles.
We were previously using LOCAL_BUILT_MODULE, which wouldn't work in the
case that "nostripping" wasn't specified (i.e when we stripped).

The issue is that the built module has its classes.dex entry stripped,
which means that profman can't do anything meaningful with it.

In this change, we use the right set of files for JAVA_LIBRARIES as well
as prebuilt PACKAGES. Fixing apps built from source is a larger task and
has been left for a future change. Depending on ART changes, we might
need to disable stripping for all apps and/or align userdebug and user
builds with each other. This will be tackled separately.

Test: make
Bug: 64896089
Change-Id: I4fd256d187b66763f354cc6001953469c2cd8fbb
2017-08-24 11:31:03 +01:00
Colin Cross
604a2423b6 Merge "Sort files in directories passed to jar"
am: 966ed15a1d

Change-Id: If01ba7d294e4308a28580b157b9efdb6c860bb35
2017-08-17 01:00:13 +00:00
Colin Cross
128800f2c8 Sort files in directories passed to jar
jar -C <dir> . produces a jar containing files in filesystem order,
which can vary between builds.  Manually find and sort the list of
files, and convert them into a list of -C <dir> <file> pairs.

Fixes: 64634025
Test: m -j checkbuild
Test: m -j out/target/product/sailfish/system/framework/ext.jar, check
      that entries are sorted
Test: m -j out/target/product/generic_arm64/system/framework/ext.jar on mac
Change-Id: I7dced6acbe621a60cd49daf17872941485602732
2017-08-16 13:37:00 -07:00
Colin Cross
4cea760106 Merge "Revert "Use dx.jar directly""
am: c7e3e962f8

Change-Id: Icd5402f7cc789224753537c070a91cbf6267ee66
2017-07-18 07:14:26 +00:00
Treehugger Robot
c7e3e962f8 Merge "Revert "Use dx.jar directly"" 2017-07-18 07:08:19 +00:00
Colin Cross
e44e75aa89 Revert "Use dx.jar directly"
This reverts commit e37a3c959a.

Reason for revert: breaks art test runner

Change-Id: Ice0cd3020ddec7f31eb789867a45f047a75a05d0
2017-07-18 05:22:59 +00:00
Colin Cross
4828fcad41 Merge "Use dx.jar directly"
am: c68434c971

Change-Id: Ief2c88d3ba0e93c7eb7bb9db0ac2b0a0b886bcea
2017-07-17 20:45:31 +00:00
Jeff Gaston
6264b662f3 Merge "Update to latest jacoco usage"
am: 483fae7430

Change-Id: Ibc94d5ba6db7690441825dd655b6cb26d989b78d
2017-07-17 20:44:10 +00:00
Colin Cross
c68434c971 Merge "Use dx.jar directly" 2017-07-17 20:40:13 +00:00
Jeff Gaston
483fae7430 Merge "Update to latest jacoco usage" 2017-07-17 20:36:39 +00:00
Colin Cross
06f8dec6e0 Merge "Fix LOCAL_JAR_PROCESSOR dependency"
am: 126e625fed

Change-Id: Ibe2786aa8853ea34513903728ae06fb5c5c39101
2017-07-14 23:10:57 +00:00
Jeff Gaston
aaae43cd24 Update to latest jacoco usage
Bug: 36792868
Test: EMMA_INSTRUMENT_STATIC=true m -j

Change-Id: I419b543283b52be9a72f5c6b10e4cbea68782174
2017-07-14 13:04:05 -07:00
Colin Cross
89b802b994 Fix LOCAL_JAR_PROCESSOR dependency
The LOCAL_JAR_PROCESSOR rule should depend on the path to the
processor jar and not the module name.

Test: m -j && m -j
Change-Id: I5ebd4cd3ad4429918edfd0a8cb5cb9a4e7e86ca7
2017-07-13 19:25:47 -07:00
Colin Cross
e37a3c959a Use dx.jar directly
Use $(JAVA) to invoke dx.jar instead of the dx wrapper script.
Also allow the dx command line or the dx jar to be specified on
the command line.  Allows better dependencies on dx.jar, and
doesn't rely on having java on the path.

Bug: 62956999
Test: m -j checkbuild
Change-Id: I5f265132690ad28b3139954fea44eb0c4a43393a
2017-07-07 13:34:33 -07:00
Przemyslaw Szczepaniak
8c485b6b0c Merge "Enable stripping of java debug information when required."
am: d659f806e5

Change-Id: I25facf64b176ae26db07d43cef92c522bf92e79a
2017-07-07 15:29:40 +00:00
Treehugger Robot
d659f806e5 Merge "Enable stripping of java debug information when required." 2017-07-07 15:24:32 +00:00
Przemyslaw Szczepaniak
2e81b3c49f Enable stripping of java debug information when required.
We're removing LocalVariableType / LocalVariableType in order to
save space. Enabling stripping reduces AOSP  image size save
by ~12MB.

Bug: 38224820
Test: CtsLibcoreTestCases
Change-Id: I3168d73ec6825aa5879db7e1135d7ed61d488d72
2017-07-06 08:31:14 +00:00
Colin Cross
e885ccf0df Merge "Provide make variables for java binaries"
am: 5e19557eb9

Change-Id: Ib1be7da98214e3b6c27867b80005e18cc68a0d33
2017-07-01 01:36:14 +00:00
Colin Cross
0851df8c82 Provide make variables for java binaries
Replace java -> $(JAVA), etc. to prepare for moving java binaries
out of the path and using full paths to them.

Test: builds
Bug: 62956999
Change-Id: I5dfcd0d4e855ecde69cd127169e9545e59723d12
2017-07-01 01:03:14 +00:00
Paul Duffin
b61544dd73 Merge "Add junit/textui/** to the proguard filter" am: 3b3bffc0d0
am: 5022a346c7

Change-Id: I5ba99c3e20a0aeee1c8a6c5bd6119a1615112cb5
2017-06-15 09:12:50 +00:00
Paul Duffin
54747a7f09 Add junit/textui/** to the proguard filter
Fixes build breakage caused by having duplicate versions of
a class in the application and in the API. This workaround will
be removed once junit classes have been removed from the API.

Bug: 30188076
Test: make Browser2 ANDROID_FORCE_JACK_ENABLED=disabled
Change-Id: I9a9031d3ef6d82f35413b229d588a605f9ed39dc
2017-06-15 08:42:23 +01:00
Colin Cross
a1b843c2b6 Merge "Add LOCAL_JAR_PROCESSOR" am: 9f52f0d17d am: abcbe9ab86
am: dcc9240a71

Change-Id: I21ecc09b9f5678746b8bb02056583f10e90e71ee
2017-05-23 02:12:43 +00:00
Colin Cross
f8a49c5a37 Add LOCAL_JAR_PROCESSOR
Allow using a host java library as an intermediate processor step
after javac but before desugar, proguard, or dx.

Test: manual
Change-Id: I7fb843e10d96c0167f6e4371582fabcc1454521f
2017-05-22 17:30:13 -07:00
Paul Duffin
29cdd2d433 Merge "Add c/a/i/u/* to the list of injar filters" am: 9198da8c21 am: 23eb5019bc
am: c4977665f1

Change-Id: I5673a8604c4fbfe4efaedd750863d5a757e33977
2017-05-15 15:54:51 +00:00
Paul Duffin
e949585a62 Add c/a/i/u/* to the list of injar filters
Previous change that moved com.android.internal.util.Predicate
to the legacy-android-test JAR caused a proguard build breakage
due to duplicate classes in the application and library. This
fixes it in the same way as previous issues with junit and
android.test classes were resolved by excluding those classes
from the application JAR.

Bug: 30188076
Test: make checkbuild and make -j ANDROID_FORCE_JACK_ENABLED=disabled checkbuild
Change-Id: Ica0089607187f970251ddba339a1f71d4cad80cc
2017-05-15 15:17:55 +01:00
Colin Cross
5730186686 Merge "Make javac checkbuilds match jack" am: cb8077df16 am: 9f1e58aab9
am: 2e2758b69d

Change-Id: I7d62da41492c2a4aae39d5f29b9b6086be9f58e6
2017-05-02 23:10:30 +00:00
Colin Cross
761d673df4 Merge "Support LOCAL_JACK_ENABLED := javac_frontend" am: 64ed2f2478 am: d6a3273faa
am: eb2457b89e

Change-Id: I98104d161dcc709a764cb86750d3217538863fdb
2017-05-02 18:15:12 +00:00
Colin Cross
9eff830fa2 Make javac checkbuilds match jack
Building all java to dex is very slow.  Make javac checkbuilds act
like jack checkbuilds and only build to class files for unused
modules, and add a java-dex target that can be used to build
everything to dex.

Test: m -j checkbuild
Change-Id: Idcf9c9e0223b9dd88aaa53beb0cb50a230034b0f
2017-04-28 13:39:16 -07:00
Colin Cross
b17f285169 Support LOCAL_JACK_ENABLED := javac_frontend
Allow working around Jack bugs by using javac to compile *.java
to class files, and then pass through Jack for desugaring,
proguarding, and dexing.

Also make ANDROID_COMPILE_WITH_JACK=false override LOCAL_JACK_ENABLED.

Bug: 37483961
Test: m -j checkbuild
Test: Add LOCAL_JACK_ENABLED := javac_frontend to a target
Change-Id: I2189055aac9deccc36b8eab8e949796dddadf7a1
2017-04-28 13:39:12 -07:00
Colin Cross
bb7ba04031 Merge "Filter and colorize javac output V3" am: c8387929d1 am: f4ef1db272
am: 2f1488ae86

Change-Id: I73b5ca7a919c299aa062e5814f9f6b165f8c6527
2017-04-18 23:13:27 +00:00
Colin Cross
5f89212e24 Filter and colorize javac output V3
Add soong_javac_wrapper to all javac commands. soong_javac_wrapper
colorizes javac output, and hides noisy messages.

Previously attempted in I7e8fcd2e4e1ed3ff530a8ccfe931ceb7e411e0ad
and I449a61ed2c95b3e1afd51a31a11baab15d97e2f2.

Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I9d7a20d766fadab323a4cf95e5734741b3f578bb
2017-04-18 21:04:58 +00:00
Colin Cross
e8ee68bb9b Support java annotation proccessors
The codebase is growing more uses of annotation processors,
through a mixture of LOCAL_ADDITIONAL_DEPENDENCIES and
LOCAL_JACK_FLAGS.  Add LOCAL_ANNOTATION_PROCESSORS and handle
the rest in the build system.

For now we also need LOCAL_ANNOTATION_PROCESSOR_CLASSES to
work around bad behavior in grok (b/25860419).

Test: m -j java
Change-Id: I465b021e65d25ed3ea517333a82ec4ebd63fc038
(cherry picked from commit cde14987ba)
2017-04-11 12:22:53 -07:00
Colin Cross
cde14987ba Support java annotation proccessors
The codebase is growing more uses of annotation processors,
through a mixture of LOCAL_ADDITIONAL_DEPENDENCIES and
LOCAL_JACK_FLAGS.  Add LOCAL_ANNOTATION_PROCESSORS and handle
the rest in the build system.

For now we also need LOCAL_ANNOTATION_PROCESSOR_CLASSES to
work around bad behavior in grok (b/25860419).

Test: m -j java
Change-Id: I465b021e65d25ed3ea517333a82ec4ebd63fc038
2017-04-11 09:56:09 -07:00
Colin Cross
5e58793731 Add support for LOCAL_ERROR_PRONE_FLAGS
This will allow individual modules to enable error prone checks
as needed so that the change to treat an error prone check as a
compiler error can be done atomically with the changes to fix
the issues that check reveals.

Tested with the following steps, cleaning up the targets in
between to ensure that it was rebuilt everytime.

Set LOCAL_ERROR_PRONE_FLAGS := -Xep:ClassCanBeStatic:WARN
compiler error in junit-params-test target. Built
javac-check-junit-params-test with RUN_ERROR_PRONE=true to make
sure that compilation failed.

Built the javac-check-junit-params-test without RUN_ERROR_PRONE
set to make sure that the flag is not included unless explicitly
requested.

Built the junit-params-test as normal to make sure it still
worked properly.

Bug: 31507496
Test: See above
Change-Id: I88b5800dacd0e30dd9dcfa5f42e89d1428957365
Merged-In: I88b5800dacd0e30dd9dcfa5f42e89d1428957365
(cherry picked from commit 3ca9298d99)
2017-04-07 17:46:40 -07:00
Colin Cross
5cc452de64 Merge "Fix duplicate and dangling rules" am: f9f8b21af3 am: 50d2ffdfe3
am: 348d20bcce

Change-Id: I495a6d0a8c733c942248e1d378c9f660e1cc7322
2017-04-06 20:07:31 +00:00
Colin Cross
96476c1d50 Fix duplicate and dangling rules
I6730e2d3ec38004874265b2a690442dec57b33f4 introduced duplicate rules
to build classes.jar for static java library prebuilts, and left rules
to copy $(built_dex_intermediates) to $(built_dex) for modules that
don't build dex files.

Move prebuilts LOCAL_BUILT_MODULE back to javalib.jar to match
non-prebuilt modules, and remove the manual building of javalib.jar.

Add a check around $(built_dex_intermediates) for static java libraries.

Bug: 36901093
Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I291510b56162f0d35553e3c7ccd59b1382224d62
2017-04-06 10:23:04 -07:00
Colin Cross
99c83f2bda Merge "Rearrange java library outputs" am: 7b7363fffb am: a4435a5025
am: 09018269a8

Change-Id: I35b5527c4142f9486c6d57498789ba2249d0a4a3
2017-04-06 15:52:26 +00:00
Colin Cross
1ed4235172 Merge "Move proguard before classes.jar" am: 41d5cd7420 am: c40073c77f
am: 6ade789f59

Change-Id: I9ac539f18a998c3a85960526a77cfdebef9ca641
2017-04-06 02:50:55 +00:00
Colin Cross
941b682099 Rearrange java library outputs
Jack can silently handle using a java library as a static java
library by merging in the java library dex file.  This causes
problems when switching to javac, because dex doesn't support
dex merging with multidex enabled?

Make the output files consistent between java libraries and static
java libraries.  Java libraries will now produce:
classes-pre-proguard.jar: the classes before proguard processing
classes.jar: the final jar file containing classes before dexing
javalib.jar: a jar containing classes.dex

Static java libraries will eventually only produce
classes-pre-proguard.jar and classes.jar.  All inter-library
linking is done with classes.jar, so a java library can be
used as a static java library.

There are too many dependencies outside the build system that
expect javalib.jar to exist for static and host java libraries,
so for now continue to build a javalib.jar that is a copy of
classes.jar.

Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Test: m -j java
Bug: 36901093
Change-Id: I6730e2d3ec38004874265b2a690442dec57b33f4
2017-04-05 18:04:37 -07:00
Colin Cross
950f1efbbc Move proguard before classes.jar
Downstream users of a library always link against javalib.jar, which
is either the dex jar for java libraries or a copy of
proguard.classes.jar for static java libraries.  In preparation for
making java libraries a superset of static java libraries, make
classes.jar always be the final class-containing jar for use
downstream, and always create a classes-pre-proguard.jar for
users that need a jar without shrinking or obfuscation.

Also rename the intermediates to be consitent: classes-<tool>.jar

Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Change-Id: I3df8b9a4edcd5db996f1fedc54c8a782d4f36a92
Merged-In: I3df8b9a4edcd5db996f1fedc54c8a782d4f36a92
(cherry picked from commit 6fabefa88e)
2017-04-06 00:46:23 +00:00
Colin Cross
d75f928450 Merge "Optimize out extra jar copies" am: 678c77d9af am: cad1043266
am: bc46ba1b98

Change-Id: I8f396b1b14cd0e5b4b5a436473c42b046ecfa527
2017-03-31 04:58:06 +00:00
Colin Cross
0e53734035 Optimize out extra jar copies
Don't copy jar files for disabled stages.  Instead, set the name of
the output to the name of the input so the next stage will directly
pick up the output of the previous stage.

Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Change-Id: Ib7268cbff7ea7ff2ad2caf994aa145e1b7a12b83
2017-03-30 19:35:15 -07:00
Colin Cross
52573ac615 Merge "Revert "Revert "Revert "Add soong_javac_filter to all javac commands"""" am: df69a927d8 am: e088c648c7
am: af35fe9424

Change-Id: I067770d5129653c8502a5db020d963f1a0d8b43b
2017-03-30 01:06:21 +00:00
Treehugger Robot
df69a927d8 Merge "Revert "Revert "Revert "Add soong_javac_filter to all javac commands"""" 2017-03-30 00:53:06 +00:00
Colin Cross
fc8ead6609 Revert "Revert "Revert "Add soong_javac_filter to all javac commands"""
This reverts commit 440079b84b.

Adding the pipe interferes with error codes, which results
in an empty classes-full-debug.jar output file being left
after the failure.  The next build sees the output file with
an up-to-date timestamp and doesn't rerun the failing rule.

Bug: 36666657
Change-Id: I6658edb766d8ba3120f88e3d8d6eda6ea6c691da
2017-03-29 21:01:24 +00:00
Colin Cross
7a43b1edc3 Merge "Desugar when javac version is 1.7" am: ed44a54991 am: ce9dfdeee6
am: 937d276bed

Change-Id: I19430809cf5cf77fc4876d0ddee00bd4ddc4ff12
2017-03-23 03:02:54 +00:00
Colin Cross
200951bdb7 Desugar when javac version is 1.7
Modules compiled with javac 1.7 may have LOCAL_STATIC_JAVA_LIBRARIES
pointing to jars that contain code compiled with javac 1.8, and may
need desugaring.

Test: m -j ANDROID_COMPILE_WITH_JACK=false checkbuild
Change-Id: I470fc0a2fba51179a3ef95986cb3030194cd8f1c
2017-03-22 18:37:53 +00:00
Colin Cross
09e82eb89a Merge changes I0508b2cc,I3d6bbc36 am: 767cb900a1 am: 235e342639
am: 916de9606b

Change-Id: I824c89dc8f10912c60313023e5e1eecd610f36e3
2017-03-21 19:44:13 +00:00
Colin Cross
31060fdde1 Don't desugar static java libraries
Static java libraires are designed to be included in another
java library.  If desugar runs on the static java library,
the resulting jar will contain the desugared lambda classes.
When the static jar is included into another java library
and desugar runs again, it desugars the static java library
classes again, producing the same desugared lambda classes
and colliding in the final jar.

Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I0508b2cc9c56dbbd4ac0aba44fb99ea2a27715e0
2017-03-21 10:23:45 -07:00
Colin Cross
8b0034c435 Merge "Pass min sdk version to dx and desugar" am: bbad7c3e1f am: 4a4325d313
am: 14fce4b072

Change-Id: If9ac3b69957689bd451fc97fe968d79f42a751e9
2017-02-23 18:24:46 +00:00
Colin Cross
bbad7c3e1f Merge "Pass min sdk version to dx and desugar" 2017-02-23 18:18:38 +00:00
Colin Cross
91c4804673 Merge "Don't duplicate default platform libraries into proguard flags" am: f7b6bf8cb1 am: c432176a09
am: 58dfc7dc0f

Change-Id: I5873f9b327f41c78d6694f06e4cedaed0e64ba3d
2017-02-23 02:28:56 +00:00
Colin Cross
f7b6bf8cb1 Merge "Don't duplicate default platform libraries into proguard flags" 2017-02-23 02:12:27 +00:00
Colin Cross
5118a25bd9 Don't duplicate default platform libraries into proguard flags
Test: builds
Change-Id: Ib972d954972614f3e6ce522c58fce06beeda3cea
2017-02-22 14:37:03 -08:00
Colin Cross
536ef4e35a Pass min sdk version to dx and desugar
Test: make checkbuild
Change-Id: Idde9712508571ea623126c7d25d2fa67eccf4833
2017-02-22 11:10:37 -08:00
Paul Duffin
472055eebc Merge "Filter JUnit and android.test classes from applications using proguard" am: 38a231d6c3 am: 3e93d553ec
am: 6c99b4bc49

Change-Id: If3985352b27f1de5ea1e9d8c6834c08f5dbcb34f
2017-02-22 12:24:55 +00:00
Paul Duffin
f22aca1e47 Filter JUnit and android.test classes from applications using proguard
The new javac/desugar/proguard/dx based toolchain can fail if
there are duplicate classes in the -injars and -libraryjars
passed to proguard. That causes problems for b/30188076 which
is attempting to remove various junit and android.test classes
from the API because it requires the changes to add those
classes statically to applications are submitted simultaneously
with the change to remove the classes from the API which is not
feasible.

This change simply causes Proguard to ignore the classes from
the application JAR so it will always use them from the library.
That allows the changes to be done separately and only requires
that this change is reverted simultaneously with the change to
update the API.

Bug: 30188076
Test: make checkbuild and make -j ANDROID_FORCE_JACK_ENABLED=disabled checkbuild
Change-Id: I6ed6c45a159d6261d90245551aa2913cc82d2e8b
2017-02-21 13:11:13 +00:00
Colin Cross
348522fabf Merge "Revert "Revert "Add soong_javac_filter to all javac commands""" am: 29f3642dd1 am: 58ffd38f97
am: 77b7e12e25

Change-Id: I7a62df5e9eca3304ec753ea887b8d7b01ce938f4
2017-02-20 07:08:53 +00:00
Colin Cross
440079b84b Revert "Revert "Add soong_javac_filter to all javac commands""
This reverts commit 52d2253ff9.

Test: pipe the grok build output through soong_javac_filter
Change-Id: I449a61ed2c95b3e1afd51a31a11baab15d97e2f2
2017-02-19 19:56:51 -08:00
Colin Cross
12389914c4 Merge "Disable building coverage with javac" am: 271b1f6521 am: 2f23c5caf7
am: ca54c6c24e

Change-Id: I7ac8dbab285f189262a57c5173c71370eb8ef100
2017-02-19 06:35:53 +00:00
Treehugger Robot
271b1f6521 Merge "Disable building coverage with javac" 2017-02-19 06:22:26 +00:00
Colin Cross
25a79dacd9 Disable building coverage with javac
Emma is unable to process framework.jar, and making framework
classes.jar depend on the emma output causes builds to fail when
emma is enabled.  Make classes.jar depend on the jarjar output
instead, bypassing emma for now.

Test: m -j EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true check-public-api
Change-Id: I861282292816e29ca27b67a3eef978d951c1a4dc
2017-02-17 23:47:26 -08:00
Colin Cross
c709c03e4f Merge "Build all the way to classes.dex for checkbuild" am: 41c7d8423b am: 9003bc7d4b
am: d186e1db6f

Change-Id: Ia040c655daf9c7649cd5e3732a67e346787786e5
2017-02-18 06:24:20 +00:00
Colin Cross
c957f4202c Merge "Add a desugar step between javac and proguard" am: 9e92c2fd18 am: e4381dcac2
am: d48f9252d5

Change-Id: If02fc7dcd4bdc06aee3ca35b70da5568e41f0f62
2017-02-18 06:23:56 +00:00
Treehugger Robot
41c7d8423b Merge "Build all the way to classes.dex for checkbuild" 2017-02-18 01:35:40 +00:00
Colin Cross
9e92c2fd18 Merge "Add a desugar step between javac and proguard" 2017-02-18 01:10:08 +00:00
Colin Cross
b176192db4 Merge "Revert "Add soong_javac_filter to all javac commands"" am: 6dd4debe74 am: cb78c50239
am: 4db7d2d72b

Change-Id: I131feafdee7549a1668f8a5ec220284d808cc608
2017-02-17 23:06:41 +00:00
Colin Cross
e1159f5b39 Build all the way to classes.dex for checkbuild
Test: m -j checkbuild
Change-Id: Ie1b7be01c9bbcf1a32399f19d050a93410bdb42b
2017-02-17 15:03:07 -08:00
Colin Cross
eac5ce4e97 Add a desugar step between javac and proguard
This enables support for lambdas by passing class files through the
desugar tool.

Test: m -j checkbuild tests cts
Change-Id: I14ec152355243fd67fe2f107ccbe67a1b4e7e262
2017-02-17 15:03:06 -08:00
Colin Cross
52d2253ff9 Revert "Add soong_javac_filter to all javac commands"
This reverts commit a341bf0f86.

Breaks grok builds that replace javac with another tool:
reading standard input: bufio.Scanner: token too long

Change-Id: I825587c465b05c1fbddb7794dc1c84f5f2c883d1
2017-02-17 22:53:42 +00:00
Colin Cross
9256be1822 Merge changes I7e8fcd2e,Ie12d743c am: 547f7393d7 am: 8283b186be
am: 7d8a028cd3

Change-Id: Ife691c9e00e766293e3648348e3c86b92f96fd56
2017-02-17 22:45:38 +00:00
Colin Cross
a341bf0f86 Add soong_javac_filter to all javac commands
soong_javac_filter colorizes javac output, and hides noisy messages.

Test: builds
Change-Id: I7e8fcd2e4e1ed3ff530a8ccfe931ceb7e411e0ad
2017-02-16 14:08:45 -08:00
Colin Cross
79e2f73b6c Re-enable dx support
This is a partial revert of commits:
858657366f Remove support of disabling Jack.
3ae7861252 Remove javac support in host dex rules.
22313f2b2a Remove rules for building dex with dx

Test: builds
Change-Id: Ie12d743cbe978bdeb030910848b67f5945a4fec8
2017-02-16 14:08:45 -08:00
Jean-Luc Brouillet
8471aa9d46 Merge "Move rs/scriptc to rs/script_api/include." am: a3ab4cc9c9 am: d9bfeff242 am: 235123a821
am: 128cebe6fe

Change-Id: I701bc6cb7cadb16d770b77e4a161994de278e142
2017-01-11 02:27:31 +00:00
Jean-Luc Brouillet
eba449391e Move rs/scriptc to rs/script_api/include.
Test: Compiled ImageProcessing_jb

Change-Id: Icf05a603671499665d2f31a8989fa69585a6f834
2017-01-08 17:57:48 -08:00
Dan Willemsen
a006925a03 Merge "Remove generated java source post clean logic" am: f57aa792c3 am: 5208e4f473 am: 5ae5671a3b
am: b585264834

Change-Id: Ic9d89893213616a13df5530f382fa2ec4d4e964e
2016-12-22 20:36:07 +00:00
Dan Willemsen
cf324af6b8 Remove generated java source post clean logic
Just move the proto and renderscript sources into their own directories
-- the entire directory is wiped if the file list changes since the
command line will change. So we can just enable/disable pulling sources
from those directories based on whether there were files in the list or
not.

Bug: 30947985
Test: m -j java
Test: Remove a proto file from a java lib, ensure the generated source
      is not included.
Change-Id: If7529979de6fa62a651933a3a974f47b033851d6
2016-12-22 10:37:31 -08:00
Joe Onorato
c05a8eec4b Add streaming proto option to the build system.
Test: make w/ other prereq changes
Change-Id: Ie8711878e244074a9a3c128467eeb4908c2ef008
2016-10-13 16:34:07 -07:00
Yohann Roussel
05485ef265 Fix bad JACK_PLUGIN variable am: 16243bdbec am: fa887390aa am: cbe1913c78
am: d52aacb821

Change-Id: I79d8299d4a4b81567a3f4d3b564bbb8813571bbd
2016-09-23 00:09:17 +00:00
Yohann Roussel
646f2121be Add support for Jack plugin am: 53b7fbbe78 am: be50693fc1 am: 62e67d1bff
am: cf65679d9e

Change-Id: I341b3b1708589999bba3bb3d5c49a37f5747dcd0
2016-09-23 00:09:08 +00:00
Paul Duffin
3ca9298d99 Add support for LOCAL_ERROR_PRONE_FLAGS
This will allow individual modules to enable error prone checks
as needed so that the change to treat an error prone check as a
compiler error can be done atomically with the changes to fix
the issues that check reveals.

Tested with the following steps, cleaning up the targets in
between to ensure that it was rebuilt everytime.

Set LOCAL_ERROR_PRONE_FLAGS := -Xep:ClassCanBeStatic:WARN
compiler error in junit-params-test target. Built
javac-check-junit-params-test with RUN_ERROR_PRONE=true to make
sure that compilation failed.

Built the javac-check-junit-params-test without RUN_ERROR_PRONE
set to make sure that the flag is not included unless explicitly
requested.

Built the junit-params-test as normal to make sure it still
worked properly.

Bug: 31507496
Test: See above
Change-Id: I88b5800dacd0e30dd9dcfa5f42e89d1428957365
2016-09-21 13:39:44 +01:00
Yohann Roussel
16243bdbec Fix bad JACK_PLUGIN variable
Changed to LOCAL_JACK_PLUGIN.

(cherry picked from commit 17924b136cb5bfc60d138e8c7e5c18a90b5965c3)

Test: Manually tested by some manual activations of the coverage plugin.
Change-Id: I1be4aaa502103fc308d35a5672dc4fe5900c4ebe
2016-09-21 10:54:42 +02:00
Yohann Roussel
53b7fbbe78 Add support for Jack plugin
And ensure compatibility with coverage plugin.

(cherry picked from commit 862bb84d37e3e6ca61080de58f206e512e09d4e0)

Bug: 28876950
Test: Manually tested by some manual activations of the coverage plugin.
Change-Id: I804558a501825357bf0812de626d2957eedbdc13
2016-09-21 10:53:45 +02:00
Paul Duffin
32bd0adf9c Add targets for building individual modules using javac
This is needed in order to be able to run error prone (which is
a plugin replacement for javac) on a subset of the java code.

Bug: 31507496
Test: Build javac-check-core-tests and check the resulting JAR
Change-Id: I5a556920572fcdad7b39d67e3f00fe0e0f1f8f46
2016-09-19 13:38:51 +01:00
Christopher Wiley
2ee4f68d38 Merge \"Fix typo in setting PRIVATE_MODULE for AIDL source\"
am: 05038d84dc

Change-Id: I3fb16f448c48e9e14fb4e7080c2955c3d38c6d11
2016-06-24 21:29:55 +00:00
Christopher Wiley
dc9e2675e6 Fix typo in setting PRIVATE_MODULE for AIDL source
Bug: 29619260
Change-Id: I59f883c1a92075800844cc2a77b307782a9ab800
2016-06-24 13:13:52 -07:00
Christopher Wiley
752860dcfc Merge \"Fix path escaping for aidl generated java\"
am: 7e918b6a46

Change-Id: I8e50a344d17c4585a725db95386ef6e0eb50fa58
2016-06-24 16:19:25 +00:00
Christopher Wiley
d9205ba17e Fix path escaping for aidl generated java
Bug: 29619260
Change-Id: I806044573661c61e691adf36a47092188db87ab6
Test: Generated java with ../ in paths appears in the right place.
2016-06-23 16:49:32 -07:00
Shinichiro Hamaji
b279eee2de Merge "Add normalize_path.py to prerequisites" am: 71211d8a0a
am: 99129ec4e3

* commit '99129ec4e3f44865cfa9957c3e9533dc77d8f494':
  Add normalize_path.py to prerequisites

Change-Id: I9c7e0d84e0b6ee36017180261af9a31c782058bf
2016-04-21 05:56:08 +00:00
Shinichiro Hamaji
71211d8a0a Merge "Add normalize_path.py to prerequisites" 2016-04-21 05:34:06 +00:00
Colin Cross
5cde746042 Make jack_check_timestamp depend on setup-jack-server
Some builds were failing with:
[  3% 2226/61362] /bin/bash out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/jack.check.timestamp.rsp
FAILED: /bin/bash out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/jack.check.timestamp.rsp
No Jack server running. Try 'jack-admin start-server'

While jack-admin was running concurrently:
[  3% 2226/61362] /bin/bash -c "(prebuilts/sdk/tools/jack-admin stop-server 2>&1 || (exit 0) ) && (prebuilts/sdk/tools/jack-admin kill-server 2>&1 || (exit 0) ) && (prebuilts/sdk/tools/jack-admin uninstall-server 2>&1 || (exit 0) ) && (prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.8.ALPHA.jar  2>&1 || (exit 0) ) && (mkdir -p \"/buildbot/dist_dirs/git_nyc-dev-mac-sdk_phone_armv7-sdk/2779793/logs/jack/\" ) && (JACK_SERVER_VM_ARGUMENTS=\"-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Dcom.android.jack.server.log.file=/buildbot/dist_dirs/git_nyc-dev-mac-sdk_phone_armv7-sdk/2779793/logs/jack/jack-server-%u-%g.log\" prebuilts/sdk/tools/jack-admin start-server 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update server prebuilts/sdk/tools/jack-server-4.8.ALPHA.jar 4.8.ALPHA 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-2.28.RELEASE.jar 2.28.RELEASE || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.26.ALPHA.jar 3.26.ALPHA || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.27.BETA.jar 3.27.BETA || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.30.BETA.jar 3.30.BETA || exit 47 )"
Stopping background server
Killing background server
No Jack server to kill
Removing jack server from "/Users/android-build/.jack-server"
Installing jack server in "/Users/android-build/.jack-server"
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/buildbot/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Dcom.android.jack.server.log.file=/buildbot/dist_dirs/git_nyc-dev-mac-sdk_phone_armv7-sdk/2779793/logs/jack/jack-server-%u-%g.log -cp /Users/android-build/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher

(cherry picked from commit febe2bcc21)

Change-Id: I406afc87b4f7dda49406c4e1674430d223914e8d
2016-04-20 09:36:45 +02:00
Colin Cross
4cfeeb95ad Merge "Make jack_check_timestamp depend on setup-jack-server" into nyc-dev
am: 816dd48

* commit '816dd481268cf08c521314798facc4a02578dd55':
  Make jack_check_timestamp depend on setup-jack-server

Change-Id: Ib0f452287a86d96b92ff52411baa58d1f11ebe0b
2016-04-20 02:55:00 +00:00
Colin Cross
febe2bcc21 Make jack_check_timestamp depend on setup-jack-server
Some builds were failing with:
[  3% 2226/61362] /bin/bash out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/jack.check.timestamp.rsp
FAILED: /bin/bash out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/jack.check.timestamp.rsp
No Jack server running. Try 'jack-admin start-server'

While jack-admin was running concurrently:
[  3% 2226/61362] /bin/bash -c "(prebuilts/sdk/tools/jack-admin stop-server 2>&1 || (exit 0) ) && (prebuilts/sdk/tools/jack-admin kill-server 2>&1 || (exit 0) ) && (prebuilts/sdk/tools/jack-admin uninstall-server 2>&1 || (exit 0) ) && (prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.8.ALPHA.jar  2>&1 || (exit 0) ) && (mkdir -p \"/buildbot/dist_dirs/git_nyc-dev-mac-sdk_phone_armv7-sdk/2779793/logs/jack/\" ) && (JACK_SERVER_VM_ARGUMENTS=\"-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Dcom.android.jack.server.log.file=/buildbot/dist_dirs/git_nyc-dev-mac-sdk_phone_armv7-sdk/2779793/logs/jack/jack-server-%u-%g.log\" prebuilts/sdk/tools/jack-admin start-server 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update server prebuilts/sdk/tools/jack-server-4.8.ALPHA.jar 4.8.ALPHA 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-2.28.RELEASE.jar 2.28.RELEASE || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.26.ALPHA.jar 3.26.ALPHA || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.27.BETA.jar 3.27.BETA || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.30.BETA.jar 3.30.BETA || exit 47 )"
Stopping background server
Killing background server
No Jack server to kill
Removing jack server from "/Users/android-build/.jack-server"
Installing jack server in "/Users/android-build/.jack-server"
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/buildbot/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Dcom.android.jack.server.log.file=/buildbot/dist_dirs/git_nyc-dev-mac-sdk_phone_armv7-sdk/2779793/logs/jack/jack-server-%u-%g.log -cp /Users/android-build/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher

Change-Id: Ib35f313daee93dc6a3548e652cbcd4cb4d304f93
2016-04-19 17:22:29 -07:00
Shinichiro Hamaji
d50001e74a Add normalize_path.py to prerequisites
Bug: 27954979
Change-Id: I1e22eb4f42a8cb348ce1101e207e239bc5aa7976
2016-04-19 16:22:27 +09:00
Yohann Roussel
a1d82ef12e Merge "Allow to force min sdk given to Jack" am: 6f4f2a7
am: bd65cc3

* commit 'bd65cc387b1becad1b9c5179f7932bd339b8cf9f':
  Allow to force min sdk given to Jack

Change-Id: I55b673b0bb52e4f6f3d4265279528e353a157550
2016-04-14 21:37:25 +00:00
Yohann Roussel
d98c42071a Allow to force min sdk given to Jack
Allows setting the min sdk version for target Jack commands,
overriding the default value obtained from LOCAL_SDK_CURRENT.

Bug: 28188420

(cherry picked from commit 109141ccc9)

Change-Id: Id9c5275bc71b8d9042173bf1e40aa3199e9508e6
2016-04-14 23:25:14 +02:00
Yohann Roussel
6f4f2a7793 Merge "Allow to force min sdk given to Jack" 2016-04-14 21:14:38 +00:00
Yohann Roussel
109141ccc9 Allow to force min sdk given to Jack
Allows setting the min sdk version for target Jack commands,
overriding the default value obtained from LOCAL_SDK_CURRENT.

Bug: 28188420
Change-Id: I1b84ad8a7b6ae30639f8ade455c1e542af5692e4
2016-04-14 20:59:47 +00:00
Sebastien Hertz
e90a711014 Merge "Update code coverage filtering" am: cb49804
am: e0f8435

* commit 'e0f84353065a1d35c349e9e2939b3862a3aef7bd':
  Update code coverage filtering

Change-Id: I4787c538e3a47c792e68d639ae5d3fbfcd95f494
2016-04-11 14:46:20 +00:00
Sebastien Hertz
18da8dd97a Update code coverage filtering
Replaces old LOCAL_EMMA_COVERAGE_FILTER by new variables:
- LOCAL_JACK_COVERAGE_INCLUDE_FILTER for included classes
- LOCAL_JACK_COVERAGE_EXCLUDE_FILTER for excluded classes
Both variables can contain a comma-separated list of class names,
where * and ? are accepted wildcard (like foo.?ar.*).

When code coverage is enabled, we will use these variables to
pass code coverage filters on the Jack command-line.

Bug: 28014424

(cherry picked from commit 74ec3f49d1)

Change-Id: Ie4253981c0e6a62422ab84dfd67ef5eebc0b0284
2016-04-11 16:43:12 +02:00
Sebastien Hertz
cb49804e06 Merge "Update code coverage filtering" 2016-04-11 14:31:35 +00:00
Sebastien Hertz
74ec3f49d1 Update code coverage filtering
Replaces old LOCAL_EMMA_COVERAGE_FILTER by new variables:
- LOCAL_JACK_COVERAGE_INCLUDE_FILTER for included classes
- LOCAL_JACK_COVERAGE_EXCLUDE_FILTER for excluded classes
Both variables can contain a comma-separated list of class names,
where * and ? are accepted wildcard (like foo.?ar.*).

When code coverage is enabled, we will use these variables to
pass code coverage filters on the Jack command-line.

Bug: 28014424
Change-Id: Ic29c99b6feb7ea2251c29d659e7ea1f1c46d1ed1
2016-04-08 10:26:49 +02:00
Shinichiro Hamaji
f84255570d Merge "Add jack\'s argument files to prerequisites" am: 06dbe19
am: ac61fed

* commit 'ac61fedf9e9a68206d2f2507557cce14ee8524e6':
  Add jack's argument files to prerequisites

Change-Id: Id6959d79000252ab91823d2252297500a4dd6dd4
2016-04-08 08:13:04 +00:00
Shinichiro Hamaji
4eaeef8df7 Add jack's argument files to prerequisites
Dex files should be updated when jack-default.args or
proguard*.flags are modified.

Bug: 27954979
Change-Id: I72a7084302f4ef92a89a8068f03f790dd7acd582
2016-04-07 18:56:42 +09:00
Ying Wang
81ef4714f4 Merge commit '1f07720f8518236e8438ae0f25ea7211da8c8c45' into manual_merge_1f07720
Change-Id: I5ad50aacbe99b4ebf8ae7e630f169100128b5b3c
2016-03-31 10:10:42 -07:00
Ying Wang
858657366f Remove support of disabling Jack.
We removed code and variables related to running dx on classes.jar in
this change. Also removed target emma rules (but kept the emma rules for
host java libraries), for it's now done by Jack.
We still support to build classes.jar (and javalib.jar for static Java
libraries) using javac, because tools like javadoc need class files as
input.
Removed the obsolete install-dex-debug.

Bug: 27400061
Change-Id: If0bcdfe62cb181a98754fb0dbe1c12c92e38d3e8
2016-03-30 14:03:12 -07:00
Sebastien Hertz
6ec1f057dc Rename emma coverage files
We no longer use emma with Jack. However, during the process of a
full build, we may run the emma task and overwrite the coverage file
generated by Jack with the one from emma because they use the same
filename.

This CL renames coverage files generated by emma so they no longer
break those created by Jack.

Keep coverage.em file name for host rules where Jack is not called.

Bug: 27822188

(cherry picked from commit 491c9ce48a
&& commit 8f0e52c3a6)

Change-Id: I26beee5a8d42a2ef1d476661e4b591fb09f1276f
2016-03-30 19:03:34 +02:00
Shinichiro Hamaji
fbd5d8de0f Merge "Fix dependencies around tools/*-event-log-tags.py" am: 4487319
am: a2be61e

* commit 'a2be61ed16bcb406030ff01a30e4dec90a8ff5de':
  Fix dependencies around tools/*-event-log-tags.py

Change-Id: I8fee3f7846e723d46eb26356798eedb9566f3a28
2016-03-29 20:51:05 +00:00
Shinichiro Hamaji
4487319141 Merge "Fix dependencies around tools/*-event-log-tags.py" 2016-03-29 20:40:31 +00:00
Shinichiro Hamaji
d3ce14c325 Fix dependencies around tools/*-event-log-tags.py
We should regenerate merged tag files and java sources when
these scripts are updated.

Change-Id: Id5f11d6f480f3f74dab08f01e929ee2d7fafd2d0
2016-03-30 03:04:40 +09:00
Sebastien Hertz
eff5d9d0e1 Merge "Rename emma coverage files" am: f7e06ef
am: dbad7c2

* commit 'dbad7c237cf04f799d680e7e9920848a17ff4f5c':
  Rename emma coverage files

Change-Id: Id35b2972bd208391c5f6cfd4490437ca7e119052
2016-03-29 07:26:19 +00:00
Sebastien Hertz
f7e06ef3b4 Merge "Rename emma coverage files" 2016-03-29 07:17:12 +00:00
Ying Wang
dcb1da9093 Merge "Remove rmtypedefs from the build system."
am: 6557ba5

* commit '6557ba5335798627572669512489fdc8c59915a6':
  Remove rmtypedefs from the build system.
2016-03-25 18:08:55 +00:00
Sebastien Hertz
491c9ce48a Rename emma coverage files
We no longer use emma with Jack. However, during the process of a
full build, we may run the emma task and overwrite the coverage file
generated by Jack with the one from emma because they use the same
filename.

This CL renames coverage files generated by emma so they no longer
break those created by Jack.

Bug: 27822188
Change-Id: Ie3fdc2b8f53deafbefbd6973e39f29d8c46f371e
2016-03-25 17:11:38 +01:00
Ying Wang
72bc59ce8b Remove rmtypedefs from the build system.
We don't need to run rmtypedefs in javac compilation now, because the
runtime libraries are compiled by only jack, which takes care of
rmtypedefs by itself.

Bug: 27828139
Change-Id: Ie480ae5aead8f3f58f956978fc4a05c28a35dec6
2016-03-24 12:25:56 -07:00
Ying Wang
f3920d0aac Merge "Add phony target javac-check."
am: 49b524c

* commit '49b524cb4a6d74b3fee49a728714d74202ce76f0':
  Add phony target javac-check.
2016-03-24 18:39:12 +00:00
Ying Wang
cddeb6c4f0 Add phony target javac-check.
javac-check covers all classes.jars that are compiled with javac
instead of jack. This target is required by tools that still need java
class files as input.

Bug: 26705771
Change-Id: I6896b9a6026a2a0dae6145d1ef5a839756aa3458
2016-03-24 11:12:16 -07:00
Yohann Roussel
2ae244c578 Remove rules for building dex with dx
This is just to ensure no dex file is built with dx any more, cleaning
of the build rules from Jack optionality is still to be done.

Bug: 27218410

(cherry picked from commit 22313f2b2a)

Change-Id: I1e7f2f5dcc7f95a44f5ebf2e4ba99931ff3ba014
2016-03-18 16:03:00 +01:00
Yohann Roussel
cb43e9d0da Merge "Remove rules for building dex with dx"
am: a978779

* commit 'a978779668cb6dd8791348dc701bf154f80164af':
  Remove rules for building dex with dx
2016-03-18 13:59:10 +00:00
Yohann Roussel
a978779668 Merge "Remove rules for building dex with dx" 2016-03-18 13:50:55 +00:00
Yohann Roussel
22a9e788a7 Fix jack min sdk version for ub branches
Bug: 27371864

(cherry picked from commit d6101b6786)

Change-Id: Idd926f5667fbe4275f8f1d80733b8c4471570874
2016-03-16 17:59:18 +01:00
Yohann Roussel
fd8bdb4f3b Fix jack min sdk version for ub branches
am: d6101b6

* commit 'd6101b678688bce96d67f8d945537f405f648194':
  Fix jack min sdk version for ub branches
2016-03-16 16:45:11 +00:00
Yohann Roussel
26912851ab resolve merge conflicts of 63de777 to nyc-dev-plus-aosp
Change-Id: I5dadd6f7bbf494665f9deb0cfafcce65530825d0
2016-03-16 17:33:38 +01:00
Yohann Roussel
d6101b6786 Fix jack min sdk version for ub branches
Bug: 27371864
Change-Id: Idd926f5667fbe4275f8f1d80733b8c4471570874
2016-03-16 17:20:20 +01:00
Yohann Roussel
740ec8fe8a Inform Jack of the min sdk
Set Jack min sdk according to LOCAL_SDK_VERSION. Gives Jack current
version when LOCAL_SDK_VERSION is not available.

Bug: 27371864

(cherry picked from commit c6383d6ec6)

Change-Id: Ieba0219494f29d2737d2ca234317c3af7e5e72c8
2016-03-16 15:41:00 +01:00
Yohann Roussel
c6383d6ec6 Inform Jack of the min sdk
Set Jack min sdk according to LOCAL_SDK_VERSION. Gives Jack current
version when LOCAL_SDK_VERSION is not available.

Bug: 27371864

Change-Id: I5db233fe09aed0fae37fe9a92658bc8f24b86cdf
2016-03-16 11:55:46 +01:00
Yohann Roussel
22313f2b2a Remove rules for building dex with dx
This is just to ensure no dex file is built with dx any more, cleaning
of the build rules from Jack optionality is still to be done.

Bug: 27218410
Change-Id: Iea2c66802b6c64c52690ad9d6d487bdce5f50b79
2016-03-16 10:33:02 +01:00
Yohann Roussel
962282bde2 Revert "Inform Jack of the min sdk"
This reverts commit 94451580af.

Bug: 27371864
Change-Id: I60a8c89b2ab8a6cbde4dd3b0aed24b71700815ab
2016-03-15 15:02:11 +00:00
Yohann Roussel
94451580af Inform Jack of the min sdk
Set Jack min sdk according to LOCAL_SDK_VERSION. Gives Jack current
version when LOCAL_SDK_VERSION is not available.

Bug: 27371864
Change-Id: Ieba0219494f29d2737d2ca234317c3af7e5e72c8
2016-03-11 11:55:57 +01:00
Yohann Roussel
57a54b4199 Merge "Use Jack to check build" am: 6a9d0f9718
am: 4fd0463191

* commit '4fd0463191b316fd80b2ec8c0ba33bb5fcf5aa16':
  Use Jack to check build
2016-03-02 09:14:20 +00:00
Yohann Roussel
6a9d0f9718 Merge "Use Jack to check build" 2016-03-02 08:46:24 +00:00
Dan Willemsen
23afb78cf9 Merge commit 'cdaf748e3abefd93a4e45393e96717fad8564c51'
Change-Id: I3c44564b08ed46f46719dbca54d4225718bb8c59
2016-03-01 15:36:08 -08:00
Dan Willemsen
7f016150a0 Remove unused dependencies on $(ACP)
Most of these are calling to copy-file-to-target or similar, which no
longer use $(ACP).

Change-Id: I62287a80c577c34df587b74e70055c2f56050ce7
2016-03-01 13:15:35 -08:00
Yohann Roussel
e792abc2d9 Use Jack to check build
Run jack with no outputs as a quick check for compilation errors and use
a timestamp to store that check was made.

Bug: 19069325

(cherry picked from commit 43084d9f49)

Change-Id: I9b84b503b28cfdfa245f91da0061ee3a79386b28
2016-03-01 16:57:20 +01:00
Yohann Roussel
ee57268cd7 Use Jack to check build
Run jack with no outputs as a quick check for compilation errors and use
a timestamp to store that check was made.

Bug: 19069325

(cherry picked from commit 43084d9f49)

Change-Id: I9b84b503b28cfdfa245f91da0061ee3a79386b28
2016-03-01 16:34:08 +01:00
Dan Willemsen
9ffa38b193 Merge "Remove USE_NINJA=false" am: 3bfc095f53
am: d73633c082

* commit 'd73633c0824a63f7104bddf9a798bccc952b545c':
  Remove USE_NINJA=false
2016-02-29 22:19:29 +00:00