Files
build_soong/cc
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
..
2019-09-16 15:06:41 -07:00
2018-11-19 15:26:14 -08:00
2019-09-06 15:11:57 -07:00
2019-09-22 08:21:27 +09:00
2017-10-19 22:39:32 +09:00
2018-10-09 02:16:58 +00:00
2019-06-27 14:46:10 -07:00
2019-08-07 13:06:06 -07:00
2019-08-22 13:21:37 -07:00
2019-08-08 01:51:26 +09:00
2019-09-10 11:22:59 +09:00
2019-09-22 08:21:27 +09:00
2019-04-02 16:38:55 +00:00
2016-08-01 14:36:22 -07:00
2019-08-07 13:40:11 +08:00
2019-08-27 15:10:27 +00:00
2019-09-13 12:18:47 -07:00
2019-09-10 11:22:59 +09:00