Commit Graph

3766 Commits

Author SHA1 Message Date
Anton Hansson
9fda310903 Merge "Fix api_fingerprint.txt generation" am: 404adeefdc am: c0777462c5 am: 7c9e60e17c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1581731

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If70bb62104c8325e65e1d6ce78e5d04bc5948b66
2021-02-15 13:06:02 +00: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
89aceaf5bb Merge "Convert java.Dependency to JavaInfo provider" am: b87f4b4cab am: d8e4a38924 am: e34846731c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1581950

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia9d9fabb74ae93af91ac4a43ec6d822bc6748389
2021-02-13 02:31:47 +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
a043ca3586 Merge changes I831da5fa,I866916c9 am: c66769ddd9 am: 53606f14c3 am: 37f1591a5e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1579441

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I36b9fbacf953d98633b38a9183b4d455aa27fc22
2021-02-12 11:29:52 +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
fbc7b966a2 Merge "Add LOCAL_LICENSE_KINDS to build/soong" am: b68036f44b am: 0a1087f291 am: 66a854d585
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1575543

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icb7ac70ed37be73b84da59f8e1ad88daea3bfa80
2021-02-10 09:28:19 +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
b98ac88735 Merge "Allow cross-cutting dependencies like licenses." am: a3348295d4 am: c54c5770db am: 1ceaa1295c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1579112

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifc52afba3187b8a0964563ed70c17645ed401ddd
2021-02-10 04:02:34 +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
Treehugger Robot
1a590b58b4 Merge "Add android_test_helper_app properties to java_defaults" am: a6cfcac727 am: 747e441f33 am: ed2d9815c4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1579791

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I17074b09a7b6280b5bb5c9c28bb30a78f193ea85
2021-02-09 23:45:19 +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
11c732eb74 Merge "Move hiddenapi tools used by build/soong from frameworks/base" am: 937c91c406 am: d1f586407c am: 2f48726a64
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1579437

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0d2050dfaafd828de15c943d6feb61bfec7061fd
2021-02-09 17:19:05 +00: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
b98aaf5200 Merge "Allow dex jars from prebuilt_apex to be used by hiddenapi" am: 320e170675 am: 915cb8c6d8 am: b6256e51cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1578285

MUST ONLY BE SUBMITTED BY AUTOMERGER

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I99550ff783f029ba3dbf7ff2cd483a1c0b51b841
2021-02-09 15:44:47 +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
791a8f926b Merge "Turn missing jarjar output files into errors" am: ed7bfd9726 am: 5df2206de0 am: 5e33cdde3c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1580883

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5a9ccdbcd0ca601f9193cba12828e8133d13681d
2021-02-09 02:17:28 +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
5670d78e70 Merge "Enable android_app_import to supply framework-res." am: 5c2406bde9 am: 50b395b740 am: 6603b7ab73
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1543901

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I79683aa757a5ed1dea03f9deabaf436d46d8c3dd
2021-02-08 20:53:37 +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
aa0c15feef Merge "Remove duplicate entries from hiddenapi files" am: c6fcf29872 am: d32e59bb54 am: 98812a68a5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1575170

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I97ef153681eb786c143439a00545ccf95efc7404
2021-02-08 19:22:02 +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
7ef6c2b45c Add test for hiddenAPI index file generation am: 01289a2407 am: e510de2f58 am: 2229b27740
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1575169

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2dcb98a9a0c197a8f347c51f4e663e3c150aa2ac
2021-02-08 13:34:14 +00: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
5ce9f42f5a Merge changes I9e94662d,I4b4e0dc8 am: 254aee4843 am: 3c4acc4279 am: fbd6af6226
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1574746

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I81f78f2f4e54864be1dec87b2157f32428c54201
2021-02-07 15:52:30 +00:00