Commit Graph

3486 Commits

Author SHA1 Message Date
Jiyong Park
605bc52821 Merge "Linktype check error message becomes more correct" am: 4941e4b9d1 am: 4de1a5651f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1593811

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3f9b8a7add946d82ea2adecc53ffc44176aea01f
2021-02-18 15:46:44 +00:00
Jiyong Park
4941e4b9d1 Merge "Linktype check error message becomes more correct" 2021-02-18 11:32:03 +00:00
Anton Hansson
9b74b06e65 Merge "Use genrule instead of filegroup for api files" am: 3de06eae5b am: e223268ed8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1592331

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If3e7f7af46b93dd25fb5eca1e820bf32b2e1144c
2021-02-18 10:43:19 +00:00
Anton Hansson
3de06eae5b Merge "Use genrule instead of filegroup for api files" 2021-02-18 09:28:01 +00:00
Martin Stjernholm
dd34be43f1 Merge "Move the logic to add jacocoagent in instrumentation builds to make." am: 71c139dced am: 2eed280a39
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1592232

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I526b557a0e82d2b953b0b603ae8b2a5dc9bcba95
2021-02-18 09:06:43 +00:00
Jiyong Park
670e0f62a6 Linktype check error message becomes more correct
The type linkType has String() method and the error message is created
using it.

Bug: 180477804
Test: m nothing
Change-Id: I74fe9c93b74904177dbe9d29cd3aa3304b67ba4f
2021-02-18 13:10:18 +09:00
Anton Hansson
c79d412b8a Use genrule instead of filegroup for api files
filegroups have the unfortunate limitation that they don't create phony
targets for building them in a convenient way. Also, having a single
output file fits better with the genrule concept.

Test: m framework-sdkextensions.api.public.latest
Change-Id: I229410658b04403ff1ff6abd4116a65aaa02b83b
2021-02-17 17:16:43 +00:00
Martin Stjernholm
0a9dae6e9a Move the logic to add jacocoagent in instrumentation builds to make.
Test: m nothing
Test: m nothing EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true
Bug: 180325915
Change-Id: Ieec8c8a122ff930e14cef4b5a0a2f9fc9e3b70ad
2021-02-17 14:41:07 +00:00
Jiyong Park
1cea07c8ab Revert "data dependency of java_test_host can be arch-specific" am: 2b0e4908c2 am: 4362e740af
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1588300

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2e78f3d281517016afeb7b24d5dd1b8249124183
2021-02-17 00:25:41 +00:00
Jiyong Park
4362e740af Revert "data dependency of java_test_host can be arch-specific" am: 2b0e4908c2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1588300

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iae42079a404a59730f2eb622fa39d462610f0c50
2021-02-16 23:54:29 +00:00
Treehugger Robot
b913011777 Merge changes from topic "mkboot"
* changes:
  prebuilt_etc is OutputFileProducer
  Revert "`data` dependency of java_test_host can be arch-specific"
2021-02-16 23:27:32 +00:00
Paul Duffin
de2b2c98bb Allow explicitly specified additional annotations for hiddenapi am: 031d8693b3 am: bf069dad5a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1587494

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1ecd067d64af390dfebd2bdbf3520765dbda3906
2021-02-16 18:52:01 +00:00
Paul Duffin
031d8693b3 Allow explicitly specified additional annotations for hiddenapi
Adds the hiddenapi_additional_annotations to allow a library to list
the libraries that provided additional hiddenapi related annotations
for a library.

Modifies merge_csv.py so it can process multiple zip files at the same
time and uses that to merge the embedded .uau files from a module and
those it depends upon.

Bug: 180102243
Test: m droid
      Verified that hiddenapi files (both aggregated ones and for the
      individual modules) are not affected by this change.
Change-Id: I796520021c7357398a9e2a09f1029e4a578b05b3
2021-02-16 13:28:26 +00:00
Jiyong Park
2b0e4908c2 Revert "data dependency of java_test_host can be arch-specific"
This reverts commit cdd9b8392d.

Reason: this doesn't work. java_test_host is a multi target module.
Therefore, `arch.<arhc>.data` is not collapsed to `data` by the arch
mutator.

Bug: N/A
Test: N/A
Change-Id: I755b06718bacfe1513f6ad1e734e5a0d0ac57cd8
2021-02-16 06:58:53 +09:00
Anton Hansson
7c9e60e17c Merge "Fix api_fingerprint.txt generation" am: 404adeefdc am: c0777462c5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1581731

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia43c021f7af85264ae738b42cef5047419471ce1
2021-02-15 12:33:21 +00:00
Anton Hansson
404adeefdc Merge "Fix api_fingerprint.txt generation" 2021-02-15 11:31:37 +00:00
Colin Cross
e34846731c Merge "Convert java.Dependency to JavaInfo provider" am: b87f4b4cab am: d8e4a38924
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1581950

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2ff7cb15041e62bd04bfba91706fce1940f528af
2021-02-13 01:32:27 +00:00
Colin Cross
b87f4b4cab Merge "Convert java.Dependency to JavaInfo provider" 2021-02-13 00:39:24 +00:00
Paul Duffin
37f1591a5e Merge changes I831da5fa,I866916c9 am: c66769ddd9 am: 53606f14c3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1579441

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib789cc734436bdbe03aa476f4021f785ee2559c9
2021-02-12 11:13:03 +00:00
Paul Duffin
f75e527c2b Move logic for selecting the primary module into initHiddenAPI()
Bug: 178361284
Test: m droid
      Verified that hiddenapi files (both aggregated ones and for the
      individual modules) are not affected by this change.
      Also verified that the hiddenapi files created when using the
      prebuilts (using SOONG_CONFIG_art_module_source_build=false) are
      the same as when using the source. There is a slight difference
      in the order but otherwise identical.
Change-Id: I831da5fa41eb7668b07bbdc4dd08ec2cdb8803d0
2021-02-11 15:43:28 +00:00
Paul Duffin
e7975ff77c Ensure that <x>-hiddenapi modules are included in hiddenapi-index.csv
Adds a test that makes sure that <x>-hiddenapi modules that provide
additional annotations for the <x> boot jar module are included when
generating the hiddenapi-index.csv file.

Bug: 178361284
Test: m nothing
Change-Id: I866916c9275af17954e0634347d183228d4ddc17
2021-02-11 15:43:28 +00:00
Anton Hansson
973d31c757 Fix api_fingerprint.txt generation
Use the generated txt files as input instead
of globbing for now non-existent files.

Also add the system server api txt to the hash.

Bug: 179807354
Test: verify out/soong/api_fingerprint.txt changes now
Test: verify the command in the ninja file looks ok:
      grep api_fingerprint out/soong/build.ninja
Change-Id: I7a49ca134eb93b22537a4f3054285eb15f8c4256
2021-02-11 09:17:10 +00:00
Treehugger Robot
66a854d585 Merge "Add LOCAL_LICENSE_KINDS to build/soong" am: b68036f44b am: 0a1087f291
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1575543

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I17bbc2d510465587580cf26e55e4f65a952e198c
2021-02-10 08:30:03 +00:00
Treehugger Robot
b68036f44b Merge "Add LOCAL_LICENSE_KINDS to build/soong" 2021-02-10 07:18:29 +00:00
Bob Badour
1ceaa1295c Merge "Allow cross-cutting dependencies like licenses." am: a3348295d4 am: c54c5770db
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1579112

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I684cfc27181c698d877be341c735cfe922b24357
2021-02-10 03:42:45 +00:00
Bob Badour
a3348295d4 Merge "Allow cross-cutting dependencies like licenses." 2021-02-10 02:46:40 +00:00
Colin Cross
dcf71b299c Convert java.Dependency to JavaInfo provider
Export information about java dependencies through a Provider
instead of accessing the module directly.

Test: java_test.go
Test: no changes to build.ninja
Change-Id: Ifc5d566bf6f6ebc0ad399e948effaa1ef6a22876
2021-02-09 15:36:25 -08:00
Treehugger Robot
ed2d9815c4 Merge "Add android_test_helper_app properties to java_defaults" am: a6cfcac727 am: 747e441f33
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1579791

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I50300bd49812dc509855e9343f93a3f4003f570c
2021-02-09 22:49:31 +00:00
Treehugger Robot
a6cfcac727 Merge "Add android_test_helper_app properties to java_defaults" 2021-02-09 21:10:27 +00:00
Colin Cross
cbce0b0dbd Add android_test_helper_app properties to java_defaults
Allows android_test_helper_apps to get their test_suites and
auto_gen_config properties from a java_defaults module.

Fixes: 179744452
Test: m checkbuild
Change-Id: Ifa09f9fd0a51d3a9682401e4c6bd2f82cd4f1b8a
2021-02-09 10:38:30 -08:00
Paul Duffin
2f48726a64 Merge "Move hiddenapi tools used by build/soong from frameworks/base" am: 937c91c406 am: d1f586407c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1579437

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4dd3d3c573eca04f6b8dcf92b18d73e019f1b46c
2021-02-09 16:48:45 +00:00
Paul Duffin
b6256e51cb Merge "Allow dex jars from prebuilt_apex to be used by hiddenapi" am: 320e170675 am: 915cb8c6d8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1578285

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic96272d781806b7afb5b4afb2e81130ac131b43d
2021-02-09 15:18:20 +00:00
Paul Duffin
061c4657d7 Merge "Refactor the hiddenAPI() method for reusability" am: b71a8de0d5 am: 714a66dfdd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1578284

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I09df412275fbfaa1ac67a36d5fc3f6b4b5ba0418
2021-02-09 15:18:14 +00:00
Paul Duffin
fd7610df22 Merge "Extract initHiddenAPI() from hiddenapi()" am: abe1abd224 am: 36d3011783
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1578283

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I75aeebfbfc844b45bc99b3c395b82e7c148e4a5b
2021-02-09 15:18:08 +00:00
Paul Duffin
937c91c406 Merge "Move hiddenapi tools used by build/soong from frameworks/base" 2021-02-09 15:17:42 +00:00
Paul Duffin
320e170675 Merge "Allow dex jars from prebuilt_apex to be used by hiddenapi" 2021-02-09 13:58:12 +00:00
Paul Duffin
b71a8de0d5 Merge "Refactor the hiddenAPI() method for reusability" 2021-02-09 13:57:52 +00:00
Paul Duffin
abe1abd224 Merge "Extract initHiddenAPI() from hiddenapi()" 2021-02-09 13:57:37 +00:00
Paul Duffin
fdada68320 Move hiddenapi tools used by build/soong from frameworks/base
Also, creates a python_binary_host module for generate_hiddenapi_lists
and uses that when constructing the build rule rather than using the
file directly.

Bug: 177317659
Test: m droid
      Verified that hiddenapi files (both aggregated ones and for the
      individual modules) are not affected by this change.
Change-Id: Ia11bb203ce5a74740d35f1b7e86716e15aad336e
2021-02-09 10:46:36 +00:00
Treehugger Robot
5e33cdde3c Merge "Turn missing jarjar output files into errors" am: ed7bfd9726 am: 5df2206de0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1580883

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I73c739173cf091fb83a65f93ff91a25eb17223fc
2021-02-09 01:22:01 +00:00
Treehugger Robot
ed7bfd9726 Merge "Turn missing jarjar output files into errors" 2021-02-08 23:47:13 +00:00
Bill Peckham
6603b7ab73 Merge "Enable android_app_import to supply framework-res." am: 5c2406bde9 am: 50b395b740
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1543901

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia87c7583798ab5c053a154dd8d67b579dd65d8e7
2021-02-08 20:19:59 +00:00
Treehugger Robot
98812a68a5 Merge "Remove duplicate entries from hiddenapi files" am: c6fcf29872 am: d32e59bb54
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1575170

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If31c8c3b53942a9880266fe3623ee7cff6cb7703
2021-02-08 19:19:03 +00:00
Bill Peckham
5c2406bde9 Merge "Enable android_app_import to supply framework-res." 2021-02-08 19:15:10 +00:00
Paul Duffin
9d67ca6ab7 Allow dex jars from prebuilt_apex to be used by hiddenapi
Invokes hiddenAPIExtractInformation() on the dex jar provided by the
deapexer (on behalf of prebuilt_apex) so that hiddenAPI can extract the
information it needs, if anything, from the dex file (and accompanying
classes implementation file).

The dex file provided by deapexer has already had the hiddenapi
information encoded into it so it does not need to do that again.

This change adds the primary parameter to hiddenAPIExtractInformation()
and checks it (and also the hiddenAPI.active property) before it does
anything. That ensures that it behaves correctly when called directly
as well as when called from hiddenAPIExtractAndEncode().

Bug: 178361284
Test: m droid
      Verified that hiddenapi files (both aggregated ones and for the
      individual modules) are not affected by this change.
      Also verified that the hiddenapi files created when using the
      prebuilts (using SOONG_CONFIG_art_module_source_build=false) are
      the same as when using the source. There is a slight difference
      in the order but otherwise identical.
Change-Id: I7abb63fd310bb94787ab7f4821e5fd283dc03046
2021-02-08 19:10:50 +00:00
Paul Duffin
4fd997bc13 Refactor the hiddenAPI() method for reusability
A follow up change needs to be able to contribute to the information
the hiddenapi process collates without having a dex file encoded. This
change pushes all the functionality related to information gathering
into the hiddenAPIGenerateCSV() method and then renames it and the
hiddenAPI() method to make it clearer what they do.

Bug: 178361284
Test: m droid
      Verified that hiddenapi files (both aggregated ones and for the
      individual modules) are not affected by this change.
Change-Id: I04417720216a0fbadcd88e6185e7de6570af6216
2021-02-08 19:10:50 +00:00
Paul Duffin
4103e92c4b Extract initHiddenAPI() from hiddenapi()
Previously, the hiddenapi() method combined both checks to determine
whether a module contributed to/was modified by the hiddenapi process
and logic to create ninja rules to perform those tasks. This change
separates the former out into a new initHiddenAPI() method.

The main purpose of this is to simplify the process of allowing the
CSV generation to be separated from the encoding. That is required
because when a java_import retrieves its dex file from the apex it
has already been encoded.

The initHiddenAPI() method is only called for java.Library (and
indirectly for java.SdkLibrary) and java.Import modules which means
that the hiddenapi() method does nothing for any other module type.
That is consistent with the previous behaviour because while the
hiddenapi() method is called for other module types they fail because
the boot image jars only support java_library, java_sdk_library,
and java_import at the moment. While it will need to support
java_sdk_library_import once any of the libraries that are currently
provided as java_sdk_library modules switches to providing prebuilts
that is outside the scope of this work.

Bug: 178361284
Test: m droid
      Verified that hiddenapi files (both aggregated ones and for the
      individual modules) are not affected by this change.
Change-Id: Iaa91e0a8e2bffec03296dd894e9662556f4464c0
2021-02-08 19:10:50 +00:00
Colin Cross
d97cf63cdf Turn missing jarjar output files into errors
Jarjar doesn't exit with a nonzero return code when there is a syntax
error in a rules file and doesn't write the output file.  Without a
nonzero return code ninja prints a warning but continues, which leads
to stale results on incremental builds where the output file already
exists, or delayed errors on clean builds whre the output file didn't
exist.

Delete the output file before running jarjar, and then check if it
exists after running jarjar.

Fixes: 119516143
Test: m out/target/common/obj/APPS/TeleService_intermediates/classes.jar
Change-Id: I7e9f7ff34de565a986ab0dc6e375f606c91c3846
2021-02-08 10:14:04 -08:00
Paul Duffin
2229b27740 Add test for hiddenAPI index file generation am: 01289a2407 am: e510de2f58
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1575169

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7aa50863bc76dfb8f9a790b824da7fcc087626c9
2021-02-08 12:59:16 +00:00
Paul Duffin
fbd6af6226 Merge changes I9e94662d,I4b4e0dc8 am: 254aee4843 am: 3c4acc4279
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1574746

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4321f7fb64832e85399a20bea30a5a07ca6e93eb
2021-02-07 15:29:20 +00:00