Commit Graph

32236 Commits

Author SHA1 Message Date
Paul Duffin
822b1b62f0 Merge "java_sdk_library: Remove unused SetNoDist method" am: defa9403a3 am: 21ba518097 am: dad85cd671
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1506237

Change-Id: Id5523a4e39cf886291c31d051bf5013d5e417b65
2020-11-20 11:20:34 +00:00
Paul Duffin
dad85cd671 Merge "java_sdk_library: Remove unused SetNoDist method" am: defa9403a3 am: 21ba518097
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1506237

Change-Id: Id7eabe03e0167ecc91b767f020a7561d6e2f1d69
2020-11-20 11:02:18 +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
9562a8eb55 Merge "soong_ui path.go: improve comments." am: 55e0022fc0 am: e6f2194126 am: efcd3400b0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1502731

Change-Id: I04216b710fff6331a75278c175875165bd9efa49
2020-11-20 06:22:13 +00:00
Jingwen Chen
707ba7df8b Merge "soong_ui kati.go: write more comments." am: 19362b16c3 am: 3ce704efaa am: 744a30fac1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1501164

Change-Id: Ifecf4bf9f6044f78929af383e9825bbda6abf3e2
2020-11-20 06:22:04 +00:00
Jingwen Chen
efcd3400b0 Merge "soong_ui path.go: improve comments." am: 55e0022fc0 am: e6f2194126
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1502731

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

Change-Id: I60eb2ff15af32e54a3989a4682f69e428789e7bf
2020-11-20 06:05:28 +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
13186ae8ea Merge "Support extra checks for ErrorProne in a dedicated property" am: 18e3e8fbc2 am: b742386721 am: c9ec32e084
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1506659

Change-Id: I6a868e7e03c2b148998196711acfda82f386887a
2020-11-20 03:31:51 +00:00
Colin Cross
c9ec32e084 Merge "Support extra checks for ErrorProne in a dedicated property" am: 18e3e8fbc2 am: b742386721
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1506659

Change-Id: I3a5ca75ae099bbe2c1b02fe60535b3c7dd0f9cd0
2020-11-20 02:47:09 +00:00
Jiyong Park
7e8eed256c Merge "Reorganize apex/apex.go" am: 09e9cb547a am: 5bd5a3a9f8 am: 295f8525be
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1504833

Change-Id: I488f5bd18a42b465cf3b4be18de81a91100a6d14
2020-11-20 02:32:03 +00:00
Julien Desprez
6c2b0d1c65 Merge "Use java host unit tests template for unit tests" am: 62aa21508c am: 706ee179ae am: efff25ce93
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1505512

Change-Id: I11c25d0e93715e7c226f0f98ea4916b8c3a4e9e0
2020-11-20 02:31:43 +00:00
Treehugger Robot
53cb19be2d Merge "Add more comments to arch.go" am: 44e2559f0f am: 23d5b6de26 am: 07cd7da340
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1500978

Change-Id: I4df2ac67e441b2cf267628ec01e29aea3622b0f8
2020-11-20 02:31:11 +00:00
Sasha Smundak
d92016409f Fix comments with continuation am: 7890211d58 am: 9e447a7a27 am: b631e72e6f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1505513

Change-Id: I8e76ee9a0260a045adf964c2192751db90870919
2020-11-20 02:30:00 +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
Jiyong Park
295f8525be Merge "Reorganize apex/apex.go" am: 09e9cb547a am: 5bd5a3a9f8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1504833

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

Change-Id: I590d8ad42445c39ad69fdf97efcbedd5750875aa
2020-11-20 02:07:44 +00:00
Treehugger Robot
07cd7da340 Merge "Add more comments to arch.go" am: 44e2559f0f am: 23d5b6de26
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1500978

Change-Id: I8c4c62294a87ea3c35aac1026f4c2dea48835631
2020-11-20 02:07:29 +00:00
Colin Cross
18e3e8fbc2 Merge "Support extra checks for ErrorProne in a dedicated property" 2020-11-20 02:06:19 +00:00
Sasha Smundak
b631e72e6f Fix comments with continuation am: 7890211d58 am: 9e447a7a27
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1505513

Change-Id: I752823f4b20c21674e58d30f5b3c8a0504e1838d
2020-11-20 02:05:35 +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
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
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
Paul Duffin
69cc037aa3 Merge changes from topic "fix-stubs-source-snapshot" am: b479459ac9 am: 5248161eaf am: e3ec3ea345
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1503793

Change-Id: I216e88acd98f974558e76ec29ac9f521f89436b2
2020-11-19 20:03:52 +00:00
Treehugger Robot
b5912057ec Merge "java link time error improve" am: e63ab5ea02 am: a5fc86f799 am: 4b4b9c5498
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1501002

Change-Id: I8682fd432236b04b40e80f56dfda66cbcf57dd0d
2020-11-19 20:03:02 +00: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
e3ec3ea345 Merge changes from topic "fix-stubs-source-snapshot" am: b479459ac9 am: 5248161eaf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1503793

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

Change-Id: I6bc2c57f8e8239f045cb9b0749fd46ee1a0864f6
2020-11-19 19:36:58 +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
bd09da2f50 Merge changes from topic "package" am: 7a64f7e5b6 am: 1b22324529 am: 3105213fe1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1496007

Change-Id: I81613a66378c52681073460bf88e28269598b881
2020-11-19 09:04:06 +00:00
Jiyong Park
dfb0d04d48 Introduce PackagingBase am: dda8f69e43 am: 217802c8d3 am: 9fcd3b23fd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1492003

Change-Id: I091195594de7ab8ff67b83852df5e65d24161145
2020-11-19 09:04:04 +00:00
Treehugger Robot
af88edc4bf Merge "zipsync handles symlink" am: 83f738cae2 am: b3b509b3a5 am: d7942fe948
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1502377

Change-Id: I4dc6fd17de92912713b57556534d3aa70dadca0d
2020-11-19 09:03:37 +00:00