Commit graph

98 commits

Author SHA1 Message Date
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
Colin Cross
ac48f41ba5 Don't depend on R.txt)
There is an extra ) in the implicit output path for R.txt, which causes
the rule to rerun every time because of a missing output file.  There
is already an implicit output for R.txt on line 180 (which is why
the incorrect path didn't cause an immediate "No rule to generate R.txt"
error), so just remove the incorrect one.

Bug: 77244156
Test: m checkbuild && m checkbuild
Change-Id: Id960ee211b89a9a5f5104cdcac23bc3124742145
2018-04-10 16:27:53 -07:00
Colin Cross
f6d68cf6fe Use a srcjar for aapt and aapt2 output
Dumping files in the *_intermediates/src causes incremental build
problems, because we don't know when to delete them if they are
no longer generated.  Switch to outputting a srcjar instead, and
pass it in to the turbine and javac compiles.

Bug: 73885582
Test: m checkbuild
Change-Id: Ibef28507522339d930c09426d0c98372eb864cb6
Merged-In: Ibef28507522339d930c09426d0c98372eb864cb6
(cherry picked from commit 2d1cddd567)
2018-03-20 15:26:27 -07:00
Colin Cross
2ae710c29f Move R.txt and make aapt2 generate it
Move R.txt from $(intermediates.COMMON)/src to $(intermediates.COMMON)
in preparation for moving aapt/aapt2 java files out of src.  Also
make aapt2 generate R.txt, and make it an implicit output of the rule
and and input to the aar rule.

Bug: 73885582
Test: m out/target/common/obj/JAVA_LIBRARIES/SettingsLib_intermediates/javalib.aar
Test: m checkbuild
Change-Id: Ia858de226355965b69794c002f841333df16a612
Merged-In: Ia858de226355965b69794c002f841333df16a612
(cherry picked from commit 7c24f8ec85)
2018-03-20 15:26:27 -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
39772fedde Remove redundant renderscript_target_api computation
renderscript_target_api is set by java_renderscript.mk, it doesn't
need to be computed again in static_java_library.mk and
package_internal.mk.

Bug: 73885582
Test: no change to ninja file
Change-Id: Ib6e00be425c385f4911def19ed5042a740f2c79b
Merged-In: Ib6e00be425c385f4911def19ed5042a740f2c79b
(cherry picked from commit 55cce23360)
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
5ef6e79c21 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
2018-03-14 12:04:55 -07:00
Colin Cross
b6013af085 Move aapt flags from java_common.mk to aapt_flags.mk
The aapt flags were being set in java_common.mk, which is used by
various entry points.  host_dalvik_java_library.mk and
host_java_library.mk, and java_library.mk don't support aapt, only
package_internal.mk and static_java_library.mk do.  Move the aapt
flags into aapt_flags.mk, and include it from package_internal.mk
and static_java_library.mk.

Bug: 73885582
Test: no change to build-${TARGET_PRODUCT}.ninja
Change-Id: I124393846d37b9bbc941272cce4274121ac235ef
2018-03-14 12:04:35 -07:00
Adam Lesinski
960de8efcd Enable apps to build with resource namespaces
Setting LOCAL_AAPT_NAMESPACES := true enables
namespaces for an app and requires any library resources
to be fully qualified by their package.

Test: manual
Bug: 73885582
Change-Id: Ia6bfc82ee8b8d6335f8e7c2abe94ce36467a012d
Merged-In: Ia6bfc82ee8b8d6335f8e7c2abe94ce36467a012d
2018-03-14 12:04:01 -07:00
Colin Cross
6e136922f3 Remove framework_res_package_export_deps
framework_res_package_export is now always either the prebuilt
android.jar from an SDK or a package-export.apk generated by
Soong, so the dependency on R.stamp is never useful.  Remove
all assignments to framework_res_package_export_deps, and replace
usages with frameworks_res_package_export.

Test: m checkbuild
Change-Id: If484e9eb08061cb0ed0697755f13db71d741aaab
2018-03-07 09:47:41 -08:00
Dan Willemsen
4cdbaf1186 Revert "Revert "Propagate proguard rules from LOCAL_STATIC_ANDROID_LIBRARIES""
This reverts commit 30d6869faf.

Fixes an issue with the original change where proguard files without
newlines at the end of the file would get merged with the next file.
Most of the time the next file started with a comment, which worked
fine, but sometimes it was a syntax error.

Bug: 72969557
Test: m
Test: build on an internal tree that failed last time
Change-Id: I66f13ae80ee0f96b456e526bfbfc2cdcf82c3f3a
2018-02-09 15:22:52 -08:00
Dan Willemsen
30d6869faf Revert "Propagate proguard rules from LOCAL_STATIC_ANDROID_LIBRARIES"
This reverts commit df5d7da7d8.

Reason for revert: breaking builds

Bug: 72969557
Change-Id: I27aad65587933c3f760a89c541d27469c916abe8
2018-02-09 19:21:11 +00:00
Dan Willemsen
df5d7da7d8 Propagate proguard rules from LOCAL_STATIC_ANDROID_LIBRARIES
Packages would use proguard rules from their
LOCAL_STATIC_ANDROID_LIBRARIES, but other libraries wouldn't propagate
the rules from their LOCAL_STATIC_ANDROID_LIBRARIES.

Bug: 72969557
Test: m
Change-Id: I514af02627d78c48cf6cd08d4b3c17911c6bac2f
2018-02-08 15:31:02 -08:00
Jiyong Park
5ebca30d21 Support LOCAL_SDK_VERSION := core_current
core_current is a pseudo SDK version which is a core Java API subset of
the Android API. It is expected to be mainly used for external Java
projects which are agnostic to Android; such as junit, guava, etc.

A module built with this SDK version can only link to java modules of
the same kind. It can't depend on modules built with LOCAL_SDK_VERSION
:= current or without LOCAL_SDK_VERSION.

Bug: 72206056
Test: m -j
Change-Id: I34a9696393aa6704fd6684a40ea5b05d3fb46b23
2018-02-01 17:14:55 +09:00
Bryan Eyler
57b5232def Fix comment indicator on endif
It's referring to the wrong if start.

Change-Id: I6f78aee54fb89fb5f69a4e86102d5a8e2cc2bbd1
2018-01-25 14:55:31 -08:00
Dan Willemsen
1d64623105 Export proguard flags from static android libraries and aar prebuilts
Test: m Contacts, classes-proguard.jar has same contents
Test: rm -rf out; tapas Contacts; m
Change-Id: Id7a92fb2c44913bccbfcbeae127355b4de588e4d
Merged-In: Id7a92fb2c44913bccbfcbeae127355b4de588e4d
(cherry picked from commit 1417c177ac)
2017-12-28 17:22:19 +00:00
Sundong Ahn
5a44d1f069 Add LOCAL_SDK_VERSION := system_$(VER)
The system_$(VER) can be set in LOCAL_SDK_VERSION, and the apk will use
android_system.jar at build time.
If LOCAL_SDK_VERSION is not defined and this module is installed in
vendor.img, LOCAL_SDK_VERSION is set to system_current.

Bug: 67724799
Test: 1. build && run on taimen
2. LOCAL_SDK_VERSION:=system_27 in ims.apk && build ims.apk && check
the vsdk_v27_intermediates.

Merged-In: I5b11c78b8fcd4a2f2a5e3b141527cd34dbe80018
Change-Id: I5b11c78b8fcd4a2f2a5e3b141527cd34dbe80018
(cherry picked from commit ef212cbe8d)
2017-12-01 00:39:07 +00:00
Dan Willemsen
bb6393c5a4 Add LOCAL_AAPT2_ONLY
This allows modules to specify that they may only be used from modules
using aapt2. Using aapt2 removes absolute path references to modules, so
this can be useful if a module is preparing to move its sources, or
replace itself with a prebuilt aar.

Test: m
Test: Label frameworks/support/design; m
Test: Label frameworks/support/v4; m
Test: build/soong/build_test.bash
Change-Id: Icfb3d4b19a6a0e3a3bb00091d2a97a4d88c0c761
2017-11-17 15:54:15 -08:00
Nan Zhang
72165e0c29 Merge "Support java compilation sharding for target side."
am: 60e1f8ee27

Change-Id: Ia81f7f7c3f98fee3896714129fe053741e457824
2017-10-13 00:51:11 +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
cd82b18c8d Merge "Fix incremental aapt builds"
am: 26cf972f50

Change-Id: I7279d4662553a6f31ff2e4ff7d5a482972a2acfb
2017-10-02 23:28:43 +00:00
Dan Willemsen
f439c334da Fix incremental aapt builds
If a resource was moved / removed without any other timestamp updates,
ninja would not re-run aapt. To fix this, add a list of resource files
into the same command as aapt (echo ... >/dev/null). That way if the
list changes, ninja will recognize the command line changing and rerun
aapt.

Bug: 67315436
Test: mmma cts/tests/autofillservice
Test: mv cts/tests/autofillservice/res/layout/welcome_activity.xml \
      cts/tests/autofillservice/res/layout/welcome_activity_test.xml
Test: mmma cts/tests/autofillservice

Change-Id: Ia93ac4ff48910fed74a1f1539ce4e1f5a9db023f
2017-10-02 14:22:02 -07: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
Nan Zhang
fa8b66f5cc Merge changes from topic "turbine"
am: 872246de0f

Change-Id: I13cba047e145d0ab8c486a4ee60d53f2f5470737
2017-09-01 00:21:34 +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
Nan Zhang
2c82a22d96 Merge "Revert "Add Turbine as part of java build toolchain in Make.""
am: 91ffbf2fbe

Change-Id: I1a1131df064f2243220407dddd3f913ace7d26aa
2017-08-31 20:41:25 +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
2764a16085 Merge "Add Turbine as part of java build toolchain in Make."
am: 0b23748128

Change-Id: Ieed94b471fea95b91b7bc54da8d3860cb794f921
2017-08-31 18:16:13 +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
bf386cafec Merge "Separate java source list generation into its own rule"
am: f61712fbf1

Change-Id: Ib69127b00bbdaf254dc68a8387b86d7533fde46b
2017-08-30 20:03:41 +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
Colin Cross
db17f2acf8 Merge "Fix typo when building aar" am: f759166bb8 am: 152ac2818a
am: 5c1f478231

Change-Id: Ib4eb4ed660089c86494411f8f9d3be33cb601dc0
2017-08-17 22:40:08 +00:00
Colin Cross
4a5458aed1 Fix typo when building aar
I7dced6acbe621a60cd49daf17872941485602732 introduced a typo,
fix (dir $@) to $(dir $@).

Bug: 64634025
Test: m -j on affected target
Change-Id: Ic7181631630662970337c542b73cd0de6f3f995f
2017-08-17 06:44:23 +00:00
Colin Cross
18c92897a7 Merge "Sort files in directories passed to jar" am: 966ed15a1d am: 604a2423b6
am: da54a77928

Change-Id: I5cc539e58d655dbd1730acd368ad98071079a57d
2017-08-17 01:06:44 +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
Jason Tholstrup
40098dca31 Updated static_java_library.mk to support proguard options.
For reference we are trying to build an AAR and want to filter out anything private and anything marked @hide.

Test: built dist and verified package contents.

Change-Id: I2b9847501d677f56d3918ac0694e6e1f6cda32c8
Merged-In: I2b9847501d677f56d3918ac0694e6e1f6cda32c8
(cherry picked from commit 37926dedfd)
2017-08-15 16:06:04 -07:00
Colin Cross
373a13c0ca Merge "Provide make variables for java binaries" am: 5e19557eb9 am: e885ccf0df
am: d8a22925f5

Change-Id: I8681d9c889018fe656f5ef4cc380d1a3af8c325f
2017-07-01 01:45:16 +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
Dan Willemsen
1683aea819 Merge changes Id0d167e6,I290a02b0 am: 90573e75a8 am: 9efa174836 am: a4d4cf335c
am: 0d1967d571

Change-Id: I808e026cf39c63715afc1e41a582e2536f25832f
2017-05-10 03:35:32 +00:00
Dan Willemsen
0d1967d571 Merge changes Id0d167e6,I290a02b0 am: 90573e75a8 am: 9efa174836
am: a4d4cf335c

Change-Id: Ia59d32b0d533c4d37ac6f8950fbfb179c34b5db3
2017-05-10 02:52:21 +00:00
Dan Willemsen
fa7ecfb752 Clean LOCAL_RESOURCE_DIR paths
With LOCAL_USE_AAPT2, resource directories like a/b/../res cause
problems, since ninja will canonicalize the path before creating the
intermediate resource directory, so it creates <intermediates>/a/res
while we give AAPT2 <intermediates>/a/b/../res, which fails to open.

Bug: 37716307
Test: Switch LOCAL_USE_AAPT2:=true for TelecommUnitTests, mma
Test: lunch aosp_marlin-userdebug; m -j
Change-Id: Id0d167e68185a119390e7b7e3c344895e77ca0e3
2017-05-05 20:50:54 -07:00
Yang Ni
1a85a7c0c0 Merge "Do not package res unless RS target API < 21" into oc-dev am: 671fc06b02
am: dfffda92e0

Change-Id: I8d94f7c60fd0af4ccfbe4996dd0c844d426d496b
2017-05-02 16:38:50 +00:00
Yang Ni
dfffda92e0 Merge "Do not package res unless RS target API < 21" into oc-dev
am: 671fc06b02

Change-Id: I06bd5247095b5960610eee2d44a82cab83198067
2017-05-02 16:26:35 +00:00
Yang Ni
6b68da0625 Do not package res unless RS target API < 21
Bug: 37626838

Since Lollipop, RS generated bitcode is embedded as strings in
generated Java files, and no longer needed in the resources.
This CL makes packaging resources conditional on RS target API, and
not do so unless it is below 21.

Test: mm in frameworks/rs/tests/java_api/Refocus, ImageProcessing2, and
      ImageProcessing_jb
Change-Id: I79a90ed4b96cb78b22a64a35b539d9d67351f4c4
(cherry picked from commit e2c0901918)
2017-05-01 20:07:45 -07:00
Yang Ni
e2c0901918 Do not package res unless RS target API < 21
Bug: 37626838

Since Lollipop, RS generated bitcode is embedded as strings in
generated Java files, and no longer needed in the resources.
This CL makes packaging resources conditional on RS target API, and
not do so unless it is below 21.

Test: mm in frameworks/rs/tests/java_api/Refocus, ImageProcessing2, and
      ImageProcessing_jb
Change-Id: I79a90ed4b96cb78b22a64a35b539d9d67351f4c4
2017-05-01 21:41:14 +00:00
Colin Cross
ffbf0a66d8 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

Bug: 36902714
Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Change-Id: I3df8b9a4edcd5db996f1fedc54c8a782d4f36a92
(cherry picked from commit 6fabefa88e)
2017-04-11 17:00:02 +00:00