summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrzemyslaw Szczepaniak <pszczepaniak@google.com>2018-03-07 14:00:38 +0000
committerPrzemyslaw Szczepaniak <pszczepaniak@google.com>2018-03-20 12:36:35 +0000
commit7e0c7b88c2b648a7f53dae88238c79fb9364890e (patch)
tree70a70df4afe0ceab1e72d64202256fc0f787987e
parentba8f499f81ea762acdb69f2fb79a9e0e1af51b37 (diff)
downloadplatform_external_kotlinc-7e0c7b88c2b648a7f53dae88238c79fb9364890e.tar.gz
platform_external_kotlinc-7e0c7b88c2b648a7f53dae88238c79fb9364890e.tar.bz2
platform_external_kotlinc-7e0c7b88c2b648a7f53dae88238c79fb9364890e.zip
Add kotlin-test and kotlin-stdlib-renamed librariesandroid-wear-p-preview-2android-p-preview-3android-p-preview-2
kotlin-test is backed by junit and allows to write kotlin tests. kotlin-stdlib-renamed is a kotlin standard library that can be used in framework/platform android code. It's renamed to com.android.kotlin.* kotlin.test is not renambed due to its ServiceLoader usage to load AsserterContributor implementation. ServiceLoader is not happy with jarjar renaming. Bug: 73281388 Test: tbd Change-Id: I7f58062ac9a377f0bcf800df068bf94d83110d24
-rw-r--r--Android.bp16
-rw-r--r--jarjar-rules.txt5
2 files changed, 21 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 3c46db4..7ec448a 100644
--- a/Android.bp
+++ b/Android.bp
@@ -4,3 +4,19 @@ java_import {
jars: ["lib/kotlin-stdlib.jar"],
sdk_version: "core_current",
}
+
+java_import {
+ name: "kotlin-test",
+ host_supported: true,
+ jars: ["lib/kotlin-test.jar", "lib/kotlin-test-junit.jar"],
+ sdk_version: "core_current",
+}
+
+// On-device shared library with kotlin.* package renamed to com.android.kotlin.*
+java_library {
+ name: "kotlin-stdlib-renamed",
+ static_libs: ["kotlin-stdlib"],
+ no_framework_libs: true,
+ jarjar_rules: "jarjar-rules.txt",
+ sdk_version: "core_current",
+}
diff --git a/jarjar-rules.txt b/jarjar-rules.txt
new file mode 100644
index 0000000..216b916
--- /dev/null
+++ b/jarjar-rules.txt
@@ -0,0 +1,5 @@
+rule kotlin.test.** @0
+rule kotlin.** com.android.@0
+
+rule org.jetbrains.** com.android.@0
+