java link time error improve
Asked about error message including "against private API.Adjust sdk_version", which is a bit hard to parse due to missing space. Also tried to make error message less verbose, so that it is more clear what to do, and fixed a grammar mistake. Bug: N/A Test: N/A Change-Id: Ib9a30d86b5cb0e9b3b7d5576ecb9498a9b316042
This commit is contained in:
@@ -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"],
|
||||||
|
@@ -962,7 +962,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:
|
||||||
|
@@ -200,7 +200,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"],
|
||||||
@@ -244,7 +244,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"],
|
||||||
|
Reference in New Issue
Block a user