diff options
author | 2022-08-16 10:27:33 -0700 | |
---|---|---|
committer | 2022-08-17 10:43:13 -0700 | |
commit | d079e0b2708ce0f4cce470db929f28dd8d2b0e80 (patch) | |
tree | e8cdb4a59bd88411a262a1d91bd75def56cc4de2 /java | |
parent | 852d0c48593fb2a17d301d7274edac907e8e194f (diff) |
Reformat build/soong for go 1.19
Test: none
Change-Id: I132368f0fcbdb5ea088b5b84dbe4ccfdd9e94cad
Diffstat (limited to 'java')
-rw-r--r-- | java/app_import.go | 26 | ||||
-rw-r--r-- | java/classpath_element.go | 22 | ||||
-rw-r--r-- | java/dexpreopt_bootjars.go | 1 | ||||
-rw-r--r-- | java/droiddoc.go | 10 | ||||
-rw-r--r-- | java/droidstubs.go | 2 | ||||
-rw-r--r-- | java/genrule.go | 32 | ||||
-rw-r--r-- | java/platform_compat_config.go | 2 | ||||
-rw-r--r-- | java/sdk_library.go | 13 | ||||
-rw-r--r-- | java/sdk_library_external.go | 7 |
9 files changed, 52 insertions, 63 deletions
diff --git a/java/app_import.go b/java/app_import.go index 4bab14b32..d6dca3836 100644 --- a/java/app_import.go +++ b/java/app_import.go @@ -461,19 +461,19 @@ func createVariantGroupType(variants []string, variantGroupName string) reflect. // android_app_import imports a prebuilt apk with additional processing specified in the module. // DPI-specific apk source files can be specified using dpi_variants. Example: // -// android_app_import { -// name: "example_import", -// apk: "prebuilts/example.apk", -// dpi_variants: { -// mdpi: { -// apk: "prebuilts/example_mdpi.apk", -// }, -// xhdpi: { -// apk: "prebuilts/example_xhdpi.apk", -// }, -// }, -// presigned: true, -// } +// android_app_import { +// name: "example_import", +// apk: "prebuilts/example.apk", +// dpi_variants: { +// mdpi: { +// apk: "prebuilts/example_mdpi.apk", +// }, +// xhdpi: { +// apk: "prebuilts/example_xhdpi.apk", +// }, +// }, +// presigned: true, +// } func AndroidAppImportFactory() android.Module { module := &AndroidAppImport{} module.AddProperties(&module.properties) diff --git a/java/classpath_element.go b/java/classpath_element.go index 753e7f888..496291678 100644 --- a/java/classpath_element.go +++ b/java/classpath_element.go @@ -97,11 +97,11 @@ type ClasspathElementContext interface { // the list with its Contents field. // // Requirements/Assumptions: -// * A fragment can be associated with more than one apex but each apex must only be associated with -// a single fragment from the fragments list. -// * All of a fragment's contents must appear as a contiguous block in the same order in the -// libraries list. -// * Each library must only appear in a single fragment. +// - A fragment can be associated with more than one apex but each apex must only be associated with +// a single fragment from the fragments list. +// - All of a fragment's contents must appear as a contiguous block in the same order in the +// libraries list. +// - Each library must only appear in a single fragment. // // The apex is used to identify which libraries belong to which fragment. First a mapping is created // from apex to fragment. Then the libraries are iterated over and any library in an apex is @@ -109,13 +109,15 @@ type ClasspathElementContext interface { // standalone and have their own element. // // e.g. Given the following input: -// libraries: com.android.art:core-oj, com.android.art:core-libart, framework, ext -// fragments: com.android.art:art-bootclasspath-fragment +// +// libraries: com.android.art:core-oj, com.android.art:core-libart, framework, ext +// fragments: com.android.art:art-bootclasspath-fragment // // Then this will return: -// ClasspathFragmentElement(art-bootclasspath-fragment, [core-oj, core-libart]), -// ClasspathLibraryElement(framework), -// ClasspathLibraryElement(ext), +// +// ClasspathFragmentElement(art-bootclasspath-fragment, [core-oj, core-libart]), +// ClasspathLibraryElement(framework), +// ClasspathLibraryElement(ext), func CreateClasspathElements(ctx ClasspathElementContext, libraries []android.Module, fragments []android.Module) ClasspathElements { // Create a map from apex name to the fragment module. This makes it easy to find the fragment // associated with a particular apex. diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go index b4cd07a78..4e416fc82 100644 --- a/java/dexpreopt_bootjars.go +++ b/java/dexpreopt_bootjars.go @@ -418,7 +418,6 @@ func (image *bootImageConfig) shouldInstallInApex() bool { // // The location is passed as an argument to the ART tools like dex2oat instead of the real path. // ART tools will then reconstruct the architecture-specific real path. -// func (image *bootImageVariant) imageLocations() (imageLocationsOnHost []string, imageLocationsOnDevice []string) { if image.extends != nil { imageLocationsOnHost, imageLocationsOnDevice = image.extends.getVariant(image.target).imageLocations() diff --git a/java/droiddoc.go b/java/droiddoc.go index 96639220a..901419cba 100644 --- a/java/droiddoc.go +++ b/java/droiddoc.go @@ -158,9 +158,7 @@ type DroiddocProperties struct { Compat_config *string `android:"path"` } -// // Common flags passed down to build rule -// type droiddocBuilderFlags struct { bootClasspathArgs string classpathArgs string @@ -193,9 +191,7 @@ func apiCheckEnabled(ctx android.ModuleContext, apiToCheck ApiToCheck, apiVersio return false } -// // Javadoc -// type Javadoc struct { android.ModuleBase android.DefaultableModuleBase @@ -548,9 +544,7 @@ func (j *Javadoc) GenerateAndroidBuildActions(ctx android.ModuleContext) { rule.Build("javadoc", "javadoc") } -// // Droiddoc -// type Droiddoc struct { Javadoc @@ -827,9 +821,7 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) { rule.Build("javadoc", desc) } -// // Exported Droiddoc Directory -// var droiddocTemplateTag = dependencyTag{name: "droiddoc-template"} type ExportedDroiddocDirProperties struct { @@ -862,9 +854,7 @@ func (d *ExportedDroiddocDir) GenerateAndroidBuildActions(ctx android.ModuleCont d.deps = android.PathsForModuleSrc(ctx, []string{filepath.Join(path, "**/*")}) } -// // Defaults -// type DocDefaults struct { android.ModuleBase android.DefaultsModuleBase diff --git a/java/droidstubs.go b/java/droidstubs.go index 115388be5..8baf4d357 100644 --- a/java/droidstubs.go +++ b/java/droidstubs.go @@ -42,9 +42,7 @@ func RegisterStubsBuildComponents(ctx android.RegistrationContext) { ctx.RegisterModuleType("prebuilt_stubs_sources", PrebuiltStubsSourcesFactory) } -// // Droidstubs -// type Droidstubs struct { Javadoc android.SdkBase diff --git a/java/genrule.go b/java/genrule.go index 5047c412f..208e1f43b 100644 --- a/java/genrule.go +++ b/java/genrule.go @@ -43,23 +43,23 @@ func RegisterGenRuleBuildComponents(ctx android.RegistrationContext) { // // Use a java_genrule to package generated java resources: // -// java_genrule { -// name: "generated_resources", -// tools: [ -// "generator", -// "soong_zip", -// ], -// srcs: ["generator_inputs/**/*"], -// out: ["generated_android_icu4j_resources.jar"], -// cmd: "$(location generator) $(in) -o $(genDir) " + -// "&& $(location soong_zip) -o $(out) -C $(genDir)/res -D $(genDir)/res", -// } +// java_genrule { +// name: "generated_resources", +// tools: [ +// "generator", +// "soong_zip", +// ], +// srcs: ["generator_inputs/**/*"], +// out: ["generated_android_icu4j_resources.jar"], +// cmd: "$(location generator) $(in) -o $(genDir) " + +// "&& $(location soong_zip) -o $(out) -C $(genDir)/res -D $(genDir)/res", +// } // -// java_library { -// name: "lib_with_generated_resources", -// srcs: ["src/**/*.java"], -// static_libs: ["generated_resources"], -// } +// java_library { +// name: "lib_with_generated_resources", +// srcs: ["src/**/*.java"], +// static_libs: ["generated_resources"], +// } func GenRuleFactory() android.Module { module := genrule.NewGenRule() diff --git a/java/platform_compat_config.go b/java/platform_compat_config.go index 1c4249507..655021fc4 100644 --- a/java/platform_compat_config.go +++ b/java/platform_compat_config.go @@ -280,7 +280,7 @@ func platformCompatConfigSingletonFactory() android.Singleton { return &platformCompatConfigSingleton{} } -//============== merged_compat_config ================= +// ============== merged_compat_config ================= type globalCompatConfigProperties struct { // name of the file into which the metadata will be copied. Filename *string diff --git a/java/sdk_library.go b/java/sdk_library.go index 490c03132..8f499b101 100644 --- a/java/sdk_library.go +++ b/java/sdk_library.go @@ -2129,11 +2129,12 @@ var _ SdkLibraryDependency = (*SdkLibraryImport)(nil) // The type of a structure that contains a field of type sdkLibraryScopeProperties // for each apiscope in allApiScopes, e.g. something like: -// struct { -// Public sdkLibraryScopeProperties -// System sdkLibraryScopeProperties -// ... -// } +// +// struct { +// Public sdkLibraryScopeProperties +// System sdkLibraryScopeProperties +// ... +// } var allScopeStructType = createAllScopePropertiesStructType() // Dynamically create a structure type for each apiscope in allApiScopes. @@ -2556,9 +2557,7 @@ func (module *SdkLibraryImport) RequiredFilesFromPrebuiltApex(ctx android.BaseMo return requiredFilesFromPrebuiltApexForImport(name) } -// // java_sdk_library_xml -// type sdkLibraryXml struct { android.ModuleBase android.DefaultableModuleBase diff --git a/java/sdk_library_external.go b/java/sdk_library_external.go index 0acaa13b2..4f8398194 100644 --- a/java/sdk_library_external.go +++ b/java/sdk_library_external.go @@ -49,9 +49,10 @@ func (g partitionGroup) String() string { // Get partition group of java module that can be used at inter-partition dependency check. // We currently have three groups -// (system, system_ext) => system partition group -// (vendor, odm) => vendor partition group -// (product) => product partition group +// +// (system, system_ext) => system partition group +// (vendor, odm) => vendor partition group +// (product) => product partition group func (j *Module) partitionGroup(ctx android.EarlyModuleContext) partitionGroup { // system and system_ext partition can be treated as the same in terms of inter-partition dependency. if j.Platform() || j.SystemExtSpecific() { |