Merge "java link time error improve" am: e63ab5ea02 am: a5fc86f799 am: 4b4b9c5498 am: b5912057ec

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1501002

Change-Id: I12794167b7b56fd68d959ff7417e5d86015d25ed
This commit is contained in:
Treehugger Robot
2020-11-19 20:36:15 +00:00
committed by Automerger Merge Worker
3 changed files with 7 additions and 5 deletions

View File

@@ -291,7 +291,7 @@ func TestAndroidAppLinkType(t *testing.T) {
} }
`) `)
testJavaError(t, "Adjust sdk_version: property of the source or target module so that target module is built with the same or smaller API set than the source.", ` testJavaError(t, "consider adjusting sdk_version: OR platform_apis:", `
android_app { android_app {
name: "foo", name: "foo",
srcs: ["a.java"], srcs: ["a.java"],
@@ -335,7 +335,7 @@ func TestAndroidAppLinkType(t *testing.T) {
} }
`) `)
testJavaError(t, "Adjust sdk_version: property of the source or target module so that target module is built with the same or smaller API set than the source.", ` testJavaError(t, "consider adjusting sdk_version: OR platform_apis:", `
android_app { android_app {
name: "foo", name: "foo",
srcs: ["a.java"], srcs: ["a.java"],

View File

@@ -952,7 +952,9 @@ func checkLinkType(ctx android.ModuleContext, from *Module, to linkTypeContext,
return return
} }
otherLinkType, _ := to.getLinkType(ctx.OtherModuleName(to)) otherLinkType, _ := to.getLinkType(ctx.OtherModuleName(to))
commonMessage := "Adjust sdk_version: property of the source or target module so that target module is built with the same or smaller API set than the source." commonMessage := " In order to fix this, consider adjusting sdk_version: OR platform_apis: " +
"property of the source or target module so that target module is built with the same " +
"or smaller API set when compared to the source."
switch myLinkType { switch myLinkType {
case javaCore: case javaCore:

View File

@@ -202,7 +202,7 @@ func TestJavaLinkType(t *testing.T) {
} }
`) `)
testJavaError(t, "Adjust sdk_version: property of the source or target module so that target module is built with the same or smaller API set than the source.", ` testJavaError(t, "consider adjusting sdk_version: OR platform_apis:", `
java_library { java_library {
name: "foo", name: "foo",
srcs: ["a.java"], srcs: ["a.java"],
@@ -246,7 +246,7 @@ func TestJavaLinkType(t *testing.T) {
} }
`) `)
testJavaError(t, "Adjust sdk_version: property of the source or target module so that target module is built with the same or smaller API set than the source.", ` testJavaError(t, "consider adjusting sdk_version: OR platform_apis:", `
java_library { java_library {
name: "foo", name: "foo",
srcs: ["a.java"], srcs: ["a.java"],