1. Output the aconfig flags pb and storage files to /etc
2. Fix a bug where aconfig flags were not collected for java_sdk_library
Bug: None
Test: manual and unit tests.
Change-Id: I0896e91918c1b53c98ac9dc0f4a636f158200891
Use the R.txt files from aar imports directly instead of recreating
one using aapt2 from the embedded resources. Fixes an issue with
com.google.android.material where the jar was referencing
com.google.android.material.R.attr.theme, aapt2 was not producing
"int attr theme 0x0" in R.txt, but the aar's R.txt had it.
Bug: 294256649
Test: builds
Change-Id: Ibe1e5535a75eed59f3b8dbbc12eff9c07af51d37
extraCombinedJars contains the R.jar generated by
ResourceProcessorBusyBox for apps. It needs to go before any
static_libs dependencies so that the finalized R values take
precedence over any non-final R values that may have been included
in the dependencies. Moving after the javac and kotlinc compiled
jars helps minimize differences when turning on use_resource_processor
by default by using the MANIFEST.MF generated by soong_zip instead of
the one generated by ResourceProcessorBusyBox, which contains a
different Created-By field.
Bug: 294256649
Test: m javac-check
Change-Id: I8d060594404121fd36ef650ac317f0c5d5f92b23
Setting use_resource_processor: true can increase the length of the
classpath enough to trigger "command line too long" errors. There are
clockwork libraries with 546 transitive android_library dependencies.
Write classpaths longer than 64kB to a separate file and add them
to the javac and turbine command lines with the @file syntax.
Bug: 294256649
Test: m checkbuild
Change-Id: I2b6a57ae30de03347db3221e9c9a4b2efb490115
Since BaseModuleName of the dep becomes its LOCAL_MODULE name in the
generated mk file, we should also use BaseModuleName of dep for populating
properties such as LOCAL_SHARED_LIBS of rdeps
Test: m nothing --no-skip-soong-tests
Bug: 322175508
Change-Id: I6b47112faa63f85d19b5b71e0e102cea0ab68e3b
This change adds support to generate non-"everything" (i.e. "runtime"
and "exportable") stubs in java_api_library, which generates the stubs
from the api signature files.
Unlike droidstubs module that generates "everything", "exportable" and
"runtime" stubs in a single module, java_api_library generates a single
set of stubs per module, which is set by the default-"everything"
property `stubs_type`. This is because java_api_library is responsible
for both generation and the compilation of the stubs srcjar, and
compilation of the stubs srcjar are done in separate java_library
modules for from-source stubs.
Utilization of this feature will be done in a follow up change that
generates the "exportable" java_api_library modules in java_sdk_library.
Test: m nothing --no-skip-soong-tests
Bug: 318009570
Change-Id: I1051544ac3bcdb3ba1f78bfec28eba4e9fad9c2d
Latest compiler has merged both unaligned access flags into one.
TODO: This is needed until we change clang driver to enable -munaligned access by default.for Android b/327307773
Bug: 326790418
Change-Id: Ia8c29dc56104d2cffb8ac41aae6eeacccae68e61
If compile_multilib is set to 'both' for an apex having a sh_binary
dependency for which compile_multilib is not set, then the sh_binary
dependency should be added for the primary ABI of the target
Bug: 325628733,326985291
Test: m
Change-Id: Ie9cd12d49f6854c33af3724cb8e2fc3d8b7627a0
Similar to how the exportable stubs are generated in droidstubs, this
change adds the rule to generate the runtime stubs in droidstubs. Unlike
the exportable stubs, which the artifacts are dist'ed during the sdk
build, the runtime stubs will only used in the hiddenapi flags
generation. Therefore, only the stubs are generated and no other
artifacts are generated during the "runtime" metalava invocation. When
`aconfig_declarations` property is not defined (i.e. no flags are
enabled, thus the exportable and the runtime stubs are identical), the
runtime stubs are simple copied from the exportable stubs.
Note that the runtime stubs are not a dependency of `droid` as of now.
The dependency of the hiddenapi flags will be replaced to the runtime
stubs in the child CL.
Test: m nothing --no-skip-soong-tests && m api-stubs-docs-non-updatable
Bug: 319162970
Change-Id: I14928b7b5619522c4caab1dfc795bc9c7e929639
This change performs additional cleanups in the build rules of the
droidstubs module, specifically optionalizing annotationFlags(...) and
apiLevelsAnnotationsFlags(...). This is required as "runtime" stubs
would not generate other artifacts than the stubs, and thus
`stubsArtifacts` would not be generated for "runtime".
Test: m nothing
Bug: 319162970
Change-Id: Ia009df3d01f49841d5041fb2dfdfa7ef8671bf18
This CL unsets the prebuilt contents of a selected apex_contribution
in coverage builds. The effect of this will be that mainline modules
will be built from source with the following in coverage builds
1. Instrumentation turned on
2. RELEASE_ACONFIG_VALUE_SETS for that release config
Test: Added a unit test
Test: lunch cf_x86_64_phone-next-userdebug && EMMA_INSTRUMENT=true m nothing (with ag/26298763)
Bug: 325666427
Change-Id: Ic4e1f0612072377261602842dfd303c064095035
Support the feature with new property combined with architecture and dpi
resolution.
Bug: 319381869
Test: go test -run TestAndroidAppImport_ArchVariants
Change-Id: Ib43cbae8868fc35701e6666867b2325f5abbb2c7
kati and GNU make may have blank lines in the middle of commands declared in rules.
Add compatibility for this.
Change-Id: Iae03053c0cb901074c26420c0c6ac1c0e00d99de
Include all_aconfig_declarations in the droid dist directory
(identically to how it is already included in the sdk dist).
For local builds, `printflags` is still the recommended way to read
all_aconfig_declarations; the dist-ed files are intended as a way to
inspect remote builds, such as CI builds.
Bug: 324281288
Test: lunch aosp_oriole-trunk-eng && m droid dist && test -e out/dist/flags.pb && test -e out/dist/flags.textproto
Change-Id: Ic29d69ab5014593a3f9213f8a5b55e0569922cc9
RELEASE_EXPORT_RUNTIME_APIS build flag is currently used to modify the
filter condition for the "exportable" stubs, so that it exposes wider
set of flagged apis (ENABLED && READ_ONLY vs ENABLED || READ_WRITE).
This flag was originally introduced as a build flag to be enabled in
specific release configurations, but instead this is used as a product
variable that will be enabled in the product `sdk_with_runtime_apis`,
which will be introduced in a future change.
Test: m nothing --no-skip-soong-tests
Bug: 326312949
Change-Id: Ieb3cee517dd6cedcca844a9eab270aedf8199d4e
The new product variable behaves identical to the build flag
RELEASE_HIDDEN_API_EXPORTABLE_STUBS: if the variable is set to true, the
hiddenapi flags are generated from the "exportable" stubs (i.e. the
stubs that does not include READ_WRITE permission or DISABLE state
flagged apis) instead of the "everything" stubs (i.e. the stubs that
includes all flagged apis regardless of the state of the flags). If the
variable is set to false, the stubs are generated from the "everything"
stubs.
This product variable will be utilized for `sdk_with_runtime_apis`
product in the future changes.
Test: m nothing
Bug: 326310637
Change-Id: I8872d0b0617eb0f25da32611837ad823c77b0df7
Previously, it would error out if it saw anything that wasn't a string
or slice of strings. Now it will also recurse in sub-structs.
Fixes: 326255534
Test: go test
Change-Id: Icbca8e4a2cf54b5610599a10805550fed05eb396