Commit graph

23569 commits

Author SHA1 Message Date
Colin Cross
c31efeb25c Set root dir in lint project.xml
Set the root dir in the project.xml for lint so that the paths in the
lint report are relative to the top of the tree instead of relative
to the project.xml.

Bug: 153485543
Test: run lint
Change-Id: Ie163a4dadd976e708f798855de73e58084931a91
2020-06-23 10:27:05 -07:00
Colin Cross
977b6a822d Set ANDROID_SDK_HOME when running lint
Lint tries to create ~/.android, set ANDROID_SDK_HOME to keep it
from attempting to write to the home directory, which may not be
writable.

Test: run lint
Bug: 159676171
Change-Id: I16375b88d309a8fa416b3a8efeabe15759889ae3
2020-06-23 10:25:03 -07:00
Jooyung Han
749dc69af1 apex/apk: enforce min_sdk_version of all deps
Enforce min_sdk_version for every payload dependency of updatable
APEX/APKs.

android.CheckMinSdkVersion() calls ApexModule.ShouldSupportSdkVersion
for every transitive dependency from APEX/APK modules to see if it
meets the min_sdk_version requirements.

The common implementation for apex/android_app is provided in
android/apex.go.

Bug: 145796956
Bug: 152655956
Bug: 153333044
Test: m nothing
Change-Id: I4a947dc94026df7cebd552b6e8ccdb4cc1f67170
2020-06-24 02:00:33 +09:00
Liz Kammer
bd19ce99d7 Merge "Rename variables with "-" in androidmk" am: 63a89ef82f am: f6a9e0e651
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1341761

Change-Id: I667f30081a10c58876370d414422905619b15c49
2020-06-23 16:22:34 +00:00
Liz Kammer
f6a9e0e651 Merge "Rename variables with "-" in androidmk" am: 63a89ef82f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1341761

Change-Id: I571a6f80a347746f7516dd8c812a650f58e3a0e4
2020-06-23 15:56:03 +00:00
Liz Kammer
63a89ef82f Merge "Rename variables with "-" in androidmk" 2020-06-23 15:35:13 +00:00
Jaewoong Jung
433ea2321a Change how override_modules work with prebuilts.
If an override module is overridden by a prebuilt, only skip its
installation instead of completely ignoring it, so that other modules
rely on it can still get configured and built properly.

Fixes: 159694118
Test: m checkbuild
Change-Id: I96d24f1440ff8a8aa8b1253fc22fd532b5588339
2020-06-23 08:18:02 -07:00
TreeHugger Robot
ab1017f672 Merge "Stem name should be fixed the same was as masterFile" into rvc-dev am: d4c3d0d162
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/11964438

Change-Id: I43c36268da968bf61f3419a903c9d35dc4bc01d6
2020-06-23 04:56:19 +00:00
TreeHugger Robot
d4c3d0d162 Merge "Stem name should be fixed the same was as masterFile" into rvc-dev 2020-06-23 04:43:47 +00:00
Sasha Smundak
3c904e8b77 Stem name should be fixed the same was as masterFile
BUG: 159641682
Test: TH

Change-Id: Ic0300676c35821cedc693eeb7b970318790f6189
2020-06-23 04:13:25 +00:00
Colin Cross
92285368e2 Merge "Make native_coverage clause work with ClangCoverage" am: c9ef6ee1b7 am: e1dd7bf4ec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1340832

Change-Id: I02b9d4f8fea3facdd4c41d633d49bd2006718fe5
2020-06-23 03:37:05 +00:00
TreeHugger Robot
737ff202ef [automerger skipped] Merge "VNDK listing contains device modules only" into rvc-dev am: 78d26d169b -s ours
am skip reason: Change-Id I50b09f526cbc081149d8241c2a091e3ee48ef4d7 with SHA-1 bba545e039 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/11908301

Change-Id: I387717f6ac1685594b91d3304e149e8073dffa7b
2020-06-23 03:26:12 +00:00
Colin Cross
e1dd7bf4ec Merge "Make native_coverage clause work with ClangCoverage" am: c9ef6ee1b7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1340832

Change-Id: I26e6fc8693552eeb4d016304855006b544b5b786
2020-06-23 03:19:51 +00:00
TreeHugger Robot
78d26d169b Merge "VNDK listing contains device modules only" into rvc-dev 2020-06-23 03:12:44 +00:00
Colin Cross
c9ef6ee1b7 Merge "Make native_coverage clause work with ClangCoverage" 2020-06-23 03:06:53 +00:00
Treehugger Robot
7a665a5902 Merge "Stem name should be fixed the same was as masterFile" am: bb28b8c9ca am: dc756332e2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1346596

Change-Id: I21839d389e2da56f0e5cead6ed660ffa7785b0e4
2020-06-23 02:09:27 +00:00
Treehugger Robot
dc756332e2 Merge "Stem name should be fixed the same was as masterFile" am: bb28b8c9ca
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1346596

Change-Id: I5667f5242bd5cb1a3042c617018fee883e9ac9f7
2020-06-23 01:57:40 +00:00
Treehugger Robot
bb28b8c9ca Merge "Stem name should be fixed the same was as masterFile" 2020-06-23 01:41:57 +00:00
Jooyung Han
18bdb7370e [automerger skipped] Merge "apex: make allowed_files prop overridable" am: 9b1e75f6f3 am: fbed5be807 -s ours
am skip reason: Change-Id I12744b0465dc3cfc90a66643867e65b4092cd0f7 with SHA-1 faa5399b3f is in history

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1346322

Change-Id: Ia1b580a520c387575872ebb6db53d0c50b506f58
2020-06-23 00:22:34 +00:00
Jooyung Han
fbed5be807 Merge "apex: make allowed_files prop overridable" am: 9b1e75f6f3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1346322

Change-Id: I6e882881149961c9bccf7a1c5ea0f240004d5c3d
2020-06-23 00:12:01 +00:00
Jooyung Han
9b1e75f6f3 Merge "apex: make allowed_files prop overridable" 2020-06-22 23:56:31 +00:00
Sasha Smundak
e88b436883 Stem name should be fixed the same was as masterFile
Fixes: 159641682
Test: treehugger

Change-Id: Ic0300676c35821cedc693eeb7b970318790f6189
2020-06-22 16:53:33 -07:00
Liz Kammer
e0070ee313 Implement OutputFiles for python modules.
This enables python binaries to be included in data properties with the
format ":module".

Test: m FirmwareDtboVerification with local changes
Bug: 153848038
Change-Id: I2a02dc382fcbb142d8e4fbdbb6ca461986627d25
2020-06-22 15:51:39 -07:00
Christopher Ferris
f70926eef0 Remove libc_scudo references.
Test: Builds and boots.
Change-Id: Iad97159e6193f7afffd8fbc9456427eee5d150e3
Merged-In: Iad97159e6193f7afffd8fbc9456427eee5d150e3
(cherry picked from commit 1f16b27511)
2020-06-22 15:27:56 -07:00
Treehugger Robot
9de48425a5 [automerger skipped] Merge "Fix build breakages when WITHOUT_CHECK_API=true" am: ea34d87759 am: 2855f3ccac -s ours
am skip reason: Change-Id I7b5fff40b870c9d754f779ff1c3314bac7e42440 with SHA-1 86672f6f4e is in history

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1344896

Change-Id: I0dbaf9ee37af996c7c839d18421408b3b04ad64f
2020-06-22 19:13:08 +00:00
Treehugger Robot
2855f3ccac Merge "Fix build breakages when WITHOUT_CHECK_API=true" am: ea34d87759
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1344896

Change-Id: I209eb787f5e1f201682b23cf0f5ccdffce063028
2020-06-22 18:50:30 +00:00
Treehugger Robot
ea34d87759 Merge "Fix build breakages when WITHOUT_CHECK_API=true" 2020-06-22 18:39:13 +00:00
Colin Cross
1a6acd4f39 Make native_coverage clause work with ClangCoverage
Make uses NATIVE_COVERAGE to enable gcov coverage and CLANG_COVERAGE
to enable clang coverage.  NATIVE_COVERAGE is translated to the Soong
Native_coverage product variable which triggers the native_coverage
clause in Android.bp files.  The clause also needs to be triggered
for CLANG_COVERAGE.

Rename the existing Native_coverage product variable to GcovCoverage,
and regenerate Native_coverage when either GcovCoverage or
ClangCoverage are set.

Also remove NativeLineCoverage, it wasn't doing anything differently
than Native_coverage.

Bug: 159059537
Test: m checkbuild
Change-Id: I215124a9b35a2ad50ad562079d392e3d33da11f4
2020-06-22 11:13:42 -07:00
TreeHugger Robot
966e995729 Merge "Enforce permitted_packages for Q+ and R+ modules" into rvc-dev am: d65089b4a4
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/11761419

Change-Id: I66510e2e3792623c77e0fea25d2043b963b1f951
2020-06-22 18:09:56 +00:00
TreeHugger Robot
d65089b4a4 Merge "Enforce permitted_packages for Q+ and R+ modules" into rvc-dev 2020-06-22 17:55:16 +00:00
Jooyung Han
b365f35fef Merge "apex: make allowed_files prop overridable" into rvc-dev am: d166f79278
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/11931025

Change-Id: I2600c560d596446af255b117abfc07dc1d1f1860
2020-06-22 17:20:52 +00:00
Jooyung Han
938b593887 apex: make allowed_files prop overridable
Because override_apex can modify the contents of the base apex,
allowed_files (which describes the contents) should be overridable.

Bug: 159503079
Bug: 159392784
Bug: 158169437
Test: m (soong test added)
Merged-In: I12744b0465dc3cfc90a66643867e65b4092cd0f7
Change-Id: I12744b0465dc3cfc90a66643867e65b4092cd0f7
(cherry picked from commit faa5399b3f)
2020-06-23 02:10:46 +09:00
Jooyung Han
d166f79278 Merge "apex: make allowed_files prop overridable" into rvc-dev 2020-06-22 17:05:58 +00:00
Paul Duffin
ff6e55b301 Merge "Fix build breakages when WITHOUT_CHECK_API=true" into rvc-dev am: 4c21463f04
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/11931085

Change-Id: Ibf4d31078a4a206c7296241aef8c06cfa7b0becb
2020-06-22 12:50:21 +00:00
Paul Duffin
10269f1da9 Fix build breakages when WITHOUT_CHECK_API=true
Bug: 158578354
Test: export WITHOUT_CHECK_API=true
      m checkbuild
Change-Id: I7b5fff40b870c9d754f779ff1c3314bac7e42440
Merged-In: I7b5fff40b870c9d754f779ff1c3314bac7e42440
2020-06-22 12:40:24 +00:00
Paul Duffin
4c21463f04 Merge "Fix build breakages when WITHOUT_CHECK_API=true" into rvc-dev 2020-06-22 12:39:41 +00:00
Thiébaud Weksteen
b6db6de842 Add standard rustfmt.toml
This configuration is to be used for all internal Rust crates.

Test: rustfmt --print-config current --config-path build/soong/scripts/ .
Bug: 157238653
Change-Id: Ic49027dd1530f503e2c1f781453cdee95a983252
2020-06-22 13:34:59 +02:00
Paul Duffin
968ffd1f60 [automerger skipped] Instrument the java_sdk_library implementation library am: 49d3a523bf -s ours
am skip reason: Change-Id I8183bd9613dfaf0ded5f9ac36567d5d29a8941e8 with SHA-1 296cf33171 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/11925242

Change-Id: I2a4710240906dbf144238a40901a549f1e3b1676
2020-06-20 19:13:43 +00:00
Paul Duffin
5702d40eee [automerger skipped] Fix check-boot-jars when a boot jar is provided by prebuilt am: 9ee66da850 -s ours
am skip reason: Change-Id I545c5c9072dd472337d2f9b4dfdf08f53c981662 with SHA-1 44b481b81b is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/11895159

Change-Id: I8780ec3d28cb2971cffd576582c06dd48ef3b12f
2020-06-20 19:13:41 +00:00
Paul Duffin
49d3a523bf Instrument the java_sdk_library implementation library
Bug: 159241638
Test: build jacoco-report-classes-all.jar with and without
      prebuilt for framework-tethering. Ensure it contains the
      jacoco-report-classes.jar for framework-tethering.
Change-Id: I8183bd9613dfaf0ded5f9ac36567d5d29a8941e8
Merged-In: I8183bd9613dfaf0ded5f9ac36567d5d29a8941e8
2020-06-20 11:38:22 +01:00
Paul Duffin
9ee66da850 Fix check-boot-jars when a boot jar is provided by prebuilt
Previously, when a boot jar was provided by a java_sdk_library_import
module the check-boot-jars check failed because the file it depended on
was not available. In an incremental build the build failed due to the
file in the out directory not having a rule to generate it.

That was because the module was named prebuilt_<module>.<apex> instead
of <module>.<apex>. This was fixed by simply removing prebuilt_ prefix
from the name if it was present.

After fixing that the check-boot-jars still did not work properly
because it was expecting a jar file containing .class files but instead
was given a jar file containing .dex files which meant the check did
not work properly.

This was fixed by defining a new ApexDependency interface for use by
the apex/apex.go code to use instead of java.Dependency for generating
the androidmk entries. The *SdkLibraryImport type then implemented
those, by delegating to the implementation library.

Bug: 158304459
Bug: 159112414
Test: m check-boot-jars
      m checkbuild
	  manual inspection of the .jar file used by check-boot-jars to
	  ensure it contained .class files and not .dex files.
Change-Id: I545c5c9072dd472337d2f9b4dfdf08f53c981662
Merged-In: I545c5c9072dd472337d2f9b4dfdf08f53c981662
2020-06-20 11:38:08 +01:00
Jooyung Han
faa5399b3f apex: make allowed_files prop overridable
Because override_apex can modify the contents of the base apex,
allowed_files (which describes the contents) should be overridable.

Bug: 159503079
Bug: 159392784
Bug: 158169437
Test: m (soong test added)
Change-Id: I12744b0465dc3cfc90a66643867e65b4092cd0f7
2020-06-20 12:56:49 +09:00
Yo Chiang
c2ade3fb63 Merge "java_sdk_library: Require xml permission file only if it is generated" am: 34753055d1 am: cdb20caaca
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1324106

Change-Id: I5de0149b8c0afcab72c9c75cca6ae3c33d788402
2020-06-20 03:51:33 +00:00
Yo Chiang
cdb20caaca Merge "java_sdk_library: Require xml permission file only if it is generated" am: 34753055d1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1324106

Change-Id: I7d4840e75d7e9e96bf1a088b5a73f3ef424b2dcf
2020-06-20 03:35:32 +00:00
Yo Chiang
34753055d1 Merge "java_sdk_library: Require xml permission file only if it is generated" 2020-06-20 03:19:17 +00:00
Ramy Medhat
0b85c50817 Merge "Add sandbox property to the javadoc rule." am: 997a2f5b4e am: a195919e38
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1335053

Change-Id: I31135dccd6451355fdaff3f86db309f45fc2a2a7
2020-06-20 01:58:49 +00:00
Ramy Medhat
a195919e38 Merge "Add sandbox property to the javadoc rule." am: 997a2f5b4e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1335053

Change-Id: I799306fdf6e99e5bb564224520fc45311d8f3523
2020-06-20 01:45:57 +00:00
Ramy Medhat
997a2f5b4e Merge "Add sandbox property to the javadoc rule." 2020-06-20 01:33:24 +00:00
Colin Cross
2ef6a3b3dd [automerger skipped] Merge changes I25c77994,I7da78ef4,I89197d0a into rvc-dev am: 5ef04d1ee7 -s ours
am skip reason: Change-Id I25c7799438cfec43163e757637c65b8657488d36 with SHA-1 92e4b46af5 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/11931844

Change-Id: Ie7aa6484a4b23d27e20cadb03db627250a4a08dd
2020-06-20 00:02:19 +00:00
Colin Cross
5ef04d1ee7 Merge changes I25c77994,I7da78ef4,I89197d0a into rvc-dev
* changes:
  Support adding extra lint checks
  Allow kotlin modules to skip packaging the kotlin stdlib
  Fix annotation processors in kotlin modules that generate resources
2020-06-19 23:48:25 +00:00