Commit Graph

563 Commits

Author SHA1 Message Date
Colin Cross 3ebfe7309f Remove proguard support
R8 is always used now.

Bug: 111885749
Test: m checkbuild
Change-Id: I9ae586c6360f2e3050422090b4e08f27ae167758
2018-08-07 11:22:17 -07:00
Colin Cross 1ef3c64906 Merge changes from topic "manifest_fixer_targetSdkVersion"
am: 7b21221d2a

Change-Id: I23336d8a71e2b42877606989d330aa68efb57d5e
2018-07-26 15:10:59 -07:00
Colin Cross 7b21221d2a Merge changes from topic "manifest_fixer_targetSdkVersion"
* changes:
  Pass --library to manifest_fixer.py for android libraries
  Fix dependencies for obfuscated instrumentation tests
  Move manifest fixing to a separate rule
2018-07-26 22:02:36 +00:00
Mathew Inwood 50f59655ba Merge "Build rules to derive greylists from annotations."
am: 48a7929962

Change-Id: I029776a9e31923b87e125ab0054b398d9c935bce
2018-07-26 01:37:29 -07:00
Mathew Inwood 48a7929962 Merge "Build rules to derive greylists from annotations." 2018-07-26 07:37:29 +00:00
Colin Cross fcb441b2b7 Fix dependencies for obfuscated instrumentation tests
This path is never used, otherwise the dependency on
proguard.classes.jar would have triggered the checkbuild
dangling rules errors.  Remove the dependency on the
proguarded classes, which don't exist any more, and depend
on the proguard_options and proguard_dictionary files
instead.

Test: none
Change-Id: Ia3ebc3bc71f0d6fdfa4a7a6850e2f7021adfdd1a
2018-07-25 14:30:10 -07:00
Dan Willemsen 76f0441dc0 Merge "Mark more targets as PHONY"
am: 6708f9507b

Change-Id: I4a23ba6f0043cef1406e40752d40b1228d0c8774
2018-07-24 15:37:00 -07:00
Mathew Inwood 04c58dea0b Build rules to derive greylists from annotations.
Uses the new class2greylist tool to extract API descriptors from .class
files.

Also add these generated greylist.txt files as dependencies of
INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST so they can be merged later in
the build.

Bug: 110868826
Test: m
Change-Id: I406587732b537f9b56768ad9909039dfab34c334
2018-07-24 15:48:42 +01:00
Dan Willemsen 7a1da0e43e Mark more targets as PHONY
So that we can start restricting non-phony targets to $OUT_DIR and
$DIST_DIR.

Test: add --writable=out/, see fewer warnings
Change-Id: I411fe4af732b1bce35d4a4c1e2a47b5f8a15e6b8
2018-07-24 01:21:12 -07:00
Colin Cross 2e51d73d2b Merge "Run ErrorProne in OpenJDK9"
am: 264bc07791

Change-Id: I3ce7202cdcfd3e86fbccb359f56ca59581855a04
2018-06-21 13:57:20 -07:00
Colin Cross e46727a2ba Run ErrorProne in OpenJDK9
Run ErrorProne as a processor in javac from OpenJDK9.

Bug: 69485063
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I2dde597430b47c440df22d248809233a6ade1625
2018-06-20 18:49:50 -07:00
Colin Cross b71570fc8c Merge "Revert "Revert "Remove desugar support""" am: 50ad8c97ac
am: 9f0e4a430f

Change-Id: I8ef7ec33394af7fd7afab4455f79a932ee774b92
2018-06-07 15:49:03 -07:00
Colin Cross 8bd764fc7a Merge "Revert "Remove desugar support"" am: bc965aa7a9
am: d175a15e0e

Change-Id: Ie7b75adc17b93d7a5dd6c288dcb3e7adc4b676df
2018-06-06 16:26:07 -07:00
Colin Cross f44ef3af81 Merge "Remove desugar support" am: 541782f2b4
am: 2d744245a6

Change-Id: I62911d24463cf9c508eee0c5ffca1ebd6b4386f0
2018-06-06 15:25:22 -07:00
Colin Cross cf010858b6 Revert "Revert "Remove desugar support""
This reverts commit cf7407ed61.

Reason for revert: includes art veridex fix this time

Change-Id: I970b51e6a6c6f377cfe793f029d9674e7ee0ed15
2018-06-06 21:46:25 +00:00
Colin Cross cf7407ed61 Revert "Remove desugar support"
This reverts commit bfad2c070c.

Reason for revert: broke art veridex build

Change-Id: I0dcc34102ee18b054c2247ae0e2698aca645c667
2018-06-06 21:42:21 +00:00
Colin Cross bfad2c070c Remove desugar support
Desugaring is always handled by d8 now.

Test: m checkbuild
Change-Id: I8af88522fb1280854ebb4e4957faf70ab59a74f4
2018-06-06 10:06:07 -07:00
Colin Cross a72f7db2eb Merge "Revert "Work around incorrect R8 proguard compatibility"" am: 43aea42876
am: 9200928f8c

Change-Id: I85598e4a79220ba5b13350d4a42c3e7ce89be63e
2018-06-05 14:02:33 -07:00
Colin Cross c8148cc001 Revert "Work around incorrect R8 proguard compatibility"
This reverts commit cf5180c198.

Reason for revert: r8 behaves more like proguard now.

Bug: 80081393
Test: m checkbuild
Test: examine attributes on com.android.stk.BootCompletedReceiver
      in out/target/common/obj/APPS/Stk_intermediates/classes.dex

Change-Id: I6cff1d7cb6b71023399db6492455f69328dd73f3
2018-06-04 17:25:56 +00:00
Colin Cross b17a2ca7b7 Merge changes I9b67fd2a,I761f2d06 am: bcc94297e0
am: 60c80c4323

Change-Id: I6bf68590481fbd9ef6137d8c6747e8eb3f98e1a2
2018-05-25 13:46:03 -07:00
Colin Cross cf5180c198 Work around incorrect R8 proguard compatibility
Proguard treats -dontobfuscate -keepattributes *Annotations* the
same as -dontobufscate by keeping all attributes.  R8, even in
proguard compatibility mode, discards all attributes that don't
match, including EnclosingClass attributes that may be necessary.
Pass -keepattributes * whenever passing -dontobfuscate to make R8
act more like proguard.

This isn't a complete solution, some modules may set
LOCAL_PROGUARD_ENABLED := custom and then manually specify
-dontobfuscate on the command line or in a flags file, in which
case they will see the incorrect behavior of R8.

Bug: 80081393
Test: m checkbuild
Test: examine attributes on com.android.stk.BootCompletedReceiver
      in out/target/common/obj/APPS/Stk_intermediates/classes.dex

Change-Id: I761f2d0617c5295df8fc7adfc4fd00d2aa41961e
2018-05-25 11:34:13 -07:00
Colin Cross 92e9d334ae Merge "Allow forcing AAPT2 on" am: 2b42ae8076
am: 7795002bcf

Change-Id: Ic2b3c8841f56f7f4315ba261d53fcbc5594535cc
2018-05-14 18:12:03 -07:00
Colin Cross a3e54cd24d Merge changes Ie3d4536b,If2504b7d,I411844fb am: fc56b59db4
am: d3a1fa618f

Change-Id: Id5b5b7d398f4ee2c2acbca24f169728ae940cc61
2018-05-10 22:36:19 -07:00
Colin Cross 2029903b64 Allow forcing AAPT2 on
Building with FORCE_AAPT2=true will turn on AAPT2 for all modules
unless they set LOCAL_USE_AAPT2 := false.  The build system will
attempt to rewrite common AAPT patterns into AAPT2 patterns,
including removing --extra-packages for support library packages,
removing LOCAL_RESOURCE_DIR point to support library resources,
adding a default empty manifest file if it doesn't exist, and
converting LOCAL_STATIC_JAVA_AAR_LIBRARIES to
LOCAL_STATIC_ANDROID_LIBRARIES.

Bug: 79481102
Test: m checkbuild
Change-Id: I8d9d55fe4d5d5c965c64b0407efe74e0afc35c3a
2018-05-11 02:23:20 +00:00
Colin Cross c27df2b71b Fix a missed rename to my_proguard_sdk_raise
Patch Iaf5853361767f0ea3e9ad4ec908aadd72d639c79 missed one rename
of my_support_library_sdk_raise to my_proguard_sdk_raise.

Test: m checkbuild
Change-Id: Ie3d4536bd80654a7eb4f209ef6d6a8de502a6cdc
2018-05-11 02:23:07 +00:00
Anton Hansson 65b0210fd0 Merge "Update make rules to use new android.jar location." am: a22472315f
am: 636d569336

Change-Id: Ibed1095363d49ff5d8ad321392b2419594a3715c
2018-04-30 05:29:52 -07:00
Anton Hansson 66d47b884e Update make rules to use new android.jar location.
This file has been copied into a 'public' subdir. Use that, so that
the old file can be deleted. Also introduce a new macro to avoid
duplicating this path in a bunch of places.

Bug: 77525052
Test: m checkbuild
Change-Id: Ifcf59c6fb357769b2765e417c8dd56d2ad9b97aa
2018-04-27 16:39:44 +01:00
Anton Hansson 703ab28b58 Merge "Switch make over to use the new prebuilt modules." am: 2944c11b1f
am: 424ee8d748

Change-Id: I25e8350db92ad48b848a9bd364fdb4aff1f3c473
2018-04-19 02:01:27 -07:00
Anton Hansson 9235faa9a4 Switch make over to use the new prebuilt modules.
There are a couple more places throughout the tree that use the old
modules, and I will update those next before deleting the old module
definitions.

Bug: 77525052
Test: make droid
Change-Id: I9385ae34cc1646cbd4e249d9e96a0116296f139a
2018-04-18 16:15:05 +01:00
Søren Gjesse 6e65019a45 Merge "Keep the collected Proguard configuration" am: 0c2a796853
am: a246c6a84a

Change-Id: I2eae581750bdb3fa51649c7b130e3169fa80877f
2018-04-17 00:13:15 -07:00
Søren Gjesse 9fbdd9ec5a Keep the collected Proguard configuration
This will work for both R8 and Proguard

Test: m -j Settings && "manually check .../proguard_coniguration file"
Change-Id: I1da7c3426b3511e2d5ad69852da8cec3245d7e54
2018-04-16 09:16:35 +02:00
Anton Hansson 395092db03 Merge "Consolidate the logic for the sdk prebuilt module names." am: 9b72b53a24
am: 762e03ad41

Change-Id: I79ba2766028f2f26836a3a6d99eb5e8311f31921
2018-04-11 02:27:37 -07:00
Anton Hansson 400673cf1e Consolidate the logic for the sdk prebuilt module names.
I'm making some changes to it, and found the names are scattered
in various places. Make a macro and re-use the logic instead.

Bug: 77525052
Test: make droid
Change-Id: I0f2da80b8b4d427353509b27ec720d024eee7a6e
2018-04-10 18:53:30 +01:00
Jeff Gaston e7479b7c5d Merge "Run jetifier against prebuilts directly rather than classes.jar" into pi-dev
am: 51eff801ad

Change-Id: I8d2f4aa6739a908a0591384121686976cb6516c8
2018-03-30 22:02:10 +00:00
Jeff Gaston db6557e490 Run jetifier against prebuilts directly rather than classes.jar
It turns out that the resource files inside the .aar files may
need rewriting too

Bug: 72552006
Test: Set LOCAL_JETIFIED_ENABLED for a prebuilt and built it
      See also one of the patches after this one and its topic
      which contains a sample for testing
Change-Id: I89d0b4aa8d5c6ae3abc2344dd05222cf9672d5c0
(cherry picked from commit ed170e7296)
2018-03-28 23:00:02 +00:00
Colin Cross 3d480add49 Merge changes I54b8ec9c,Ibef28507,Ia858de22,Ide3050ec,Ib6e00be4, ... into pi-dev
am: 8060af2e78

Change-Id: I0936c8e8d0f0b9da22d20eb8afed0bbff56af81a
2018-03-21 20:26:56 +00:00
Colin Cross 8a33456e7d Move aapt2.mk before java.mk
aapt2.mk will export a srcjar that will be compiled by java.mk, so
it needs to be evaluated first.  Also move java_renderscript.mk
before aapt2.mk so that the generated resoures are available.

Bug: 73885582
Test: m checkbuild
Test: rm -rf out/target/common/obj/APPS/RsHelloCompute_intermediates &&
      m out/target/common/obj/APPS/RsHelloCompute_intermediates/src/R.stamp
Change-Id: Ide3050ec993a945f7077b75e952c3b3532306ede
Merged-In: Ide3050ec993a945f7077b75e952c3b3532306ede
(cherry picked from commit 8528eabbba)
2018-03-20 15:47:45 -07:00
Colin Cross b4ee77aefb Move java renderscript support to java_renderscript.mk
Move java renderscript support to java_renderscript.mk in
preparation to moving it before aapt.  Filter *.rs files
out of LOCAL_SRC_FILES and forbid them in java_common.mk
so that using *.rs files is an error if java_renderscript.mk
was not included.

Bug: 73885582
Test: m checkbuild
Change-Id: Ib37ce89daee58b025dec98f733c5a08149641afd
Merged-In: Ib37ce89daee58b025dec98f733c5a08149641afd
(cherry picked from commit 71822d6fb9)
2018-03-20 15:47:45 -07:00
Colin Cross ec7be103d0 Use srcjar and resource zip as output of renderscript rules
Replace RenderScript.stamp with a srcjar, with a resource zip as
an implicit output.  This makes the renderscript rules self contained,
which will make it easier to move them before aapt.

Bug: 73885582
Test: m checkbuild
Change-Id: I12d33e52019aebac6ea33271939228e4690a4173
Merged-In: I12d33e52019aebac6ea33271939228e4690a4173
(cherry picked from commit e00e2fae52)
2018-03-20 15:47:45 -07:00
Colin Cross a73ea16f95 Replace extract_srcjars.sh with zipsync
Use zipsync instead of extract_srcjars.sh.

Also fixes an issue where unzipping a resource zip would
ignore anything that wasn't a *.java file.

Bug: 73885582
Test: m checkbuild
Change-Id: I1c25f65afa196614879071c8655866febebac185
Merged-In: I1c25f65afa196614879071c8655866febebac185
(cherry picked from commit 3f99cd5933)
2018-03-20 15:47:45 -07:00
Colin Cross f13eb55448 Add LOCAL_SRCJARS support
Allow java modules to take jars containing .java files as an input.
For turbine, pass them directly to turbine.  For javac, extract them
to a directory and pass a list of the files to javac.

Bug: 73885582
Test: m checkbuild
Change-Id: Ib4351a5b4b165a55e5fb02ee2680466db368983a
Merged-In: Ib4351a5b4b165a55e5fb02ee2680466db368983a
(cherry picked from commit 11e2d55c0f)
2018-03-20 15:47:45 -07:00
Colin Cross ecabf53bee Remove unused .fs file suppport
.fs files are obsolete.

Bug: 73885582
Test: m checkbuild
Change-Id: I74b618099333fe565c7b235994be64e6466d2da6
Merged-In: I74b618099333fe565c7b235994be64e6466d2da6
(cherry picked from commit 93d6550c53)
2018-03-20 15:47:45 -07:00
Colin Cross 35e31b65bd Remove sharding support from make
Sharding is not used in make any more, the large java modules
(libcore and framework) have moved to Soong.  Keeping sharding
support complicates java compiling, so remove it.

Bug: 73885582
Test: m checkbuild
Change-Id: I2932f9e96bfc8f2ebf82095b16d6c0b3c51613f0
Merged-In: I2932f9e96bfc8f2ebf82095b16d6c0b3c51613f0
(cherry picked from commit 5ef6e79c21)
2018-03-20 15:47:45 -07:00
Colin Cross 7a28158b90 Move aapt2.mk before java.mk
aapt2.mk will export a srcjar that will be compiled by java.mk, so
it needs to be evaluated first.  Also move java_renderscript.mk
before aapt2.mk so that the generated resoures are available.

Bug: 73885582
Test: m checkbuild
Test: rm -rf out/target/common/obj/APPS/RsHelloCompute_intermediates &&
      m out/target/common/obj/APPS/RsHelloCompute_intermediates/src/R.stamp
Change-Id: Ide3050ec993a945f7077b75e952c3b3532306ede
Merged-In: Ide3050ec993a945f7077b75e952c3b3532306ede
(cherry picked from commit 8528eabbba)
2018-03-20 15:26:27 -07:00
Colin Cross 1e047d39a5 Move java renderscript support to java_renderscript.mk
Move java renderscript support to java_renderscript.mk in
preparation to moving it before aapt.  Filter *.rs files
out of LOCAL_SRC_FILES and forbid them in java_common.mk
so that using *.rs files is an error if java_renderscript.mk
was not included.

Bug: 73885582
Test: m checkbuild
Change-Id: Ib37ce89daee58b025dec98f733c5a08149641afd
Merged-In: Ib37ce89daee58b025dec98f733c5a08149641afd
(cherry picked from commit 71822d6fb9)
2018-03-20 15:26:27 -07:00
Colin Cross dc1e028994 Use srcjar and resource zip as output of renderscript rules
Replace RenderScript.stamp with a srcjar, with a resource zip as
an implicit output.  This makes the renderscript rules self contained,
which will make it easier to move them before aapt.

Bug: 73885582
Test: m checkbuild
Change-Id: I12d33e52019aebac6ea33271939228e4690a4173
Merged-In: I12d33e52019aebac6ea33271939228e4690a4173
(cherry picked from commit e00e2fae52)
2018-03-20 15:25:51 -07:00
Colin Cross 61acd8295c Merge "Replace extract_srcjars.sh with zipsync" am: c9907cc8f6
am: f434e35a47

Change-Id: I8304134f6b48ba57572b41cf6c4fc7cecd4d0dcc
2018-03-19 21:01:49 +00:00
Colin Cross 3f99cd5933 Replace extract_srcjars.sh with zipsync
Use zipsync instead of extract_srcjars.sh.

Also fixes an issue where unzipping a resource zip would
ignore anything that wasn't a *.java file.

Bug: 73885582
Test: m checkbuild
Change-Id: I1c25f65afa196614879071c8655866febebac185
2018-03-15 16:40:05 -07:00
Colin Cross a9aa74ca38 Merge changes I97ea3ff3,Ib4351a5b,I74b61809,If2653f84,I2932f9e9, ... am: 34af6a41ff
am: 3d8c0a2c9e

Change-Id: I310c37dd5ef95e94f64630194c9aed1effa4818e
2018-03-14 23:48:21 +00:00
Colin Cross 34af6a41ff Merge changes I97ea3ff3,Ib4351a5b,I74b61809,If2653f84,I2932f9e9, ...
* changes:
  Allow aapt2 rules to take zipped resource files
  Add LOCAL_SRCJARS support
  Remove unused .fs file suppport
  Remove unused file lists
  Remove sharding support from make
  Move aapt flags from java_common.mk to aapt_flags.mk
2018-03-14 23:29:49 +00:00