java_sdk_library: Remove some almost single use constants am: dd9d0740fa
am: 04e787a74a
Change-Id: I1fba19d2f21021a8de3c04badc43e07e8ec6fd34
This commit is contained in:
@@ -1177,12 +1177,12 @@ func TestJavaSdkLibrary(t *testing.T) {
|
|||||||
|
|
||||||
// check the existence of the internal modules
|
// check the existence of the internal modules
|
||||||
ctx.ModuleForTests("foo", "android_common")
|
ctx.ModuleForTests("foo", "android_common")
|
||||||
ctx.ModuleForTests("foo"+sdkStubsLibrarySuffix, "android_common")
|
ctx.ModuleForTests(apiScopePublic.stubsLibraryModuleName("foo"), "android_common")
|
||||||
ctx.ModuleForTests("foo"+sdkStubsLibrarySuffix+sdkSystemApiSuffix, "android_common")
|
ctx.ModuleForTests(apiScopeSystem.stubsLibraryModuleName("foo"), "android_common")
|
||||||
ctx.ModuleForTests("foo"+sdkStubsLibrarySuffix+sdkTestApiSuffix, "android_common")
|
ctx.ModuleForTests(apiScopeTest.stubsLibraryModuleName("foo"), "android_common")
|
||||||
ctx.ModuleForTests("foo"+sdkStubsSourceSuffix, "android_common")
|
ctx.ModuleForTests(apiScopePublic.stubsSourceModuleName("foo"), "android_common")
|
||||||
ctx.ModuleForTests("foo"+sdkStubsSourceSuffix+sdkSystemApiSuffix, "android_common")
|
ctx.ModuleForTests(apiScopeSystem.stubsSourceModuleName("foo"), "android_common")
|
||||||
ctx.ModuleForTests("foo"+sdkStubsSourceSuffix+sdkTestApiSuffix, "android_common")
|
ctx.ModuleForTests(apiScopeTest.stubsSourceModuleName("foo"), "android_common")
|
||||||
ctx.ModuleForTests("foo"+sdkXmlFileSuffix, "android_common")
|
ctx.ModuleForTests("foo"+sdkXmlFileSuffix, "android_common")
|
||||||
ctx.ModuleForTests("foo.api.public.28", "")
|
ctx.ModuleForTests("foo.api.public.28", "")
|
||||||
ctx.ModuleForTests("foo.api.system.28", "")
|
ctx.ModuleForTests("foo.api.system.28", "")
|
||||||
|
@@ -30,13 +30,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
sdkStubsLibrarySuffix = ".stubs"
|
sdkXmlFileSuffix = ".xml"
|
||||||
sdkSystemApiSuffix = ".system"
|
permissionsTemplate = `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n` +
|
||||||
sdkTestApiSuffix = ".test"
|
|
||||||
sdkStubsSourceSuffix = ".stubs.source"
|
|
||||||
sdkApiSuffix = ".api"
|
|
||||||
sdkXmlFileSuffix = ".xml"
|
|
||||||
permissionsTemplate = `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n` +
|
|
||||||
`<!-- Copyright (C) 2018 The Android Open Source Project\n` +
|
`<!-- Copyright (C) 2018 The Android Open Source Project\n` +
|
||||||
`\n` +
|
`\n` +
|
||||||
` Licensed under the Apache License, Version 2.0 (the \"License\");\n` +
|
` Licensed under the Apache License, Version 2.0 (the \"License\");\n` +
|
||||||
@@ -192,15 +187,15 @@ func initApiScope(scope *apiScope) *apiScope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (scope *apiScope) stubsLibraryModuleName(baseName string) string {
|
func (scope *apiScope) stubsLibraryModuleName(baseName string) string {
|
||||||
return baseName + sdkStubsLibrarySuffix + scope.moduleSuffix
|
return baseName + ".stubs" + scope.moduleSuffix
|
||||||
}
|
}
|
||||||
|
|
||||||
func (scope *apiScope) stubsSourceModuleName(baseName string) string {
|
func (scope *apiScope) stubsSourceModuleName(baseName string) string {
|
||||||
return baseName + sdkStubsSourceSuffix + scope.moduleSuffix
|
return baseName + ".stubs.source" + scope.moduleSuffix
|
||||||
}
|
}
|
||||||
|
|
||||||
func (scope *apiScope) apiModuleName(baseName string) string {
|
func (scope *apiScope) apiModuleName(baseName string) string {
|
||||||
return baseName + sdkApiSuffix + scope.moduleSuffix
|
return baseName + ".api" + scope.moduleSuffix
|
||||||
}
|
}
|
||||||
|
|
||||||
func (scope *apiScope) String() string {
|
func (scope *apiScope) String() string {
|
||||||
@@ -240,7 +235,7 @@ var (
|
|||||||
return &module.sdkLibraryProperties.System
|
return &module.sdkLibraryProperties.System
|
||||||
},
|
},
|
||||||
apiFilePrefix: "system-",
|
apiFilePrefix: "system-",
|
||||||
moduleSuffix: sdkSystemApiSuffix,
|
moduleSuffix: ".system",
|
||||||
sdkVersion: "system_current",
|
sdkVersion: "system_current",
|
||||||
droidstubsArgs: []string{"-showAnnotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\)"},
|
droidstubsArgs: []string{"-showAnnotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\)"},
|
||||||
})
|
})
|
||||||
@@ -252,7 +247,7 @@ var (
|
|||||||
return &module.sdkLibraryProperties.Test
|
return &module.sdkLibraryProperties.Test
|
||||||
},
|
},
|
||||||
apiFilePrefix: "test-",
|
apiFilePrefix: "test-",
|
||||||
moduleSuffix: sdkTestApiSuffix,
|
moduleSuffix: ".test",
|
||||||
sdkVersion: "test_current",
|
sdkVersion: "test_current",
|
||||||
droidstubsArgs: []string{"-showAnnotation android.annotation.TestApi"},
|
droidstubsArgs: []string{"-showAnnotation android.annotation.TestApi"},
|
||||||
unstable: true,
|
unstable: true,
|
||||||
|
Reference in New Issue
Block a user