mainline_modules_sdks.py: Fix issues with r snapshot am: fa90e1e5e0
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2047364 Change-Id: Ibc188124362c2a2bbb026512cf234c7a7231e3e0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -306,7 +306,13 @@ class SnapshotBuilder:
|
|||||||
apex = module.apex
|
apex = module.apex
|
||||||
dest_dir = os.path.join(r_snapshot_dir, apex)
|
dest_dir = os.path.join(r_snapshot_dir, apex)
|
||||||
os.makedirs(dest_dir, exist_ok=True)
|
os.makedirs(dest_dir, exist_ok=True)
|
||||||
bp_file = os.path.join(dest_dir, "Android.bp")
|
|
||||||
|
# Write the bp file in the sdk_library sub-directory rather than the
|
||||||
|
# root of the zip file as it will be unpacked in a directory that
|
||||||
|
# already contains an Android.bp file that defines the corresponding
|
||||||
|
# apex_set.
|
||||||
|
bp_file = os.path.join(dest_dir, "sdk_library/Android.bp")
|
||||||
|
os.makedirs(os.path.dirname(bp_file), exist_ok=True)
|
||||||
|
|
||||||
# The first sdk in the list is the name to use.
|
# The first sdk in the list is the name to use.
|
||||||
sdk_name = module.sdks[0]
|
sdk_name = module.sdks[0]
|
||||||
@@ -338,24 +344,21 @@ java_sdk_library_import {{
|
|||||||
"test_{aosp_apex}",
|
"test_{aosp_apex}",
|
||||||
],
|
],
|
||||||
public: {{
|
public: {{
|
||||||
jars: ["sdk_library/public/{module_name}-stubs.jar"],
|
jars: ["public/{module_name}-stubs.jar"],
|
||||||
stub_srcs: ["sdk_library/public/{module_name}.srcjar"],
|
current_api: "public/{module_name}.txt",
|
||||||
current_api: "sdk_library/public/{module_name}.txt",
|
removed_api: "public/{module_name}-removed.txt",
|
||||||
removed_api: "sdk_library/public/{module_name}-removed.txt",
|
|
||||||
sdk_version: "module_current",
|
sdk_version: "module_current",
|
||||||
}},
|
}},
|
||||||
system: {{
|
system: {{
|
||||||
jars: ["sdk_library/system/{module_name}-stubs.jar"],
|
jars: ["system/{module_name}-stubs.jar"],
|
||||||
stub_srcs: ["sdk_library/system/{module_name}.srcjar"],
|
current_api: "system/{module_name}.txt",
|
||||||
current_api: "sdk_library/system/{module_name}.txt",
|
removed_api: "system/{module_name}-removed.txt",
|
||||||
removed_api: "sdk_library/system/{module_name}-removed.txt",
|
|
||||||
sdk_version: "module_current",
|
sdk_version: "module_current",
|
||||||
}},
|
}},
|
||||||
module_lib: {{
|
module_lib: {{
|
||||||
jars: ["sdk_library/module-lib/{module_name}-stubs.jar"],
|
jars: ["module-lib/{module_name}-stubs.jar"],
|
||||||
stub_srcs: ["sdk_library/module-lib/{module_name}.srcjar"],
|
current_api: "module-lib/{module_name}.txt",
|
||||||
current_api: "sdk_library/module-lib/{module_name}.txt",
|
removed_api: "module-lib/{module_name}-removed.txt",
|
||||||
removed_api: "sdk_library/module-lib/{module_name}-removed.txt",
|
|
||||||
sdk_version: "module_current",
|
sdk_version: "module_current",
|
||||||
}},
|
}},
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -160,8 +160,8 @@ class TestProduceDist(unittest.TestCase):
|
|||||||
|
|
||||||
r_snaphot_dir = os.path.join(self.tmp_out_dir,
|
r_snaphot_dir = os.path.join(self.tmp_out_dir,
|
||||||
"soong/mainline-sdks/test/for-R-build")
|
"soong/mainline-sdks/test/for-R-build")
|
||||||
aosp_ipsec_r_bp_file = "com.android.ipsec/Android.bp"
|
aosp_ipsec_r_bp_file = "com.android.ipsec/sdk_library/Android.bp"
|
||||||
google_wifi_android_bp = "com.google.android.wifi/Android.bp"
|
google_wifi_android_bp = "com.google.android.wifi/sdk_library/Android.bp"
|
||||||
self.assertEqual([
|
self.assertEqual([
|
||||||
aosp_ipsec_r_bp_file,
|
aosp_ipsec_r_bp_file,
|
||||||
"com.android.ipsec/sdk_library/public/android.net.ipsec.ike-removed.txt",
|
"com.android.ipsec/sdk_library/public/android.net.ipsec.ike-removed.txt",
|
||||||
|
|||||||
@@ -26,24 +26,21 @@ java_sdk_library_import {
|
|||||||
"test_com.android.wifi",
|
"test_com.android.wifi",
|
||||||
],
|
],
|
||||||
public: {
|
public: {
|
||||||
jars: ["sdk_library/public/framework-wifi-stubs.jar"],
|
jars: ["public/framework-wifi-stubs.jar"],
|
||||||
stub_srcs: ["sdk_library/public/framework-wifi.srcjar"],
|
current_api: "public/framework-wifi.txt",
|
||||||
current_api: "sdk_library/public/framework-wifi.txt",
|
removed_api: "public/framework-wifi-removed.txt",
|
||||||
removed_api: "sdk_library/public/framework-wifi-removed.txt",
|
|
||||||
sdk_version: "module_current",
|
sdk_version: "module_current",
|
||||||
},
|
},
|
||||||
system: {
|
system: {
|
||||||
jars: ["sdk_library/system/framework-wifi-stubs.jar"],
|
jars: ["system/framework-wifi-stubs.jar"],
|
||||||
stub_srcs: ["sdk_library/system/framework-wifi.srcjar"],
|
current_api: "system/framework-wifi.txt",
|
||||||
current_api: "sdk_library/system/framework-wifi.txt",
|
removed_api: "system/framework-wifi-removed.txt",
|
||||||
removed_api: "sdk_library/system/framework-wifi-removed.txt",
|
|
||||||
sdk_version: "module_current",
|
sdk_version: "module_current",
|
||||||
},
|
},
|
||||||
module_lib: {
|
module_lib: {
|
||||||
jars: ["sdk_library/module-lib/framework-wifi-stubs.jar"],
|
jars: ["module-lib/framework-wifi-stubs.jar"],
|
||||||
stub_srcs: ["sdk_library/module-lib/framework-wifi.srcjar"],
|
current_api: "module-lib/framework-wifi.txt",
|
||||||
current_api: "sdk_library/module-lib/framework-wifi.txt",
|
removed_api: "module-lib/framework-wifi-removed.txt",
|
||||||
removed_api: "sdk_library/module-lib/framework-wifi-removed.txt",
|
|
||||||
sdk_version: "module_current",
|
sdk_version: "module_current",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,24 +26,21 @@ java_sdk_library_import {
|
|||||||
"test_com.android.ipsec",
|
"test_com.android.ipsec",
|
||||||
],
|
],
|
||||||
public: {
|
public: {
|
||||||
jars: ["sdk_library/public/android.net.ipsec.ike-stubs.jar"],
|
jars: ["public/android.net.ipsec.ike-stubs.jar"],
|
||||||
stub_srcs: ["sdk_library/public/android.net.ipsec.ike.srcjar"],
|
current_api: "public/android.net.ipsec.ike.txt",
|
||||||
current_api: "sdk_library/public/android.net.ipsec.ike.txt",
|
removed_api: "public/android.net.ipsec.ike-removed.txt",
|
||||||
removed_api: "sdk_library/public/android.net.ipsec.ike-removed.txt",
|
|
||||||
sdk_version: "module_current",
|
sdk_version: "module_current",
|
||||||
},
|
},
|
||||||
system: {
|
system: {
|
||||||
jars: ["sdk_library/system/android.net.ipsec.ike-stubs.jar"],
|
jars: ["system/android.net.ipsec.ike-stubs.jar"],
|
||||||
stub_srcs: ["sdk_library/system/android.net.ipsec.ike.srcjar"],
|
current_api: "system/android.net.ipsec.ike.txt",
|
||||||
current_api: "sdk_library/system/android.net.ipsec.ike.txt",
|
removed_api: "system/android.net.ipsec.ike-removed.txt",
|
||||||
removed_api: "sdk_library/system/android.net.ipsec.ike-removed.txt",
|
|
||||||
sdk_version: "module_current",
|
sdk_version: "module_current",
|
||||||
},
|
},
|
||||||
module_lib: {
|
module_lib: {
|
||||||
jars: ["sdk_library/module-lib/android.net.ipsec.ike-stubs.jar"],
|
jars: ["module-lib/android.net.ipsec.ike-stubs.jar"],
|
||||||
stub_srcs: ["sdk_library/module-lib/android.net.ipsec.ike.srcjar"],
|
current_api: "module-lib/android.net.ipsec.ike.txt",
|
||||||
current_api: "sdk_library/module-lib/android.net.ipsec.ike.txt",
|
removed_api: "module-lib/android.net.ipsec.ike-removed.txt",
|
||||||
removed_api: "sdk_library/module-lib/android.net.ipsec.ike-removed.txt",
|
|
||||||
sdk_version: "module_current",
|
sdk_version: "module_current",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user