From b6d171bb73fd4c64b1056dbe97fabf2487811d55 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Sun, 7 Apr 2019 09:41:44 -0700 Subject: [PATCH 1/2] Update default soong config BuildNumberFromFile is required to be non-empty for version injection to work. The various platform version values are needed for various Java builds. Test: treehugger Change-Id: Ifa5844794ea9e9baf0ec725dec107975cd759354 --- android/variable.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/android/variable.go b/android/variable.go index 68a24ab35..16d7b1384 100644 --- a/android/variable.go +++ b/android/variable.go @@ -303,9 +303,15 @@ func stringPtr(v string) *string { func (v *productVariables) SetDefaultConfig() { *v = productVariables{ - Platform_sdk_version: intPtr(26), - Platform_version_active_codenames: []string{"P"}, - Platform_version_future_codenames: []string{"P"}, + BuildNumberFromFile: stringPtr("123456789"), + + Platform_version_name: stringPtr("Q"), + Platform_sdk_version: intPtr(28), + Platform_sdk_codename: stringPtr("Q"), + Platform_sdk_final: boolPtr(false), + Platform_version_active_codenames: []string{"Q"}, + Platform_version_future_codenames: []string{"Q"}, + Platform_vndk_version: stringPtr("Q"), HostArch: stringPtr("x86_64"), HostSecondaryArch: stringPtr("x86"), From aad19605c5b4c4f8e207fd15bc689bca57034187 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Sun, 7 Apr 2019 09:44:35 -0700 Subject: [PATCH 2/2] Add extra used dependencies Found while executing the build actions remotely. Bug: 130111713 Test: treehugger Test: run actions remotely with given dependencies, they pass. Change-Id: I2bff8fb8ccf50fde446d6bcef0f1dca9b2974b4b --- java/config/kotlin.go | 4 ++++ java/gen.go | 9 +++++---- java/kotlin.go | 5 +++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/java/config/kotlin.go b/java/config/kotlin.go index 2af7b3c3a..7cea0429e 100644 --- a/java/config/kotlin.go +++ b/java/config/kotlin.go @@ -27,6 +27,10 @@ var ( func init() { pctx.SourcePathVariable("KotlincCmd", "external/kotlinc/bin/kotlinc") pctx.SourcePathVariable("KotlinCompilerJar", "external/kotlinc/lib/kotlin-compiler.jar") + pctx.SourcePathVariable("KotlinPreloaderJar", "external/kotlinc/lib/kotlin-preloader.jar") + pctx.SourcePathVariable("KotlinReflectJar", "external/kotlinc/lib/kotlin-reflect.jar") + pctx.SourcePathVariable("KotlinScriptRuntimeJar", "external/kotlinc/lib/kotlin-script-runtime.jar") + pctx.SourcePathVariable("KotlinTrove4jJar", "external/kotlinc/lib/trove4j.jar") pctx.SourcePathVariable("KotlinKaptJar", "external/kotlinc/lib/kotlin-annotation-processing.jar") pctx.SourcePathVariable("KotlinStdlibJar", KotlinStdlibJar) diff --git a/java/gen.go b/java/gen.go index 500d887e7..7c57a46ae 100644 --- a/java/gen.go +++ b/java/gen.go @@ -23,8 +23,9 @@ import ( func init() { pctx.HostBinToolVariable("aidlCmd", "aidl") pctx.HostBinToolVariable("syspropCmd", "sysprop_java") - pctx.SourcePathVariable("logtagsCmd", "build/tools/java-event-log-tags.py") - pctx.SourcePathVariable("mergeLogtagsCmd", "build/tools/merge-event-log-tags.py") + pctx.SourcePathVariable("logtagsCmd", "build/make/tools/java-event-log-tags.py") + pctx.SourcePathVariable("mergeLogtagsCmd", "build/make/tools/merge-event-log-tags.py") + pctx.SourcePathVariable("logtagsLib", "build/make/tools/event_log_tags.py") } var ( @@ -38,13 +39,13 @@ var ( logtags = pctx.AndroidStaticRule("logtags", blueprint.RuleParams{ Command: "$logtagsCmd -o $out $in", - CommandDeps: []string{"$logtagsCmd"}, + CommandDeps: []string{"$logtagsCmd", "$logtagsLib"}, }) mergeLogtags = pctx.AndroidStaticRule("mergeLogtags", blueprint.RuleParams{ Command: "$mergeLogtagsCmd -o $out $in", - CommandDeps: []string{"$mergeLogtagsCmd"}, + CommandDeps: []string{"$mergeLogtagsCmd", "$logtagsLib"}, }) sysprop = pctx.AndroidStaticRule("sysprop", diff --git a/java/kotlin.go b/java/kotlin.go index 81b89f96f..054998f04 100644 --- a/java/kotlin.go +++ b/java/kotlin.go @@ -37,6 +37,11 @@ var kotlinc = pctx.AndroidGomaStaticRule("kotlinc", CommandDeps: []string{ "${config.KotlincCmd}", "${config.KotlinCompilerJar}", + "${config.KotlinPreloaderJar}", + "${config.KotlinReflectJar}", + "${config.KotlinScriptRuntimeJar}", + "${config.KotlinStdlibJar}", + "${config.KotlinTrove4jJar}", "${config.GenKotlinBuildFileCmd}", "${config.SoongZipCmd}", "${config.ZipSyncCmd}",