Commit graph

5704 commits

Author SHA1 Message Date
Ember Rose
7c57af39e5 Rename InvalidNullabilityOverride suppression
Test: N/A
Bug: 227661934
Change-Id: I26fcb5b7de58e8c982054a5a54e3526e0b8be2a2
2022-04-01 10:38:54 -04:00
Bob Badour
2a5c090c31 Fix breakage: bad path join using '/' literal
Typo in filename s/b NOTICE.html.gz not NOTICES.html.gz

Bug: 227682036

Test: TARGET_BUILD_VARIANT=userdebug UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true vendor/google/build/mainline_modules_bundles.sh -j97

Change-Id: I75cc28e3ef22d975ad46f4e167071f6d82ba253d
2022-03-31 23:40:28 -07:00
Bob Badour
43c2dcaef6 Build notice files from license metadata.
Switch from generate-notice-files.py and mergenotice.py to htmlnotice.

Bug: 151177513
Bug: 213388645
Bug: 210912771

Test: m droid dist reportmissinglicenses
Change-Id: I6cac049d24f35ec358c6f341a04f4ba6161703bf
2022-03-31 17:29:01 +00:00
Sam Delmerico
3c25ab1ac3 Merge changes I8e4c3f37,I89a32bde
* changes:
  add plugins to javaLibraryAttributes
  convert java_import_host with bp2build; enable jetifier
2022-03-30 21:08:12 +00:00
Treehugger Robot
d93afba1e6 Merge changes from topic "no-srcs-no-deps"
* changes:
  enable conversion of all java_import modules
  emulate java_library static_deps with Bazel exports
2022-03-30 21:06:46 +00:00
Sam Delmerico
77267c7d9c add plugins to javaLibraryAttributes
Test: go test ./bp2build
Change-Id: I8e4c3f373c62c60ea5013cd8c585915a366c1f81
2022-03-30 19:19:13 +00:00
Sam Delmerico
5f83b491b4 convert java_import_host with bp2build; enable jetifier
Also, add java_imports that were blocked by jetifier binary.
b/221082840 was blocking the build of jetifier which these java_imports
depended on. That bug is now resolved, so we can unblock these targets.

Bug: 220168131
Test: b build //packages/apps/Car/libs/car-ui-lib/car-ui-androidx/...
Test: build/bazel/ci/bp2build.sh
Change-Id: I89a32bde30c133a44aeb7826afa11d4140433f5d
2022-03-30 19:19:13 +00:00
Sam Delmerico
c016143602 emulate java_library static_deps with Bazel exports
In Soong, java_library can specify static_deps which are dependencies
that get aggregated into the final jar (akin to static linking). This is
useful because it allows dependencies higher up in the chain to compile
against the APIs exported by transitive dependencies. Bazel does not
support this functionality directly, but it can be emulated via the
exports attribute which makes any targets listed in the attribute public
to targets further up the chain.

Bug: 217236083
Bug: 219908977
Test: b build //external/error_prone:error_prone_core
Test: b build //external/bouncycastle:bouncycastle-host
Test: b build --platforms=//build/bazel/platforms:linux_x86
  //prebuilts/sdk/tools/jetifier/jetifier-standalone:jetifier
Change-Id: I2867e3f816de720a6f4bd9ff7a847d1b0c2da2d6
2022-03-30 18:58:38 +00:00
Colin Cross
f61766e987 Use turbine instead of kapt for kotlin annotation processors
Follow Bazel by using turbine instead of kapt to run annotation
processors.  This still requires using kapt to generate java stubs
of kotlin soruces, then uses turbine to run annotation processors
on the java stubs and any java sources to generate sources and
resources, and passes the annotation processor generated sources
to kotlinc and javac.

Bug: 225013372
Test: m checkbuild
Test: TestKapt
Change-Id: I9c6fc496a9fba64658bb062538bc5f7b9478b07a
2022-03-25 10:28:50 -07:00
Colin Cross
411647e8f4 Don't use ziptime or --temp_dir for turbine
Turbine sets dates to 2010 and doesn't need ziptime any more, and
ignores the --temp_dir flag.

Bug: 225013372
Test: m checkbuild
Change-Id: I6122f27d873ca671050e4dc0d65641bb52e90e99
2022-03-25 10:26:47 -07:00
Spandan Das
ad40fffa64 Merge changes I4c373b29,I9ccda6fc,I1b390b0e,I30151217
* changes:
  Do not propagate strict updatability linting to libcore/
  Create allowlist to skip strict updatability lint check
  Propagate strict_updatability_linting to transitive deps of updatable apexes
  Export LintDepSetsIntf from java package
2022-03-24 16:38:20 +00:00
Colin Cross
057beb2146 Merge "Collect deps from r8" 2022-03-22 16:40:30 +00:00
Colin Cross
22e6a6f69a Collect deps from r8
Use the new --deps-file argument to collect a deps file from r8, which
will correctly track files included by proguard flags files.

Fixes: 221956283
Test: manual
Change-Id: I92341948311c2c994cc0ae032dc19e09b2e80550
2022-03-22 16:40:13 +00:00
Treehugger Robot
c4ad11ec28 Merge "Prevent kotlinc from reading /tmp/build.txt" 2022-03-22 07:28:05 +00:00
Treehugger Robot
bc1217b4e7 Merge "Revert "225341614: Enforce ExtraText in platform builds"" 2022-03-21 21:40:12 +00:00
Treehugger Robot
2f39f7dacd Merge "Don't pass static libs to r8" 2022-03-21 19:21:02 +00:00
Tor Norbye
73dca5c905 Revert "225341614: Enforce ExtraText in platform builds"
This reverts commit 4c471458ec.

Reason for revert: There were failures in some build targets that
must not have run during presubmit checks (for example,
aosp-master/errorprone@8332220)

Change-Id: I220fd70df663ba49d876fb3ebf841fa9f3f06b97
2022-03-21 18:56:14 +00:00
Tor Norbye
4c471458ec 225341614: Enforce ExtraText in platform builds
Bug: 225341614
Test: N/A
Change-Id: Ic2ed5006643f3646315f16fe77552398f38c0265
2022-03-21 08:12:25 -07:00
Colin Cross
c2d504873f Prevent kotlinc from reading /tmp/build.txt
Pass -Didea.plugins.compatible.build=999.SNAPSHOT to kotlinc and kapt
to prevent it from reading /tmp/build.txt and failing with an obscure
exception:
exception: java.lang.ExceptionInInitializerError
	at com.intellij.openapi.util.BuildNumber.currentVersion(BuildNumber.java:297)
...

Bug: 222162908
Test: m metalava with /tmp/build.txt present
Change-Id: I5faced4a2e94561ce3aa37bfaacf5bd7d988a4f0
2022-03-18 20:48:51 +00:00
Colin Cross
9bb9bfb349 Don't pass static libs to r8
r8 gets the static libs in the program jar, it shouldn't also get
them as library jars.  Keep a separate classpath for dexing that
includes libs but not static_libs.

Bug: 222468116
Test: m checkbuild
Test: TestD8
Test: TestR8
Change-Id: Icca3393f496cbcadcc633f3b156761e6c145f975
2022-03-18 20:48:27 +00:00
Paul Duffin
2cb89166df Merge "Make bootclasspath_fragment hidden API package checks exhaustive" 2022-03-18 18:42:37 +00:00
Nicolas Geoffray
1a9df2604c Merge "Pass --preloaded-classes to boot image compilation." 2022-03-18 13:41:59 +00:00
Paul Duffin
846beb7f54 Make bootclasspath_fragment hidden API package checks exhaustive
Previously, the bootclasspath_fragment's hidden_api.split_packages and
hidden_api.package_prefixes properties did not specify an exhaustive
set of packages that were provided by the fragment. They excluded
packages which were either not split or which could not be used as a
package prefix because it would match sub-packages provided by other
bootclasspath modules.

This change adds the hidden_api.single_packages list to specify those
additional packages and then uses that information to verify that any
bootclasspath_fragment that specifies at least one of split_packages,
single_packages or package_prefixes properties only contains classes
from a package that matches one of those properties. That will
prevent a module from accidentally including unexpected classes, such
as might happen when statically including a common utility library.

It also adds coverage specific versions of the properties as additional
packages are added to the art-bootclasspath-fragment when building
coverage builds.

Bug: 194063708
Test: atest signature_patterns_test
      m out/soong/hiddenapi/hiddenapi-flags.csv
      m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true out/soong/hiddenapi/hiddenapi-flags.csv
      # Breaks without corresponding change to add android.system to
      # the art-bootclasspath-fragment.
      /usr/bin/pylint --rcfile $ANDROID_BUILD_TOP/tools/repohooks/tools/pylintrc scripts/hiddenapi/signature_patterns*.py
      pyformat -s 4 --force_quote_type single -i scripts/hiddenapi/signature_patterns*.py
Change-Id: Iddf6c59cd4dc8c36dde7943a9840ccef5794b320
2022-03-18 10:54:51 +00:00
Colin Cross
143b8d4eb1 Merge "Export the license metadata files for dexpreopted bootjars to Make" 2022-03-17 01:48:47 +00:00
Patrick Rohr
f6337e86f7 Merge "Remove ethernet-service jar dependency." 2022-03-16 16:03:30 +00:00
Colin Cross
e7fe0962f4 Export the license metadata files for dexpreopted bootjars to Make
Track the license metadata file of the module used to dexpreopt
bootjars and pass it to Make.

Bug: 224612665
Test: m alllicensemetadata reportmissinglicenses
Change-Id: I8466c3d8edf7dc44976c2a343bd38799c6617db2
2022-03-15 19:56:45 -07:00
Xiao Ma
488ecd2999 Remove ethernet-service jar dependency.
ethernet service source code is going to be moved into Connectivity
mainline module, and start the ethernet service from the module. The
old ethernet-service lib will be deprecated, remove it from soong
build rule.

Bug: 210586283
Test: m
Change-Id: I8de35246dabba8eb2dda3a154436e43fe19cf384
Merged-In: I19697d13f3809d91c83e37c6d0d403e79eb28664
2022-03-16 00:52:40 +00:00
Nicolas Geoffray
b9a46fb624 Pass --preloaded-classes to boot image compilation.
Test: m
Bug: 162110941
Change-Id: I0df016c5d170ca101cd18cacc331499ae76677a6
2022-03-15 14:28:38 +00:00
Treehugger Robot
7db79508c7 Merge "bp2build supports arch variant srcs for java_library" 2022-03-14 17:06:01 +00:00
Sam Gilbert
28e41289fb Suppress ChangedDefault (in another location)
Change-Id: I71fe558bd379818e254bb031a6a8dc855bb8235d
Test: N/A
Bug: 223382732
2022-03-09 17:01:29 +00:00
Sam Gilbert
675f0b41be Disable ChangedDefault
Bug: 223382732
Test: N/A
Change-Id: I45b70824650544b465fa656cb09983bf90f923b6
2022-03-08 11:24:44 -05:00
Romain Jobredeaux
d9eba6611f Merge "Add source extension information for java_*/android_* modules in module-graph.json." 2022-03-08 14:52:17 +00:00
Paul Duffin
d94e4f5554 Merge "List bootclasspath_fragments in module-info.json" 2022-03-08 11:50:54 +00:00
Sam Delmerico
e91d0303f2 bp2build supports arch variant srcs for java_library
Bug: 209577426
Test: build/bazel/ci/bp2build.sh
Change-Id: I6799bda904d286616e580f2395601ce4f764180f
2022-03-07 16:15:56 +00:00
Sam Delmerico
881d72022a bp2build java_libraries depend on Android SDK
Soong adds an implicit dependency on the Android SDK for all
java_libraries (and related modules). This feature becomes apparent
after converting arch-variant srcs for android_apps, so we should suport
this for now. Eventually, we will want to replace this forced dependency
with a Bazel toolchain workaround.

Test: build/bazel/ci/bp2build.sh
Change-Id: Ic28e8c7690f69294b4bdcb9bb78a6f1f031fe97e
2022-03-07 15:50:42 +00:00
Treehugger Robot
0d4833b18c Merge "Disable BannedThrow check" 2022-03-05 02:17:56 +00:00
Colin Cross
59c1e6ac0e Support experimental building with OpenJDK 17
Use EXPERIMENTAL_USE_OPENJDK17_TOOLCHAIN=true to build with OpenJDK 17
while still targeting java language version 11.

Bug: 219098645
Test: m EXPERIMENTAL_USE_OPENJDK17_TOOLCHAIN=true
Change-Id: I89fb04ecde4dbd1e102098f316692624dd67f8a2
2022-03-04 21:40:02 +00:00
Sam Gilbert
049af11112 Disable BannedThrow check
Bug: 222738070
Test: N/A
Change-Id: Id9d393c9b5c5c21d69c8b3a8d5456c66358426d9
2022-03-04 16:19:19 -05:00
Paul Duffin
ea465fbd3b List bootclasspath_fragments in module-info.json
Bug: 202154151
Test: lunch aosp_cf_x86_64_phone-userdebug
      m out/target/product/vsoc_x86_64/module-info.json
Change-Id: I2bdb6783f7570d89f5c3150b39f1be920c2a8989
2022-03-04 18:44:47 +00:00
Sam Delmerico
d508a638c3 Merge "convert android_app certificate property, bp2build" 2022-03-04 17:30:31 +00:00
Colin Cross
ea74a4779f Merge "Increase errorprone heap size" 2022-02-28 23:02:12 +00:00
Colin Cross
8bf6cad170 Increase errorprone heap size
Increase the size of the errorprone heap to fix OOM exceptions.

Bug: 221480398
Test: forrest
Change-Id: Ia74fd4ecc57f08bcbaa1388e0734ee0cce8ae1a4
2022-02-28 13:10:50 -08:00
Thiébaud Weksteen
315352e71c Merge "Add AIDL enforce_permissions attribute" 2022-02-24 02:25:20 +00:00
Thiébaud Weksteen
de8417c707 Add AIDL enforce_permissions attribute
When set to true, this attribute will pass down the
-Wmissing-permission-annotation flag to the aidl compiler. It is
possible to declare a set of exceptions (for a graduable adoption). For
now, only Java is supported.

Test: build having the attribute enabled for frameworks/base
Bug: 220214993
Change-Id: I54350199b4d980aef0050519e3daf1fef616d08c
2022-02-24 10:15:27 +11:00
Aurimas Liutikas
8b99da5f37 Merge "Disable new ApiLint check temporarily" 2022-02-23 21:43:55 +00:00
Sam Delmerico
bc83b504ff Merge "convert java proto libraries with bp2build" 2022-02-23 16:13:15 +00:00
Anton Hansson
2ace628b86 Merge "Revert "Disable a few metalava checks that platform fails after improvements."" 2022-02-23 10:22:28 +00:00
Anton Hansson
ff5f3b9dc7 Revert "Disable a few metalava checks that platform fails after improvements."
This reverts commit 1a0fa38342.

Reason for revert: No longer needed
Bug: 217545629
Bug: 217552813

Change-Id: I6db416c6f30a662752687b33c9824bbd8fa9fd2b
2022-02-22 14:09:05 +00:00
Anton Hansson
d2149e6a81 Merge changes from topics "extdir", "threadvars"
* changes:
  Add support for sdk extensions in prebuilt_apis
  Refactor prebuilt_apis.go
  Add base sdk extension version to the config
2022-02-22 13:46:47 +00:00
Anton Hansson
3a3f169b56 Add support for sdk extensions in prebuilt_apis
This makes it possible to pass an extensions_dir containing finalized
module APIs to prebuilt_apis. The extension versions are compared to the
api level versions to figure out what the "latest" finalized API is for
each module. This is done using the base_sdk_extension_version, such
that any extension higher than than base_sdk_extension_version is
assumed to be finalized after any of the existing api level versions.

Bug: 220086085
Test: prebuilt_apis_test.go
Test: existing module in prebuilts/sdk
Change-Id: Ib792f84202d436f594ba5e8716c6a187f9cd60dc
2022-02-21 16:43:43 +00:00