aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Cross2019-05-21 13:11:59 -0500
committerGerrit Code Review2019-05-21 13:11:59 -0500
commit6be6c2e4c53748263222aae44e6b3ecedf885927 (patch)
tree40004e1cc466b53b42b037aea4638c74a9784c9e
parent8a7469a0d7d390b76ede3bd830065575571502d5 (diff)
parent0b03d9701b532836fb72392cba46f676796f4c07 (diff)
downloadplatform-build-soong-6be6c2e4c53748263222aae44e6b3ecedf885927.tar.gz
platform-build-soong-6be6c2e4c53748263222aae44e6b3ecedf885927.tar.xz
platform-build-soong-6be6c2e4c53748263222aae44e6b3ecedf885927.zip
Merge "Add kotlin-stdlib-jdk8 when using Kotlin"
-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 060a0070..44830839 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