Merge "Add kotlin-stdlib-jdk8 when using Kotlin"

am: 6be6c2e4c5

Change-Id: I0539b69c61c3e9a1d52bc54d6aa939b06154e6ca
This commit is contained in:
Colin Cross 2019-05-21 13:22:30 -07:00 committed by android-build-merger
commit 10077730ed
2 changed files with 5 additions and 2 deletions

View file

@ -517,7 +517,8 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) {
if j.hasSrcExt(".kt") {
// TODO(ccross): move this to a mutator pass that can tell if generated sources contain
// Kotlin files
ctx.AddVariationDependencies(nil, kotlinStdlibTag, "kotlin-stdlib")
ctx.AddVariationDependencies(nil, kotlinStdlibTag,
"kotlin-stdlib", "kotlin-stdlib-jdk7", "kotlin-stdlib-jdk8")
if len(j.properties.Plugins) > 0 {
ctx.AddVariationDependencies(nil, kotlinAnnotationsTag, "kotlin-annotations")
}
@ -793,7 +794,7 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps {
deps.staticResourceJars = append(deps.staticResourceJars, dep.(*AndroidApp).exportPackage)
}
case kotlinStdlibTag:
deps.kotlinStdlib = dep.HeaderJars()
deps.kotlinStdlib = append(deps.kotlinStdlib, dep.HeaderJars()...)
case kotlinAnnotationsTag:
deps.kotlinAnnotations = dep.HeaderJars()
}

View file

@ -44,6 +44,8 @@ func GatherRequiredDepsForTest() string {
"core.current.stubs",
"core.platform.api.stubs",
"kotlin-stdlib",
"kotlin-stdlib-jdk7",
"kotlin-stdlib-jdk8",
"kotlin-annotations",
}