platform_build_soong/android
Jiyong Park d1063c1586 Introduce module type 'sdk'
This change introduces a new module type named 'sdk'. It is a logical
group of prebuilt modules that together provide a context (e.g. APIs)
in which Mainline modules (such as APEXes) are built.

A prebuilt module (e.g. java_import) can join an sdk by adding it to the
sdk module as shown below:

sdk {
    name: "mysdk#20",
    java_libs: ["myjavalib_mysdk_20"],
}

java_import {
    name: "myjavalib_mysdk_20",
    srcs: ["myjavalib-v20.jar"],
    sdk_member_name: "myjavalib",
}

sdk {
    name: "mysdk#21",
    java_libs: ["myjavalib_mysdk_21"],
}

java_import {
    name: "myjavalib_mysdk_21",
    srcs: ["myjavalib-v21.jar"],
    sdk_member_name: "myjavalib",
}

java_library {
    name: "myjavalib",
    srcs: ["**/*/*.java"],
}

An APEX can specify the SDK(s) that it wants to build with via the new
'uses_sdks' property.

apex {
    name: "myapex",
    java_libs: ["libX", "libY"],
    uses_sdks: ["mysdk#20"],
}

With this, libX, libY, and their transitive dependencies are all built
with the version 20 of myjavalib (the first java_import module) instead
of the other one (which is for version 21) and java_library having the
same name (which is for ToT).

Bug: 138182343
Test: m (sdk_test.go added)
Change-Id: I7e14c524a7d6a0d9f575fb20822080f39818c01e
2019-09-22 08:21:27 +09:00
..
android_test.go Share buildDir for android/soong/android tests 2019-06-10 15:51:06 -07:00
androidmk.go AndroidMkEntries minor refactoring. 2019-08-28 13:07:03 -07:00
androidmk_test.go soong: Fix AndroidMk with *Required properties 2019-07-16 02:28:29 +09:00
apex.go Add no_apex property 2019-08-22 20:37:07 +09:00
api_levels.go Merge changes I9f8df94f,I2d7f5c56,I0ebb7381,Ieefcfc1a am: a6bf56d4be 2019-06-10 10:00:33 -07:00
arch.go Add arch variant support to android_app_import. 2019-08-15 16:26:18 -07:00
arch_test.go Optimize filterArchStruct when nothing is filtered 2019-01-25 21:26:53 +00:00
config.go Rename Soong variable FlattenApex as Flatten_apex. 2019-08-13 15:08:29 +01:00
config_test.go Fix go vet issues 2018-07-22 21:18:45 -07:00
defaults.go Add defaults_visibility support 2019-07-25 11:48:21 +01:00
defaults_test.go Add test for missing defaults modules with AllowMissingDependencies 2019-06-10 15:51:06 -07:00
defs.go Fix package path of android/soong/android pctx 2019-04-10 16:49:27 -07:00
env.go Allow debugging with SOONG_DELVE=<listen addr> 2019-07-03 16:33:31 -07:00
expand.go Fix android.Expand and ninja escaping 2019-07-11 14:52:17 -07:00
expand_test.go Fix android.Expand and ninja escaping 2019-07-11 14:52:17 -07:00
filegroup.go Replace ctx.ExpandSources with android.PathsForModuleSrc 2019-03-20 19:36:13 +00:00
hooks.go Add a String() method to android.Module 2019-07-03 15:37:11 -07:00
makevars.go Allow Singletons to export Make variables 2019-02-19 12:45:14 -08:00
module.go Add "apex_vndk" module type 2019-09-10 11:22:59 +09:00
module_test.go soong: Add tests for depending on disabled module 2019-08-26 13:19:42 +00:00
mutator.go CreateModule also inherits variableProperties. 2019-09-06 18:28:58 -07:00
mutator_test.go Add a String() method to android.Module 2019-07-03 15:37:11 -07:00
namespace.go Give Blueprint modules access to all namespaces 2019-06-14 11:26:09 -07:00
namespace_test.go Give Blueprint modules access to all namespaces 2019-06-14 11:26:09 -07:00
neverallow.go Allow per test rules in neverallow_test.go 2019-09-03 05:44:15 -07:00
neverallow_test.go Allow per test rules in neverallow_test.go 2019-09-03 05:44:15 -07:00
notices.go Fix a bug in generateNoticeRule. 2019-07-15 11:03:22 -07:00
onceper.go Convert droidstubs to android.RuleBuilder 2019-07-18 14:28:14 -07:00
onceper_test.go Prevent hangs in OncePer when the callback panics 2019-05-14 18:40:13 +00:00
override_module.go OverridableModuleBase shouldn't embed ModuleBase. 2019-06-19 11:22:25 -07:00
package.go Refactor visibility to support visibility on defaults modules 2019-07-25 11:31:42 +01:00
package_ctx.go Allow '$' in some paths 2018-09-13 18:27:50 +00:00
package_test.go Remove ioutil.TempDir from each android/soong/android test 2019-07-03 20:27:11 +00:00
path_properties.go Dedup path properties across property structs 2019-07-16 09:52:23 -07:00
path_properties_test.go Dedup path properties across property structs 2019-07-16 09:52:23 -07:00
paths.go Merge changes I75b4a761,I779f28c6,If1422372,I26307dd1 2019-08-23 00:15:08 +00:00
paths_test.go Add InstallBypassMake 2019-08-06 09:45:04 -07:00
prebuilt.go Delete prebuilt APEXes when installing source-built APEXes 2019-07-30 13:52:15 +09:00
prebuilt_etc.go AndroidMkEntries minor refactoring. 2019-08-28 13:07:03 -07:00
prebuilt_etc_test.go Share buildDir for android/soong/android tests 2019-06-10 15:51:06 -07:00
prebuilt_test.go Share buildDir for android/soong/android tests 2019-06-10 15:51:06 -07:00
proto.go Add RuleBuilder helper functions for built and prebuilt tools 2019-07-11 13:05:19 -07:00
register.go Support testing Rules in Modules and Rules and Builds in Singletons 2019-03-05 03:17:26 +00:00
rule_builder.go Rewrite depfile from sbox to stay reproducible 2019-08-29 14:47:40 -07:00
rule_builder_test.go Rewrite depfile from sbox to stay reproducible 2019-08-29 14:47:40 -07:00
sdk.go Introduce module type 'sdk' 2019-09-22 08:21:27 +09:00
sh_binary.go AndroidMkEntries minor refactoring. 2019-08-28 13:07:03 -07:00
sh_binary_test.go Add sh_test_host. 2019-07-08 14:53:52 -07:00
singleton.go Support testing Rules in Modules and Rules and Builds in Singletons 2019-03-05 03:17:26 +00:00
testing.go Support multiple expected errors in neverallow_test.go 2019-09-03 10:33:29 +01:00
util.go Move splitFileExt to the android package. 2019-09-09 20:29:31 -07:00
util_test.go Move splitFileExt to the android package. 2019-09-09 20:29:31 -07:00
variable.go Allow modules to be enabled/disabled depending on whether APEXes are flattened. 2019-08-27 14:25:59 +01:00
variable_test.go
visibility.go Refactor visibility to support visibility on defaults modules 2019-07-25 11:31:42 +01:00
visibility_test.go Support multiple expected errors in neverallow_test.go 2019-09-03 10:33:29 +01:00
vts_config.go Soong: update the synopsis of vts_config module. 2019-03-14 12:05:02 -07:00
vts_config_test.go Share buildDir for android/soong/android tests 2019-06-10 15:51:06 -07:00
writedocs.go Split up Soong build doc. 2019-02-20 15:43:06 -08:00