Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fba2c6a9 authored by Anton Hansson's avatar Anton Hansson Committed by Automerger Merge Worker
Browse files

Merge "Remove _API_FILE variables" am: 43b6019e am: a39b4ec1 am: c7991608

Change-Id: I65a684053b6ecdf9191e1132688add4cbae78860
parents 5db958a9 c7991608
Loading
Loading
Loading
Loading
+8 −53
Original line number Original line Diff line number Diff line
@@ -472,34 +472,6 @@ func (ddoc *Droiddoc) AndroidMkEntries() []android.AndroidMkEntries {
				if ddoc.Javadoc.stubsSrcJar != nil {
				if ddoc.Javadoc.stubsSrcJar != nil {
					entries.SetPath("LOCAL_DROIDDOC_STUBS_SRCJAR", ddoc.Javadoc.stubsSrcJar)
					entries.SetPath("LOCAL_DROIDDOC_STUBS_SRCJAR", ddoc.Javadoc.stubsSrcJar)
				}
				}
				apiFilePrefix := "INTERNAL_PLATFORM_"
				if String(ddoc.properties.Api_tag_name) != "" {
					apiFilePrefix += String(ddoc.properties.Api_tag_name) + "_"
				}
				if ddoc.apiFile != nil {
					entries.SetPath(apiFilePrefix+"API_FILE", ddoc.apiFile)
				}
				if ddoc.dexApiFile != nil {
					entries.SetPath(apiFilePrefix+"DEX_API_FILE", ddoc.dexApiFile)
				}
				if ddoc.privateApiFile != nil {
					entries.SetPath(apiFilePrefix+"PRIVATE_API_FILE", ddoc.privateApiFile)
				}
				if ddoc.privateDexApiFile != nil {
					entries.SetPath(apiFilePrefix+"PRIVATE_DEX_API_FILE", ddoc.privateDexApiFile)
				}
				if ddoc.removedApiFile != nil {
					entries.SetPath(apiFilePrefix+"REMOVED_API_FILE", ddoc.removedApiFile)
				}
				if ddoc.removedDexApiFile != nil {
					entries.SetPath(apiFilePrefix+"REMOVED_DEX_API_FILE", ddoc.removedDexApiFile)
				}
				if ddoc.exactApiFile != nil {
					entries.SetPath(apiFilePrefix+"EXACT_API_FILE", ddoc.exactApiFile)
				}
				if ddoc.proguardFile != nil {
					entries.SetPath(apiFilePrefix+"PROGUARD_FILE", ddoc.proguardFile)
				}
			},
			},
		},
		},
		ExtraFooters: []android.AndroidMkExtraFootersFunc{
		ExtraFooters: []android.AndroidMkExtraFootersFunc{
@@ -578,35 +550,18 @@ func (dstubs *Droidstubs) AndroidMkEntries() []android.AndroidMkEntries {
				if dstubs.metadataZip != nil {
				if dstubs.metadataZip != nil {
					entries.SetPath("LOCAL_DROIDDOC_METADATA_ZIP", dstubs.metadataZip)
					entries.SetPath("LOCAL_DROIDDOC_METADATA_ZIP", dstubs.metadataZip)
				}
				}
				apiFilePrefix := "INTERNAL_PLATFORM_"
				if String(dstubs.properties.Api_tag_name) != "" {
					apiFilePrefix += String(dstubs.properties.Api_tag_name) + "_"
				}
				if dstubs.apiFile != nil {
					entries.SetPath(apiFilePrefix+"API_FILE", dstubs.apiFile)
				}
				if dstubs.dexApiFile != nil {
					entries.SetPath(apiFilePrefix+"DEX_API_FILE", dstubs.dexApiFile)
				}
				if dstubs.privateApiFile != nil {
					entries.SetPath(apiFilePrefix+"PRIVATE_API_FILE", dstubs.privateApiFile)
				}
				if dstubs.privateDexApiFile != nil {
					entries.SetPath(apiFilePrefix+"PRIVATE_DEX_API_FILE", dstubs.privateDexApiFile)
				}
				if dstubs.removedApiFile != nil {
					entries.SetPath(apiFilePrefix+"REMOVED_API_FILE", dstubs.removedApiFile)
				}
				if dstubs.removedDexApiFile != nil {
					entries.SetPath(apiFilePrefix+"REMOVED_DEX_API_FILE", dstubs.removedDexApiFile)
				}
				if dstubs.exactApiFile != nil {
					entries.SetPath(apiFilePrefix+"EXACT_API_FILE", dstubs.exactApiFile)
				}
			},
			},
		},
		},
		ExtraFooters: []android.AndroidMkExtraFootersFunc{
		ExtraFooters: []android.AndroidMkExtraFootersFunc{
			func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) {
			func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) {
				if dstubs.apiFile != nil {
					fmt.Fprintf(w, ".PHONY: %s %s.txt\n", dstubs.Name(), dstubs.Name())
					fmt.Fprintf(w, "%s %s.txt: %s\n", dstubs.Name(), dstubs.Name(), dstubs.apiFile)
				}
				if dstubs.removedApiFile != nil {
					fmt.Fprintf(w, ".PHONY: %s %s.txt\n", dstubs.Name(), dstubs.Name())
					fmt.Fprintf(w, "%s %s.txt: %s\n", dstubs.Name(), dstubs.Name(), dstubs.removedApiFile)
				}
				if dstubs.checkCurrentApiTimestamp != nil {
				if dstubs.checkCurrentApiTimestamp != nil {
					fmt.Fprintln(w, ".PHONY:", dstubs.Name()+"-check-current-api")
					fmt.Fprintln(w, ".PHONY:", dstubs.Name()+"-check-current-api")
					fmt.Fprintln(w, dstubs.Name()+"-check-current-api:",
					fmt.Fprintln(w, dstubs.Name()+"-check-current-api:",
+0 −14
Original line number Original line Diff line number Diff line
@@ -394,13 +394,6 @@ func (module *SdkLibrary) sdkVersionForStubsLibrary(mctx android.LoadHookContext
	}
	}
}
}


// $(INTERNAL_PLATFORM_<apiTagName>_API_FILE) points to the generated
// api file for the current source
// TODO: remove this when apicheck is done in soong
func (module *SdkLibrary) apiTagName(apiScope *apiScope) string {
	return strings.Replace(strings.ToUpper(module.BaseModuleName()), ".", "_", -1) + apiScope.apiFileMakeVariableSuffix
}

func (module *SdkLibrary) latestApiFilegroupName(apiScope *apiScope) string {
func (module *SdkLibrary) latestApiFilegroupName(apiScope *apiScope) string {
	return ":" + module.BaseModuleName() + ".api." + apiScope.name + ".latest"
	return ":" + module.BaseModuleName() + ".api." + apiScope.name + ".latest"
}
}
@@ -491,9 +484,6 @@ func (module *SdkLibrary) createStubsSources(mctx android.LoadHookContext, apiSc
		Libs                             []string
		Libs                             []string
		Arg_files                        []string
		Arg_files                        []string
		Args                             *string
		Args                             *string
		Api_tag_name                     *string
		Api_filename                     *string
		Removed_api_filename             *string
		Java_version                     *string
		Java_version                     *string
		Merge_annotations_dirs           []string
		Merge_annotations_dirs           []string
		Merge_inclusion_annotations_dirs []string
		Merge_inclusion_annotations_dirs []string
@@ -572,10 +562,6 @@ func (module *SdkLibrary) createStubsSources(mctx android.LoadHookContext, apiSc
	apiDir := module.getApiDir()
	apiDir := module.getApiDir()
	currentApiFileName = path.Join(apiDir, currentApiFileName)
	currentApiFileName = path.Join(apiDir, currentApiFileName)
	removedApiFileName = path.Join(apiDir, removedApiFileName)
	removedApiFileName = path.Join(apiDir, removedApiFileName)
	// TODO(jiyong): remove these three props
	props.Api_tag_name = proptools.StringPtr(module.apiTagName(apiScope))
	props.Api_filename = proptools.StringPtr(currentApiFileName)
	props.Removed_api_filename = proptools.StringPtr(removedApiFileName)


	// check against the not-yet-release API
	// check against the not-yet-release API
	props.Check_api.Current.Api_file = proptools.StringPtr(currentApiFileName)
	props.Check_api.Current.Api_file = proptools.StringPtr(currentApiFileName)