Merge changes from topic "metalava-sdk-jar"
* changes: Add private-stub-annotations.jar as core-java lib Use Metalava based android.jar for SDK
This commit is contained in:
@@ -304,6 +304,9 @@ func (ddoc *Droiddoc) AndroidMk() android.AndroidMkData {
|
|||||||
if ddoc.Javadoc.stubsSrcJar != nil {
|
if ddoc.Javadoc.stubsSrcJar != nil {
|
||||||
fmt.Fprintln(w, "LOCAL_DROIDDOC_STUBS_SRCJAR := ", ddoc.Javadoc.stubsSrcJar.String())
|
fmt.Fprintln(w, "LOCAL_DROIDDOC_STUBS_SRCJAR := ", ddoc.Javadoc.stubsSrcJar.String())
|
||||||
}
|
}
|
||||||
|
if ddoc.annotationsZip != nil {
|
||||||
|
fmt.Fprintln(w, "LOCAL_DROIDDOC_ANNOTATIONS_ZIP := ", ddoc.annotationsZip.String())
|
||||||
|
}
|
||||||
if ddoc.checkCurrentApiTimestamp != nil {
|
if ddoc.checkCurrentApiTimestamp != nil {
|
||||||
fmt.Fprintln(w, ".PHONY:", ddoc.Name()+"-check-current-api")
|
fmt.Fprintln(w, ".PHONY:", ddoc.Name()+"-check-current-api")
|
||||||
fmt.Fprintln(w, ddoc.Name()+"-check-current-api:",
|
fmt.Fprintln(w, ddoc.Name()+"-check-current-api:",
|
||||||
|
@@ -302,6 +302,8 @@ type Droiddoc struct {
|
|||||||
checkCurrentApiTimestamp android.WritablePath
|
checkCurrentApiTimestamp android.WritablePath
|
||||||
updateCurrentApiTimestamp android.WritablePath
|
updateCurrentApiTimestamp android.WritablePath
|
||||||
checkLastReleasedApiTimestamp android.WritablePath
|
checkLastReleasedApiTimestamp android.WritablePath
|
||||||
|
|
||||||
|
annotationsZip android.WritablePath
|
||||||
}
|
}
|
||||||
|
|
||||||
func InitDroiddocModule(module android.DefaultableModule, hod android.HostOrDeviceSupported) {
|
func InitDroiddocModule(module android.DefaultableModule, hod android.HostOrDeviceSupported) {
|
||||||
@@ -965,8 +967,8 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
}
|
}
|
||||||
opts += " --include-annotations --migrate-nullness"
|
opts += " --include-annotations --migrate-nullness"
|
||||||
|
|
||||||
annotationsZip := android.PathForModuleOut(ctx, ctx.ModuleName()+"_annotations.zip")
|
d.annotationsZip = android.PathForModuleOut(ctx, ctx.ModuleName()+"_annotations.zip")
|
||||||
implicitOutputs = append(implicitOutputs, annotationsZip)
|
implicitOutputs = append(implicitOutputs, d.annotationsZip)
|
||||||
|
|
||||||
if String(d.properties.Metalava_merge_annotations_dir) == "" {
|
if String(d.properties.Metalava_merge_annotations_dir) == "" {
|
||||||
ctx.PropertyErrorf("metalava_merge_annotations",
|
ctx.PropertyErrorf("metalava_merge_annotations",
|
||||||
@@ -975,7 +977,7 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
|
|
||||||
mergeAnnotationsDir := android.PathForSource(ctx, String(d.properties.Metalava_merge_annotations_dir))
|
mergeAnnotationsDir := android.PathForSource(ctx, String(d.properties.Metalava_merge_annotations_dir))
|
||||||
|
|
||||||
opts += " --extract-annotations " + annotationsZip.String() + " --merge-annotations " + mergeAnnotationsDir.String()
|
opts += " --extract-annotations " + d.annotationsZip.String() + " --merge-annotations " + mergeAnnotationsDir.String()
|
||||||
// TODO(tnorbye): find owners to fix these warnings when annotation was enabled.
|
// TODO(tnorbye): find owners to fix these warnings when annotation was enabled.
|
||||||
opts += " --hide HiddenTypedefConstant --hide SuperfluousPrefix --hide AnnotationExtraction"
|
opts += " --hide HiddenTypedefConstant --hide SuperfluousPrefix --hide AnnotationExtraction"
|
||||||
}
|
}
|
||||||
|
@@ -693,7 +693,8 @@ func getLinkType(m *Module, name string) linkType {
|
|||||||
ver := m.sdkVersion()
|
ver := m.sdkVersion()
|
||||||
noStdLibs := Bool(m.properties.No_standard_libs)
|
noStdLibs := Bool(m.properties.No_standard_libs)
|
||||||
switch {
|
switch {
|
||||||
case name == "core.current.stubs" || ver == "core_current" || noStdLibs || name == "stub-annotations":
|
case name == "core.current.stubs" || ver == "core_current" || noStdLibs || name == "stub-annotations" ||
|
||||||
|
name == "private-stub-annotations-jar":
|
||||||
return javaCore
|
return javaCore
|
||||||
case name == "android_system_stubs_current" || strings.HasPrefix(ver, "system_") || name == "metalava_android_system_stubs_current":
|
case name == "android_system_stubs_current" || strings.HasPrefix(ver, "system_") || name == "metalava_android_system_stubs_current":
|
||||||
return javaSystem
|
return javaSystem
|
||||||
|
Reference in New Issue
Block a user