Run ErrorProne as a processor in javac from OpenJDK9.
Bug: 69485063
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I2dde597430b47c440df22d248809233a6ade1625
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
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
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
Patch Iaf5853361767f0ea3e9ad4ec908aadd72d639c79 missed one rename
of my_support_library_sdk_raise to my_proguard_sdk_raise.
Test: m checkbuild
Change-Id: Ie3d4536bd80654a7eb4f209ef6d6a8de502a6cdc
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
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
This will work for both R8 and Proguard
Test: m -j Settings && "manually check .../proguard_coniguration file"
Change-Id: I1da7c3426b3511e2d5ad69852da8cec3245d7e54
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
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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
* 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
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
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
Bug: 72552006
Test: Make a module with no source files,
run `m -j nothing`, notice that the error tells
which module has no sources
Change-Id: Ib169e7b3cb86d840a3acd644e42cd1f9f65e1304
The only enforcement right now is that modules don't specify both
LOCAL_SDK_VERSION and LOCAL_PRIVATE_PLATFORM_APIS, but a warning
can be turned on by setting the JAVA_SDK_ENFORCEMENT_WARNING variable.
Bug: 73535841
Test: make w/ and wo/ flag.
Change-Id: I3cc720bf060e2bc789e10884ff888d527b91cb50