Commit graph

282 commits

Author SHA1 Message Date
Colin Cross
ddaecb786b Soong AAR prebuilt support am: fabb608b27 am: cb7137994f
am: dc425fe743

Change-Id: Icecd172a1bae483d0aad04f68dba30832a4b2dd3
2018-02-22 23:36:27 +00:00
Colin Cross
a833f3c1cc Add aapt includes for prebuilt SDK jars am: 9ca6942956 am: 022c52e269
am: 380c9a1f87

Change-Id: I1c5c4b13ffe7390953c9763e3090639b5eedd154
2018-02-22 23:36:22 +00:00
Nan Zhang
bfef411697 Droiddoc Support in Soong am: 581fd21e91 am: 2ea76706b3
am: a400bb400c

Change-Id: I5c317052e5b1cba68e04720db75cb07cdd7ca0f7
2018-02-22 23:25:14 +00:00
Colin Cross
fabb608b27 Soong AAR prebuilt support
Add support for android_library_import modules that take an
aar file.

Bug: 73724997
Test: m checkbuild
Change-Id: I670b56f0a3b7501d9478a6064a04d0cb9c1bb611
2018-02-22 14:54:47 -08:00
Colin Cross
9ca6942956 Add aapt includes for prebuilt SDK jars
Add -I arguments to the aapt link command line if sdk_version is
set to a numbered SDK prebuilt jar.

Test: m checkbuild
Change-Id: Ieeadf84bc131ba94e0e4ee1b9eec7d1e80b31b19
2018-02-22 14:36:24 -08:00
Nan Zhang
581fd21e91 Droiddoc Support in Soong
Support Droiddoc to Soong based on core/droiddoc.mk. The non-std doclet
based droiddoc compilation output is a "real" stubs.jar instead of a
directory of java files and a timestamp file.

The std doclet based javadoc compilation output is a "empty" stubs.jar
instead of a timestamp file.

The stubs.jar will be exported to
out/target/common/obj/JAVA_LIBRARIES/$(LOCAL_MODULE)_intermediates/classes.jar
and out/target/common/docs/$(LOCAL_MODULE)-stubs.jar

A $(LOCAL_MODULE).zip file will be generated also, and is exported to
out/target/common/docs/$(LOCAL_MODULE)-docs.zip if property: installable is not set
to false.

Bug: b/70351683
Test: unittest + convert libcore docs Android.mk to Soong manually.

Change-Id: I1cffddd138a5d9d445f86a3d4a3fd4de88a2bc0f
(cherry picked from commit 78188ec622cb1ee24171455867fc58ffab91562e)
2018-02-22 11:14:13 -08:00
Colin Cross
aa008b4cb2 Merge "Use android.InList for inList" am: e35ad13004 am: 20b350b433
am: 3ef40fd3e4

Change-Id: Iaf540c0d55cbbf9780fcf2721f0a67de43902948
2018-02-22 04:20:12 +00:00
Colin Cross
0d0ba59ec3 Use android.InList for inList
Remove duplicate implementations of inList.

Test: m checkbuild
Change-Id: I6943b95f6d47e6722b9ff1ab61ab14c429fe33a0
2018-02-21 11:02:16 -08:00
Colin Cross
164315f4e9 Fix comment on how java rules handle unknown output files am: f7eac7a2ac am: a14eee8e4a
am: 4bc286eca9

Change-Id: I19e6cd473f0bd854e35a2e6ccc70fe2bccc02ed5
2018-02-20 18:20:49 +00:00
Colin Cross
f7eac7a2ac Fix comment on how java rules handle unknown output files
Test: none
Change-Id: I985e7961c87dd145d6eb2bd94cb8bdc43becc360
2018-02-20 17:54:00 +00:00
Nan Zhang
73ca4ec589 Merge "Revert "Revert "Support filegroup in exclude_srcs""" am: f28e32a2a5 am: 3aa79ee5f5
am: 6df794ebb4

Change-Id: If6f3707008c217dec95f991f3c8fa3585ce42b0b
2018-02-19 18:35:36 +00:00
Nan Zhang
27e284d2b0 Revert "Revert "Support filegroup in exclude_srcs""
This reverts commit 606e9de344.

Reason for revert: <try to fix the broken build yesterday>

Change-Id: I2963b9af63c7c7398159e5e9a1e448266e1c81d5
Test: unittest
2018-02-15 14:38:40 -08:00
Przemyslaw Szczepaniak
23c743abcc Add rsp and srcjar support to kotlinc build rule am: 4b5fe9d1b4 am: dae5bb8f25
am: 73d1deeea4

Change-Id: I1e065377fe78a39bb942a5dbcc781687490509c8
2018-02-15 12:03:46 +00:00
Przemyslaw Szczepaniak
4b5fe9d1b4 Add rsp and srcjar support to kotlinc build rule
Rsp files are supported through helper script (gen-kotlin-build-file.sh)
that generates the kotlinc module/build xml file.

Since rsp files are supported, I've added ExtractSrcJarsCmd step
to handle srcjars extraction.

Minor reorderings to make sure that TransformKotlinToClasses
recives only .java and .kt files when called from Module.compile.

Bug: 73281388
Test: make -j hidl-doc
Change-Id: I5a40b914569018dc529903a7f2864a5aeae838e5
2018-02-14 20:47:17 +00:00
Pete Gillin
dcb5234d13 Merge "Enable jacoco instrumentation of core-libart." 2018-02-14 10:46:32 +00:00
Nan Zhang
85fbaffea8 Merge "Add Respfile support for soong_zip." am: 3bb5f2f2fa am: afe289114a
am: ba85cb38f3

Change-Id: Id6c8ab5f978e406a910ecdc5b13ff804329b21cf
2018-02-14 01:35:48 +00:00
Nan Zhang
674dd932d8 Add Respfile support for soong_zip.
Sometime the size of our command line passed to soong_zip go program
exceeds the cmdline size limit. So add an RespFile support with "@" special
character prefix.

The args in the cmdline will be considered together with the
args in RespFile during soong_zip running.

Test: real tests in my local machine, and compare the
res/libphonenumber.jar before and after changes.

./cmd -o test.zip '""'-C -> [./cmd,-o,test.zip,""-C]
./cmd -o test.zip '-C -f -> [./cmd,-o,test.zip,-C -f]
./cmd -o test.zip '\"'-C -f -> [./cmd,-o,test.zip,\"-C -f]
./cmd -o test.zip '\\'-C -f -> [./cmd,-o,test.zip,\\-C -f]
./cmd -o test.zip '\a'-C -f -> [./cmd,-o,test.zip,\a-C -f]

./cmd -o test.zip \'-C -> [./cmd,-o,test.zip,'-C]
./cmd -o test.zip \\-C -> [./cmd,-o,test.zip,\-C]
./cmd -o test.zip \"-C -> [./cmd,-o,test.zip,"-C]

./cmd -o test.zip "'"-C -> [./cmd,-o,test.zip,'-C]
./cmd -o test.zip "\\"-C -f -> [./cmd,-o,test.zip,\a-C -f]
./cmd -o test.zip "\""-C -f -> [./cmd,-o,test.zip,"a-C -f]

Bug: b/72484223

Change-Id: I83c3630b70c8396c8e8a3f266244d868d754c4e8
2018-02-13 15:13:01 -08:00
Pete Gillin
5d13354f11 Enable jacoco instrumentation of core-libart.
See the other change in this topic for the required blacklist.

Bug: 73157713
Test: `cts-tradefed run cts-dev -m CtsLibcoreTestCases --test-arg com.android.compatibility.testtype.LibcoreTest:coverage:true` on a build with EMMA_INSTRUMENT=true and EMMA_INSTRUMENT_FRAMEWORK=true
Change-Id: I1c8e257f030cdd769211f6e921988ff7d75772c2
2018-02-13 17:17:12 +00:00
Tobias Thierer
6466ada7b9 Merge "Revert "Support filegroup in exclude_srcs"" am: f5801db4cc am: 62c06ce8ed
am: 019405de4a

Change-Id: Icb19a5b8d36d3333aadefc0d6ca471add9d08d3e
2018-02-09 10:20:18 +00:00
Tobias Thierer
f5801db4cc Merge "Revert "Support filegroup in exclude_srcs"" 2018-02-09 09:56:59 +00:00
Tobias Thierer
606e9de344 Revert "Support filegroup in exclude_srcs"
This reverts commit f36a3d9b6d.

Reason for revert: Broke several builds. I'm acting build cop, reverting.

Bug: 70351683

Change-Id: I775ada4e9cb6473519d51420b41b818af163da44
2018-02-09 09:46:11 +00:00
Nan Zhang
7e78927715 Merge "Support filegroup in exclude_srcs" am: a9e0fabae1 am: 4357144070
am: 53509e591b

Change-Id: I625381c713986c42a5857b2252ecbbbf0e04749f
2018-02-09 07:06:48 +00:00
Treehugger Robot
a9e0fabae1 Merge "Support filegroup in exclude_srcs" 2018-02-09 06:49:28 +00:00
Colin Cross
dcb4d160e8 Disable duplicates warnings when merging jars am: f91a08caca am: c40d9b1e7f
am: bd828daf68

Change-Id: Ib5d03905b5b64757c16d0e45d868bb68a23fc544
2018-02-08 09:37:35 +00:00
Colin Cross
f91a08caca Disable duplicates warnings when merging jars
There are too many duplicates warnings, disable them until someone
is actually looking at them.

Bug: 69316739
Test: m checkbuild
Change-Id: I7b3315f999dff1c01b6df37ab5ca83f7b8a60bd9
2018-02-08 01:15:39 +00:00
Nan Zhang
f36a3d9b6d Support filegroup in exclude_srcs
Test: add unit-test, m -j32
Bug: b/70351683
Change-Id: Iff83c56d45dd668d9df6131c7df2e23e5c73a21b
2018-02-07 10:18:41 -08:00
Sundong Ahn
7c62ddc381 Merge "Change the naming policy of system_$(VER)" am: 7a26b708a5 am: 8b6f140b5c
am: 38a6797919

Change-Id: I02ce1e4938a87709ed6970f85749c1552282236b
2018-02-07 09:02:00 +00:00
Jiyong Park
47fecf2b51 Support sdk_version: "core_current" am: 750e557011 am: 313c1cde06
am: 904f53799d

Change-Id: I125f49678bc6979456e3d646c057ef0b4a4cc44a
2018-02-07 01:30:15 +00:00
Sundong Ahn
8222d3b31e Change the naming policy of system_$(VER)
The module name of system_$(VER) prebuilt file is system_sdk_v$(VER).
But this is inconsistent with sdk_v$(LOCAL_SDK_VERSION) in
prebuilts/sdk.
So, system_sdk_v$(VER) is changed to sdk_vsystem_$(VER) to use the same
naming policy.

Bug: 72031391
Test: build
Change-Id: I3f18b7969dda208beeefdcaefadcc42db5c1577e
2018-02-06 23:51:14 +00:00
Nan Zhang
69b86ee6df Merge "Add property to enable adding tools.jar to bootclasspath." am: 97754359cc am: 0965552a5b
am: 18ce234234

Change-Id: Ibb10696e7aa17b789987eb1d05d5ecd99f226f0a
2018-02-06 23:00:15 +00:00
Jiyong Park
750e557011 Support 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 other sdk  (e.g.
current) or without sdk.

Bug: 72206056
Test: m -j
Change-Id: I778e7b4fcb9456a12b418ffd633ea78e29951e84
2018-02-07 07:35:36 +09:00
Nan Zhang
5f8cb424aa Add property to enable adding tools.jar to bootclasspath.
Converting Doclava to Soong need tools.jar as one of its bootclasspaths.

Test:  m doclava
Bug: b/70351683
Change-Id: I0ac65fcbe1eadfc57239cde2e83b80cf441a9b69
2018-02-06 11:01:51 -08:00
Nan Zhang
ffe2c1c369 Change syntax for jacoco filter wildcard params.
originally:
.* -> /**/*.class
now:
.* -> /*.class
.** -> /**/*.class

Also add NinjaAndShellEscape to allow filtering inner classes with $ in
the name.

Test: unittests.
Bug: b/71889972
Merged-In: Ifb8d7daa22bee02346885171edb15180af18f0de
Change-Id: Ifb8d7daa22bee02346885171edb15180af18f0de
(cherry picked from commit c61066684d5c8ddf600af602852c32fce6e6c6f4)
2018-01-29 12:46:26 -08:00
TreeHugger Robot
19b4555593 Merge "Change the syntax for jacoco filter wildcard parameters." 2018-01-29 20:31:37 +00:00
Dan Willemsen
c239f39f2b Export system module library list to Make am: 1dde427375 am: 159ac4044b
am: aa01659bd1

Change-Id: I9954fc90acefe639d135a87b0507eb091f761a34
2018-01-26 01:57:34 +00:00
Nan Zhang
05fc4542ac Change the syntax for jacoco filter wildcard parameters.
originally:
.* -> /**/*.class
now:
.* -> /*.class
.** -> /**/*.class

Also add NinjaAndShellEscape to allow filtering inner classes with $ in
the name.

Test: unittests.
Bug: b/71889972
Change-Id: Ifb8d7daa22bee02346885171edb15180af18f0de
2018-01-25 16:01:06 -08:00
Dan Willemsen
1dde427375 Export system module library list to Make
Bug: 38177569
Test: EXPERIMENTAL_USE_OPENJDK9=true m nothing
      check out/soong/Android-aosp_arm.mk
Change-Id: If35e913c7203c12f4305e74919c0df76a8443253
2018-01-25 14:51:50 -08:00
Andreas Gampe
57c391b61b Merge "Soong: support Errorprone javacflags" am: fdc2b3bebe am: 1b1936c487
am: 4cba2cae61

Change-Id: I54d57b4e0872cb9927f4aeee97c16c141bf0bee7
2018-01-24 20:14:32 +00:00
Andreas Gampe
f3e5b558e7 Soong: support Errorprone javacflags
Add support for an errorprone block in Java modules that accepts
additional javacflags for the errorprone build.

Sample:

    errorprone: {
        javacflags: ["-Xep:EqualsNaN:WARN"],
    },

Bug: 72004718
Test: m RUN_ERROR_PRONE=true
Test: manual - add block with ERROR to a project
Test: androidmk_test
Change-Id: I502248fe76c26aa19102f413af72a7324c35b7f4
2018-01-23 20:30:01 -08:00
Jiyong Park
596229feb4 Merge "Add PLATFORM_SYSTEMSDK_VERSIONS and BOARD_SYSTEMSDK_VERSIONS" am: d89f6621ae am: ee33e88111
am: a64cc46798

Change-Id: Ic3ea155a5f5dda891d59da2b9921f3cd5af96ddc
2018-01-23 19:00:09 +00:00
Jiyong Park
1a5d7b1539 Add PLATFORM_SYSTEMSDK_VERSIONS and BOARD_SYSTEMSDK_VERSIONS
PLATFORM_SYSTEMSDK_VERSIONS is the list of System SDK versions that the
platform is supporting. Contrary to the public SDK where platform
essentially supports all previous SDK versions, platform support only a
few recent System SDK versions, since some of old System APIs are
gradually deprecated, removed from the following SDKs and then finally
deleted from the platform. This will be part of the framework manifest.

The list can be specified by setting PLATFORM_SYSTEMSDK_MIN_VERSION. If
it is set to an old version number, then System SDKs from the version
to the current version (PLATFORM_SDK_VERSION) are considered to be
supported by the platform. If PLATFORM_SYSTEMSDK_MIN_VERSION is not set,
only the latest System SDK version is supported.

Next, BOARD_SYSTEMSDK_VERSIONS is the list of System SDK versions that
the device is using. This is put to the device compatibility matrix
device is using. The device and the platform is considered as compatible
only BOARD_SYSTEMSDK_VERSIONS in the device compatibility matrix are
in the PLATFORM_SYSTEMSDK_VERSIONS in the framework manifest.

When BOARD_SYSTEMSDK_VERSIONS is set, a Java app or library in vendor or
odm partitions which didn't specify LOCAL_SDK_VERSION  is forced to use
System SDK. Also, the build system does the additional integrity check
to ensure that LOCAL_SDK_VERSION is within BOARD_SYSTEMSDK_VERSIONS or
PLATFORM_SYSTEMSDK_VERSIONS (if BOARD_SYSTEMSDK_VERSIONS isn't set).

Bug: 69088799
Test: m -j
Test: BOARD_SYSTEMSDK_VERSIONS=P m -j
Change-Id: Id38f02b4be86710411be22bc28109e6894f8a483
2018-01-19 15:42:18 +09:00
Sundong Ahn
ae792ae7b6 change vsdk_v$(ver) to system_sdk_v$(ver) am: b5b5b2667d am: be0a67a88f
am: 111fb11714

Change-Id: I5d109339920ca5fdd20d99878664dd635cb2e596
2018-01-18 07:21:25 +00:00
Sundong Ahn
b5b5b2667d change vsdk_v$(ver) to system_sdk_v$(ver)
The vsdk name is change to system sdk, so vsdk_v$(ver) need to
change to system_sdk_v$(ver)

Bug: 67724799
Test: build & boot on taimen
Change-Id: I9ac508f5ed2602fbf827e0b0e4c205ab01915525
2018-01-16 09:51:03 +09:00
Colin Cross
389e7d2748 Fix ordering of overlays am: 68a7023436 am: 88f36bb683
am: 1dc0a2a9e1

Change-Id: I65c7a071fa3e1062dc290e0333a466f15e9b8697
2018-01-05 03:14:09 +00:00
Colin Cross
2af261143b Add EMMA_INSTRUMENT_STATIC support am: 3144dfc966 am: b88d9eedb4
am: 2750279190

Change-Id: Icf183f74a7e542266a957ae8e7f2b1c43a24651e
2018-01-04 23:16:49 +00:00
Colin Cross
68a7023436 Fix ordering of overlays
Device overlays are passed to Soong in highest priority to lowest
priority order, but aapt2 keeps the last value provided on the
command line.  Reverse the order that overlayGlobResults are
collected.

Bug: 71595164
Test: app_test.go
Change-Id: Ibc6b8297f1548766c5c92f3be969b89736dc8dff
2018-01-04 14:52:45 -08:00
Colin Cross
3144dfc966 Add EMMA_INSTRUMENT_STATIC support
Add jacocoagent when instrumenting with EMMA_INSTRUMENT_STATIC.

Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_STATIC=true
Change-Id: I451bb9d16b7f0a66fd06c2da576062b28830e470
2018-01-04 14:52:45 -08:00
Colin Cross
327288f9de Merge "Fix jacoco_cli invocation" am: 41b97b3001 am: ce010f07f2
am: 18209122c5

Change-Id: I4057f16ccaeda459b155a14192cf16735badfcd8
2018-01-04 08:02:43 +00:00
Colin Cross
06de222514 Add R8 support am: 66dbc0bc32 am: aedcfc98d3
am: b97b4cb961

Change-Id: I990a4d094e97ba99cc46700a95b897afac88ffe9
2018-01-04 00:27:29 +00:00
Colin Cross
84c3882e64 Fix jacoco_cli invocation
jacoco_cli --dest takes a directory, not a jar name, and assumes
an output file with the same name as the input jar in that
directory.  Rename jacoco-report-classes.jar to
jacoco-report-classes/modulename.jar, and generate to
jacoco/tmp/modulename.jar before combining to the final output file
at jacoco/modulename.jar.

Bug: 69669951
Test: m EMMA_INSTRUMENT=true
Change-Id: Ia7dd881d2819ae09dfb60a00b4c1b8396629cd9a
2018-01-03 16:02:47 -08:00