This relands aosp/2457062. The original CL was submitted as part of a
stack that broke tm and udc. Those branches still contain soong modules
with min_sdk_version of type (kind+level).
Bug: 208456999
Test: m nothing on tm and udc (via go/abtd)
Change-Id: I10e8bea59cd5914d36b2c9539ee1556e55b82e53
This relands aosp/2470068. The original CL was submitted as part of a
stack that broke tm and udc. Those branches still contain soong modules
with min_sdk_version of type (kind+level).
Test: m nothing on tm and udc (via go/abtd)
Bug: 208456999
Change-Id: I8e013ec10530372f70f0ab0505b7eebeee2b360b
Add skip-sdk-check to skip checking the SDK version when extracting an
APK/APEX from an App Set Bundle. This can be used when the platform SDK
version is not defined and the APEXs/APKs use SHA based SDK versions.
This check should not be set to true for non Beta dessert releases
Bug: 274518686
Test: # Add SHA targeting modules to platform
m SOONG_SKIP_APPSET_SDK_CHECK=true #Build Passes
m SOONG_SKIP_APPSET_SDK_CHECK=false #Build Fails
m #No config supplied, build fails
Change-Id: I1919437d3410f09c991e1de39031bd88e1f8246a
This relands aosp/2465355. The original CL was submitted as part of a
stack which broke tm and udc. Those branches contain soong modules with
min_sdk_version of type (kind+level)
Bug: 208456999
Test: go test ./sdk (top of CL stack)
Change-Id: I627f69b1fd71ab386e9026a2fc1566bad786bf1d
This relands aosp/2478277. The original CL was submitted as part of a
stack that broke tm and udc since those branches contains soong modules
that have min_sdk_version of type (kind+level).
Test: go test ./sdk
Bug: 208456999
Change-Id: Ie5d7f2597092a51c6e74e7b3cab2f81c02906d5e
* changes:
Revert "Create two sentinel api levels"
Revert "Create EffectiveVersion* functions for ApiLevel"
Revert "Prework for migrating min_sdk_version from (kind+level) ..."
Revert "Always include host variants in the sdk snapshot"
Revert "Update min_sdk_version from SdkSpec to ApiLevel"
Normally InstallFile is enough because linker grants +x permission to
its output. Just to guarantee +x permission even when the source file
doesn't have one.
Test: build
Change-Id: I01082df11d414804e1a73336fc637a6a2208021f
```
ERROR: /buildbot/src/android/master/out/soong/workspace/external/libcxx/BUILD.bazel:30:18: While resolving toolchains for target //external/libcxx:libc++: com.google.devtools.build.lib.packages.NoSuchTargetException: no such target '@soong_injection//product_config_platforms/products/ndk-eng:ndk-eng_android_riscv64': target 'ndk-eng_android_riscv64' not declared in package 'product_config_platforms/products/ndk-eng' defined by /buildbot/src/android/master/out/bazel/output/external/soong_injection/product_config_platforms/products/ndk-eng/BUILD (Tip: use `query "@soong_injection//product_config_platforms/products/ndk-eng:*"` to see all the targets in that package)
```
Bug: https://github.com/google/android-riscv64/issues/10
Bug: http://b/274509603
Bug: http://b/262192655
Test: build/soong/scripts/build-ndk-prebuilts.sh
Change-Id: I4b6633ab5aab3f01953b628d78ac1d79f2a4ee3c
* changes:
Update min_sdk_version from SdkSpec to ApiLevel
Always include host variants in the sdk snapshot
Prework for migrating min_sdk_version from (kind+level) to (level)
Create EffectiveVersion* functions for ApiLevel
Create two sentinel api levels
build/make has several hardcoded references to these modules. In
preparation for switching between stubs generated from .txt files,
export these module names to Make. This prevents duplication of stub
selection logic in multiple places.
Test: TH
Change-Id: I5b1ef27aaea269d60aa7953787ea10d1b2a793f2
This module uses librypto from cronet which is different from the
default one, so the test would always fail.
Bug: 274473434
Test: run the script locally.
Change-Id: I9aac4da0990953db312e2163ee8af05e692f6f3f
These hardcoded refs will need to be updated when we start using .txt
stub equivalent (single-tree/multi-tree). Instead of strewing this logic
all over the codebase, create a helper function that contains the
replacement logic. All other places should call this helper function
instead of calculating the name of .txt equivalent soong module by
itself.
(Will do a similar cleanup in build/make)
Test: no change in ninja file
Change-Id: I6bf999eb4aeaba6ac2a44b9016bae4ec8c79ce19
min_sdk_version signifies device version and does not need an sdkKind to
describe it fully. Update the type and cleanup existing usages. As a
side benefit, we also get better error handling since users can no
longer enter something like `public_30` as a valid min_sdk_version in bp
files
Will do a similar cleanup for targetSdkVersion and maxSdkVersion in a
followup CL
Test: m nothing
Test: no change in ninja files (this should be a no-op)
Bug: 208456999
Change-Id: Ie6ae7e267d093c5e4787e82685daaca1021d202e
Host tools (and variants in general) should not fall under the purview
of min_sdk_version check. These do not exist on device, so
min_sdk_version check would not make such sense.
This is prework for migrating min_sdk_version from type SdkSpec to
ApiLevel.
Test: go test ./sdk
Bug: 208456999
Change-Id: I2fd822a223d1dc5e290d4a1ebf304fe47a5b0416
Currently, the following lib will be included in the sdk snapshot even
though it is compiling against private apis
```
java_sdk_library {
name: "foo",
//sdk_version defaults to "", i.e. SdkSpecPrivate
}
```
This is because min_sdk_version of `foo` inherits the api level of
SdkSpecPrivate (i.e. FutureApiLevel).
As part of the migration of min_sdk_version to ApiLevel, the api level
of SdkSpecPrivate will be different than FutureApiLevel. In the above
example, assuming the version of the sdk_snapshot is FutureApiLevel,
`foo` will be included only if it explicitly sets a min_sdk_version <=
FutureApiLevel. Update an existing unit test to set this value
explicitly.
Bug: 208456999
Test: go test ./sdk (top of CL stack)
Change-Id: Iddd497df7da8c829325d902fbf70731dd8c6855d
These functions already exist on SdkSpec(kind+level) and are used for
computing the effective version for vendor modules compiling against
current or system_current which depends on the sdkKind
Create these functions for ApiLevel to support migrating MinSdkVersion
from SdkSpec to ApiLevel. Since the "api level" of vendor modules depend
on the sdk_kind as well, these functions will continue to exist on
SdkSpec.
Test: m nothing
Test: no diff in ninja files (this should be a no-op)
Bug: 208456999
Change-Id: Iee5a936e72b02b4fab9e457082d46fb8358eff16
InvalidApiLevel:
This will be used for error handling if a user provided api level is
not recognized
PrivateApiLevel:
This will be used to differentiate the api level of sdk_version:"" from
sdk_version:"current" or sdk_version:"<active_codename>" (all used to be
FutureApiLevel previously). This was not necessary previously since the
type of min_sdk_version was SdkSpec(kind+level). Since it had access to
kind, it could check that it was not SdkSpecPrivate
Test: m nothing
Change-Id: I628b443c34bf2ec258d947dfec09f38b126bc6bb