aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Cross2019-05-13 13:06:25 -0500
committerColin Cross2019-05-15 12:38:11 -0500
commit0b03d9701b532836fb72392cba46f676796f4c07 (patch)
treebc00c7d36341c8e46047637f158c60919069cff3
parentb7afaf080262778b1025283bd55eff5354ba978e (diff)
downloadplatform-build-soong-0b03d9701b532836fb72392cba46f676796f4c07.tar.gz
platform-build-soong-0b03d9701b532836fb72392cba46f676796f4c07.tar.xz
platform-build-soong-0b03d9701b532836fb72392cba46f676796f4c07.zip
Add kotlin-stdlib-jdk8 when using Kotlin
kotlin-stdlib-jdk8 contains extensions to the Kotlin standard library for use when targeting Java language level 8. Test: m checkbuild Change-Id: Iac5f977f9080d8e0e2402b08a992a93c909744e9
-rw-r--r--java/java.go5
-rw-r--r--java/testing.go2
2 files changed, 5 insertions, 2 deletions
diff --git a/java/java.go b/java/java.go
index 866b33c0..3fa85006 100644
--- a/java/java.go
+++ b/java/java.go
@@ -517,7 +517,8 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) {
517 if j.hasSrcExt(".kt") { 517 if j.hasSrcExt(".kt") {
518 // TODO(ccross): move this to a mutator pass that can tell if generated sources contain 518 // TODO(ccross): move this to a mutator pass that can tell if generated sources contain
519 // Kotlin files 519 // Kotlin files
520 ctx.AddVariationDependencies(nil, kotlinStdlibTag, "kotlin-stdlib") 520 ctx.AddVariationDependencies(nil, kotlinStdlibTag,
521 "kotlin-stdlib", "kotlin-stdlib-jdk7", "kotlin-stdlib-jdk8")
521 if len(j.properties.Plugins) > 0 { 522 if len(j.properties.Plugins) > 0 {
522 ctx.AddVariationDependencies(nil, kotlinAnnotationsTag, "kotlin-annotations") 523 ctx.AddVariationDependencies(nil, kotlinAnnotationsTag, "kotlin-annotations")
523 } 524 }
@@ -793,7 +794,7 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps {
793 deps.staticResourceJars = append(deps.staticResourceJars, dep.(*AndroidApp).exportPackage) 794 deps.staticResourceJars = append(deps.staticResourceJars, dep.(*AndroidApp).exportPackage)
794 } 795 }
795 case kotlinStdlibTag: 796 case kotlinStdlibTag:
796 deps.kotlinStdlib = dep.HeaderJars() 797 deps.kotlinStdlib = append(deps.kotlinStdlib, dep.HeaderJars()...)
797 case kotlinAnnotationsTag: 798 case kotlinAnnotationsTag:
798 deps.kotlinAnnotations = dep.HeaderJars() 799 deps.kotlinAnnotations = dep.HeaderJars()
799 } 800 }
diff --git a/java/testing.go b/java/testing.go
index 1be3768b..22831c92 100644
--- a/java/testing.go
+++ b/java/testing.go
@@ -44,6 +44,8 @@ func GatherRequiredDepsForTest() string {
44 "core.current.stubs", 44 "core.current.stubs",
45 "core.platform.api.stubs", 45 "core.platform.api.stubs",
46 "kotlin-stdlib", 46 "kotlin-stdlib",
47 "kotlin-stdlib-jdk7",
48 "kotlin-stdlib-jdk8",
47 "kotlin-annotations", 49 "kotlin-annotations",
48 } 50 }
49 51