This CL creates the build rules to invoke the standalone kotlin
extractor and create .kzip files for each kotlin translation unit. These
will be indexed by the internal g3 kotlin indexers
Implementation details
- Create a `kotlinKytheExtract` static rule. Its inputs will be source
.kt/.srcjar files and other verbatim args passed to kotlinc. The
extrator will serialize this information into a .kzip file. The .kzip
file should contain the necessary information to "replay" the
compilation
- Create a xref_kotlin phony rule to build all .kzip files corresponding
to kotlin translation units.
This implementation has one limitation. Since the kotlin indexers
"replay" the compilation using its own version of kotlinc-jvm, there
might be indexing issues caused by kotlinc version skew between android
builds and indexing builds. `-kotlin-home` can likely solve that, but
this CL defers that for now.
Bug: 265428637
Test: Built the phony `xref_kotlin`, and ran the indexer locally using go/kythe-git-local-run#indexing-to-local-xrefs-server
Change-Id: Ifb370f2df8aa46f71df3fe1ae7d7aa5da773cc8b
There are two versions of aosp extservices - one for Tplus and one for
Sminus. When prebuilts are active, the `contents` validation of both
variants of extservices bootclasspath fragments should be disabled to
account for BCP jar skew.
This CL adds ApexAvailableName to ApexInfo to achive that. If an
api_domain matching the ApexAvailableName has been selected in
`all_apex_contributions`, the source apex variants will be disabled.
Bug: 361771739
Test: lunch cf_x86_64_phone-next-userdebug
Test: m nothing with ag/28851886
Change-Id: I505a7ad8295c258e2eeef7f183669f7a75a1c88e
... if prebuilts are selected.
This is a special case of b/361771739 where a apex starts contributing a
jar to the BCP. `disableSourceApexVariant` uses
`PrebuiltSelectionInfoProvider` and this gets populated via the
following dep chain
```
source --> prebuilt --> all_apex_contributions
```
This runs into issues if a prebuilt bootclasspath_fragment does not
exist.
This CL creates a dependency edge between the source module and
all_apex_contributions singleton module so that
`PrebuiltSelectionInfoProvider` is available for
`disableSourceApexVariant`
Bug: 361771739
Test: lunch cf_x86_64-next-userdebug
Test: m nothing with ag/28851886
Change-Id: I92d88199a27579d3c9879d40fd354653370efcce
I'm rewriting how globs work in soong to make them compatible with
hash-based ninja implementations. As part of this, I'm removing this
unnecessary usage of globs to make them simpler.
In this case, since we're already globbing the directory at analysis
time and causing soong to rerun, we can ensure the aapt2 action also
reruns by putting a hash of the glob results onto the command line.
Bug: 364749114
Test: m framework-res, touch frameworks/base/core/res/assets/test1.txt, m framework-res rebuilt framework-res.apk, rm frameworks/base/core/res/assets/test1.txt, m framework-res rebuilt framework-res.apk again
Change-Id: I4f666367a9a0fd0dfa42dc51ef3a788a02b41747
The soong primary builder action lists all the Android.bp files
as dependencies via a depfile. The top-level one doesn't need to be
listed as an input explicitly. I think it was there from the early
days of soong when soong started at the top-level Android.bp file and
traversed downwards through references via the subdirs or
optional_subdirs variables.
Bug: 364749114
Test: Presubmits
Change-Id: I72eabe4d4179696bfa258c8c4c56351a132e0870
This reverts commit 492e81bd0e.
Reason for revert: Droidmonitor created revert due to b/364912148.
Change-Id: Ic487ca2f4b5e650b70cfb87889d8bd112bec32c6
Revert submission 3235656-revert-3195743-compatibility_matrix-KLJOLWYIMW
Reason for revert: The root cause of the break is already be merged. Related changes: ag/29139095, ag/29139608
Reverted changes: /q/submissionid:3235656-revert-3195743-compatibility_matrix-KLJOLWYIMW
Change-Id: Ie23bdd343bebbd077553dc25f0bfd13539daf57a
Skip combining jars into turbine-combined, combined, and withres jars
and instead collect transitive jars to use in the classpath and to
produce the final dexed jar.
This reduces the size of a `m checkbuild` in git_main by 11%, from
1300 KiB to 1154 KiB. It may also improve caching and reduce uplink
network bandwidth when building with RBE, as now the classpath inputs
to rules are themselves outputs of previous rules and so already in
the RBE CAS.
The downside is that the classpath inputs to each rule are now much
longer, increasing the Soong ninja file size 11%, from 4.6 GiB to
5.1 GiB. This could be mitigated in the future by supporting something
like depsets in the generated ninja file to reduce duplication.
Bug: 308016794
Test: TestSimple, TestKotlin, TestClasspath
Flag: build.RELEASE_USE_TRANSITIVE_JARS_IN_CLASSPATH
Change-Id: I2b7b4261375494370da70f98597c8719f1d561cf
The `m Run*RoboTests` test runner is no longer supported, remove the
code to generate the Make rules for it.
Also reduce the number of combining steps by passing the extra jars
that need to be combined into the compile step.
This relands Icf05079bf570bed7a10962cbf03459bd53c51f99 with a fix to
reorder the instrumented app classes after dependency classes.
Test: atest --host SystemUiRoboTests
Flag: EXEMPT refactor
Change-Id: I174ceb95af5557e1859eeb12a2f5fac2332975a8
This reverts commit ef5739ed64.
Reason for revert: Droidmonitor created revert due to b/364665936.
Change-Id: Ia18f642492eafdbe2e78d9f753d87f243d529037
* changes:
ndk_library: limit exports
Reland "Truely re-export export_header_libs from ndk_library"
ndk_library depends on the correct arch variant of cc_library_headers
This reverts commit ba9f9262a3.
Reason for revert: DroidMonitor created revert due to b/364440900.
Change-Id: I8661cdce1a1187459b6a0acde4c64a5aa70dcc87
To reduce pains introduced by visiblity skew between source
and prebuilts, mark them with //visibility:public
Bug: 239189932
Test: go test ./sdk
Change-Id: I47dd63bd03337bc9ec6fa364bbdcdfdfcd70b0d9
So that the build can't access extra information unintentionally.
Particuarly ANDROID_BUILD_TOP is dangerous.
In the future PATH should be locked down as well.
Bug: 307824623
Test: Added a all_genrules target and built that
Change-Id: I88bb0efb0a82529a1c85875a53cf20c8384d07fe