Commit graph

27948 commits

Author SHA1 Message Date
Treehugger Robot
7ea5837252 Merge "Documenting android/apex.go" am: b26070efef
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1502070

Change-Id: I00437162d053047481144084fdba9036e2dc227f
2020-11-23 01:03:10 +00:00
Treehugger Robot
b26070efef Merge "Documenting android/apex.go" 2020-11-23 00:44:35 +00:00
Treehugger Robot
fa5a5f6a09 Merge "soong_ui ninja.go: comment and refactor." am: 5898d56912
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1501592

Change-Id: I40c5f838c3063a11c40cc4b71236ae22b999becb
2020-11-22 21:05:57 +00:00
Treehugger Robot
5898d56912 Merge "soong_ui ninja.go: comment and refactor." 2020-11-22 20:15:46 +00:00
Jingwen Chen
9d1cb491c3 soong_ui ninja.go: comment and refactor.
On top of improving the comments, I also refactored the status checker
to simplify and clarify its use case to be a ninja stuckness checker,
since it doesn't appear to have other purposes.

Test: TH presubmit
Bug: b/173474588
Change-Id: I2cf51a1ebf16071a24a1c13c06c7b1adf60256de
2020-11-21 07:37:28 -05:00
Colin Cross
bcd0b74aae Merge "Revert "Rewrite sbox to use a textproto manifest"" am: b893f8766c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1507524

Change-Id: I8f58c4611f8e159fa4ec03708f631c3bcb22df94
2020-11-20 19:21:22 +00:00
Colin Cross
b893f8766c Merge "Revert "Rewrite sbox to use a textproto manifest"" 2020-11-20 18:45:35 +00:00
Colin Cross
619b9ab260 Revert "Rewrite sbox to use a textproto manifest"
This reverts commit 151b9ff0cf.

Reason for revert: broke builds

Change-Id: I69b3b8795d5a36b4fa0debb1af2d433be3c15d6c
2020-11-20 18:44:31 +00:00
Colin Cross
71e74ba200 Merge "Rewrite sbox to use a textproto manifest" am: 60d06cf8df
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498171

Change-Id: I078aad149558df64a6311c957c4429cbfb144fc0
2020-11-20 18:14:11 +00:00
Colin Cross
3bd058a9de Merge "Add more comments to path_properties.go" am: 4181322f0a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1506242

Change-Id: Iab1c0c94044be49415f4dad43f79833a4022093a
2020-11-20 18:13:31 +00:00
Colin Cross
60d06cf8df Merge "Rewrite sbox to use a textproto manifest" 2020-11-20 17:43:29 +00:00
Colin Cross
4181322f0a Merge "Add more comments to path_properties.go" 2020-11-20 17:43:00 +00:00
Cindy Zhou
07b9b74371 Merge "Add CFI support for assembly heavy libraries" am: 1cfd8af0a8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1500330

Change-Id: Icc31acef62998b571a17e73ce28f2d11dfeed0d9
2020-11-20 13:21:13 +00:00
Paul Duffin
d94bd1ddff Merge "java_sdk_library: Stop disabling copy to dist when sdk_version: none" am: 05c2f3e29a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1506239

Change-Id: Ia489108dd4b4a95fb28f74b06799213c57264feb
2020-11-20 13:20:32 +00:00
Cindy Zhou
1cfd8af0a8 Merge "Add CFI support for assembly heavy libraries" 2020-11-20 13:11:33 +00:00
Paul Duffin
fb873a3048 Merge "java_sdk_library: Allow no_dist to be explicitly set in .bp file" am: de6df73b44
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1506238

Change-Id: Ie90ce1be6797e9effea153995862b79d5f93b8f5
2020-11-20 13:04:14 +00:00
Paul Duffin
05c2f3e29a Merge "java_sdk_library: Stop disabling copy to dist when sdk_version: none" 2020-11-20 12:48:11 +00:00
Paul Duffin
de6df73b44 Merge "java_sdk_library: Allow no_dist to be explicitly set in .bp file" 2020-11-20 12:47:43 +00:00
Paul Duffin
21ba518097 Merge "java_sdk_library: Remove unused SetNoDist method" am: defa9403a3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1506237

Change-Id: I8edb718f9d0a6d8f957e50ad92e15f0ec5e47c91
2020-11-20 10:29:34 +00:00
Paul Duffin
defa9403a3 Merge "java_sdk_library: Remove unused SetNoDist method" 2020-11-20 10:02:13 +00:00
Jingwen Chen
e6f2194126 Merge "soong_ui path.go: improve comments." am: 55e0022fc0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1502731

Change-Id: Id91fb286b18739f485b8b021c91bd548701c8694
2020-11-20 05:24:13 +00:00
Jingwen Chen
3ce704efaa Merge "soong_ui kati.go: write more comments." am: 19362b16c3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1501164

Change-Id: Ia5da2551c2a48e2ef7abf2bff2405c1449654b1c
2020-11-20 05:23:39 +00:00
Jingwen Chen
55e0022fc0 Merge "soong_ui path.go: improve comments." 2020-11-20 04:47:51 +00:00
Jingwen Chen
19362b16c3 Merge "soong_ui kati.go: write more comments." 2020-11-20 04:46:18 +00:00
Colin Cross
b742386721 Merge "Support extra checks for ErrorProne in a dedicated property" am: 18e3e8fbc2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1506659

Change-Id: Icf745bf337d7b5900396e74303c1e59ce597d8c6
2020-11-20 02:28:55 +00:00
Colin Cross
18e3e8fbc2 Merge "Support extra checks for ErrorProne in a dedicated property" 2020-11-20 02:06:19 +00:00
Jiyong Park
5bd5a3a9f8 Merge "Reorganize apex/apex.go" am: 09e9cb547a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1504833

Change-Id: Ia872975419e9eddb68c7e82efc5ff7a41598d3fa
2020-11-20 01:22:37 +00:00
Julien Desprez
706ee179ae Merge "Use java host unit tests template for unit tests" am: 62aa21508c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1505512

Change-Id: Ieff5faa54a6908051987cda7ad46a3d0e050f97a
2020-11-20 01:20:28 +00:00
Jiyong Park
09e9cb547a Merge "Reorganize apex/apex.go" 2020-11-20 01:18:51 +00:00
Treehugger Robot
23d5b6de26 Merge "Add more comments to arch.go" am: 44e2559f0f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1500978

Change-Id: I056ef563320bc6e8851edecf99dd30a8e7972b0e
2020-11-20 01:18:40 +00:00
Sasha Smundak
9e447a7a27 Fix comments with continuation am: 7890211d58
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1505513

Change-Id: Ic8af398cdfe92ea78471f59ca79b400dfc389f98
2020-11-20 01:16:41 +00:00
Jiyong Park
e4758ed844 Documenting android/apex.go
Mostly documentation changes, but includes a few refactorings like
changing the variable names, reording functions, reordering statements
in logical order, etc.

Bug: 173472337
Test: m
Change-Id: I000c76e818722ed06bac03d9de87588b23552b08
2020-11-20 10:07:19 +09:00
Julien Desprez
62aa21508c Merge "Use java host unit tests template for unit tests" 2020-11-20 00:07:41 +00:00
Jiyong Park
8e6d52f362 Reorganize apex/apex.go
The source code is reorganized following the order of the execution for
better readability. The order is as follows:

1) init
2) properties
3) module struct
4) deps mutator
5) post-deps mutator
6) generate build actions
7) module initialization for different sub types
8) misc (e.g. apex_available check, etc.)

Behavior is not touched.

Bug: 173472337
Test: m
Merged-In: I919fca468fa376273d498029e6ac2fa37998a4a6
Change-Id: I919fca468fa376273d498029e6ac2fa37998a4a6
2020-11-20 08:44:55 +09:00
Treehugger Robot
44e2559f0f Merge "Add more comments to arch.go" 2020-11-19 22:45:15 +00:00
Colin Cross
11c89c0e9e Add more comments to path_properties.go
Bug: 173449605
Test: m checkbuild
Change-Id: I2638da9cc56726f5d646424e72f52289ad093781
2020-11-19 14:28:46 -08:00
Colin Cross
748b2d829a Support extra checks for ErrorProne in a dedicated property
Previous extra checks for ErrorProne were added using the plugins
proeprty to get them into the -processorpath argument.  This works
fine for java-only modules, but fails for mixed java+kotlin modules
because the processorpath is given to kapt and not javac.

Add a dedicated errorprone.extra_check_modules property (mirroring
the lint.extra_check_modules property), and add that to a separate
processorpath that is used only for errorprone rules and not cleared
when kotlin is used.

Test: TestKapt/errorprone
Change-Id: Id6ef02ce758532d1df8b8d969fad83bb44fe93ab
2020-11-19 14:20:12 -08:00
Sasha Smundak
7890211d58 Fix comments with continuation
Backgound: aog/919954 tried to handle
```
   second line
```

but did it incorrectly. The parser works correctly (so this change
reverts aog/919954), it returns multiline comment, but the serializer
converting the internal representation to Blueprint was not emitting
'//' on the lines after the first.

Test: treehugger
Bug: 127521510
Change-Id: I0257a8b3cc4ffcaa6bea44113ceba66bb99d7e43
2020-11-19 11:52:20 -08:00
Paul Duffin
3aef8d2c1f java_sdk_library: Stop disabling copy to dist when sdk_version: none
Previously, setting "sdk_version: none" would have a side effect of
disabling copying to dist by default. This change removes that behavior
and will copy to dist by default unless explicitly specified.

This will have no impact on the dist because all java_sdk_library
modules that relied on the previous behavior to disable copying to
dist have been modified to explicitly disable copying to dist.

Test: lunch sdk-eng && m dist sdk
      compare out/dist/apistubs directories before and after this
      change to make sure that they have not changed.
Bug: 173715943
Change-Id: I376546b5a8b03de6c944961f7408dad22184fe49
2020-11-19 19:28:10 +00:00
Paul Duffin
4f5c1ef229 java_sdk_library: Allow no_dist to be explicitly set in .bp file
Currently, the no_dist property cannot be set in a .bp file and
defaults to true if the sdk_version property is set to none. That
behavior was added to prevent the output files from the libcore,
conscrypt and icu java_sdk_library modules from being copied to the
dist. It worked because they were the only java_sdk_library modules to
set "sdk_version: none".

Unfortunately, that default behavior is no longer required because
we want to be able to convert "conscrypt" module to a java_sdk_library
and have its public API output files be copied to the dist
automatically. This change allows the no_dist property to be explicitly
set in the .bp file so that those modules that rely on the implicit
behavior can explicitly specify it and allow the default behavior to
be removed.

This change:
* Removes the `blueprint:"mutated"` tag from the No_dist property which
  allows it to be specified in a .bp file.
* Only sets the default if the property has not been explicitly
  specified in a .bp file.

Test: lunch sdk-eng && m dist sdk
      compare out/dist/apistubs directories before and after this
      change to make sure that they have not changed.
Bug: 173715943
Change-Id: I8a1c97b690ae05bfe71ea72acc0831fa51aca7e9
2020-11-19 19:28:10 +00:00
Paul Duffin
e3ecd6c7a8 java_sdk_library: Remove unused SetNoDist method
This method was added for use in sysprop_library.go but it is no longer
used there. So, this change removes it.

Bug: 173715943
Test: m nothing
Change-Id: I0c2ae8a8d515faf2692eca2aaed63475fdb6a196
2020-11-19 19:28:05 +00:00
Colin Cross
a684540945 Add more comments to arch.go
Make sure every exported function or type has a godoc comment.

Also makes minor changes like unexporting functions that are not used
outside the package and fixing minor style warnings.

Bug: 173449605
Test: m checkbuild
Change-Id: I533a595d02035aae8b2b603590be639826d2d4c8
2020-11-19 11:20:05 -08:00
Paul Duffin
5248161eaf Merge changes from topic "fix-stubs-source-snapshot" am: b479459ac9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1503793

Change-Id: I710d7a4c235b5912b46edf690f44c04babf841bb
2020-11-19 19:16:35 +00:00
Treehugger Robot
a5fc86f799 Merge "java link time error improve" am: e63ab5ea02
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1501002

Change-Id: I6b896382dfe8137a93e349a50f38001b4ac8a984
2020-11-19 19:15:04 +00:00
Paul Duffin
b479459ac9 Merge changes from topic "fix-stubs-source-snapshot"
* changes:
  Fix prebuilt_stubs_sources to work with no stubs sources
  Revert "Use glob for java_sdk_library_import stub_srcs"
2020-11-19 18:39:02 +00:00
Treehugger Robot
e63ab5ea02 Merge "java link time error improve" 2020-11-19 18:38:16 +00:00
Julien Desprez
70898c4006 Use java host unit tests template for unit tests
Test: make aoa-helper-tests
Bug: 172961860
Change-Id: I2eaee277961f29adfd22e7c65248c9403bd69b81
2020-11-19 09:44:39 -08:00
Paul Duffin
1a39332cf6 Fix prebuilt_stubs_sources to work with no stubs sources
The framework-sdkextension java_sdk_library module defines an API for
public, system and module_lib API surfaces but the public API is empty.
The empty public API results in an empty .srcjar being repackaged and
merged into the sdkextension-sdk snapshot and results in no directory
for the public API stubs sources being created. Unfortunately, the
Android.bp file in the snapshot is created by Soong and it does not
know that the public API will be empty and so it creates an Android.bp
file that references the directory into which the stubs sources should
be added but which ends up not existing in the snapshot. Referencing a
non-existent directory causes a build failure.

This change fixes that issue by using PathForModuleSrc with no path
components to get the path to the module directory (which must exist)
and then resolving the module relative local src directory against
that. The local src directory is globbed to find all the files, which
will return an empty set of paths if the directory does not exist.
Finally, the file paths are passed as an rsp file to soong_zip to avoid
exceeding any command line limits.

Many other different approaches were considered:
* Adding a property to the java_sdk_library to indicate that the public
  API was actually empty. That would require extra maintenance by
  developers and would require some extra checks to be performed after
  generating the stubs source to ensure that it was empty which would
  complicate the build process.
* Creating a directory with some placeholder file (empty directories
  don't work well with git) that would force the creation of the
  directory. That file would most likely be created whether the API
  was empty or not, would need to be stored in git alongside the source
  and could be quite confusing to reviewers.

Bug: 173508731
Test: m nothing - to run new tests
      Build sdkextension-sdk, unpack it and then build the .srcjar
      files for the public, system and module_lib API surfaces.
      Without this change the build failed, reporting that the
      stubs_sources directory for the public API did not exist.
      With this change the build succeeded.
      Checked the contents of the resulting .srcjar files and made
      sure that the public one was empty and the others contained
      the SdkExtensions.java class and a package-info.java file.
Change-Id: Ia468a3f37349f2dbc21db67744bda6461498d515
2020-11-19 12:42:18 +00:00
Paul Duffin
ab5ac8f169 Revert "Use glob for java_sdk_library_import stub_srcs"
This reverts commit 7f97957ded.

Reason for revert: breaks sdk snapshots b/173508731
Bug: 173508731
Test: Ran prebuilts/runtime/update.py and then m nothing
      Before revert it failed
      After revert it worked

Change-Id: I9c081681fac589e37788a0d592435e3224011c58
2020-11-19 12:03:51 +00:00
Treehugger Robot
1b22324529 Merge changes from topic "package" am: 7a64f7e5b6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1496007

Change-Id: I87bb5a2dd72a0abe0c4d6114764cee22ff813a00
2020-11-19 08:04:05 +00:00