Merge "Use OutputFilesProvider on aconfig_declarations_group" into main
This commit is contained in:
@@ -15,7 +15,6 @@
|
|||||||
package aconfig
|
package aconfig
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
@@ -44,8 +43,6 @@ type DeclarationsModule struct {
|
|||||||
// The flags will only be repackaged if this prop is true.
|
// The flags will only be repackaged if this prop is true.
|
||||||
Exportable bool
|
Exportable bool
|
||||||
}
|
}
|
||||||
|
|
||||||
intermediatePath android.WritablePath
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func DeclarationsFactory() android.Module {
|
func DeclarationsFactory() android.Module {
|
||||||
@@ -86,18 +83,6 @@ func (module *DeclarationsModule) DepsMutator(ctx android.BottomUpMutatorContext
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (module *DeclarationsModule) OutputFiles(tag string) (android.Paths, error) {
|
|
||||||
switch tag {
|
|
||||||
case "":
|
|
||||||
// The default output of this module is the intermediates format, which is
|
|
||||||
// not installable and in a private format that no other rules can handle
|
|
||||||
// correctly.
|
|
||||||
return []android.Path{module.intermediatePath}, nil
|
|
||||||
default:
|
|
||||||
return nil, fmt.Errorf("unsupported aconfig_declarations module reference tag %q", tag)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func joinAndPrefix(prefix string, values []string) string {
|
func joinAndPrefix(prefix string, values []string) string {
|
||||||
var sb strings.Builder
|
var sb strings.Builder
|
||||||
for _, v := range values {
|
for _, v := range values {
|
||||||
@@ -171,5 +156,4 @@ func (module *DeclarationsModule) GenerateAndroidBuildActions(ctx android.Module
|
|||||||
IntermediateCacheOutputPath: intermediateCacheFilePath,
|
IntermediateCacheOutputPath: intermediateCacheFilePath,
|
||||||
IntermediateDumpOutputPath: intermediateDumpFilePath,
|
IntermediateDumpOutputPath: intermediateDumpFilePath,
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
package build_flags
|
package build_flags
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
@@ -39,8 +38,6 @@ type DeclarationsModule struct {
|
|||||||
// aconfig files, relative to this Android.bp file
|
// aconfig files, relative to this Android.bp file
|
||||||
Srcs []string `android:"path"`
|
Srcs []string `android:"path"`
|
||||||
}
|
}
|
||||||
|
|
||||||
intermediatePath android.WritablePath
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func DeclarationsFactory() android.Module {
|
func DeclarationsFactory() android.Module {
|
||||||
@@ -53,18 +50,6 @@ func DeclarationsFactory() android.Module {
|
|||||||
return module
|
return module
|
||||||
}
|
}
|
||||||
|
|
||||||
func (module *DeclarationsModule) OutputFiles(tag string) (android.Paths, error) {
|
|
||||||
switch tag {
|
|
||||||
case "":
|
|
||||||
// The default output of this module is the intermediates format, which is
|
|
||||||
// not installable and in a private format that no other rules can handle
|
|
||||||
// correctly.
|
|
||||||
return []android.Path{module.intermediatePath}, nil
|
|
||||||
default:
|
|
||||||
return nil, fmt.Errorf("unsupported build_flags_declarations module reference tag %q", tag)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func joinAndPrefix(prefix string, values []string) string {
|
func joinAndPrefix(prefix string, values []string) string {
|
||||||
var sb strings.Builder
|
var sb strings.Builder
|
||||||
for _, v := range values {
|
for _, v := range values {
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
package codegen
|
package codegen
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"maps"
|
"maps"
|
||||||
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
@@ -115,19 +114,9 @@ func (adg *AconfigDeclarationsGroup) GenerateAndroidBuildActions(ctx android.Mod
|
|||||||
Srcjars: adg.javaSrcjars,
|
Srcjars: adg.javaSrcjars,
|
||||||
ModeInfos: adg.modeInfos,
|
ModeInfos: adg.modeInfos,
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
var _ android.OutputFileProducer = (*AconfigDeclarationsGroup)(nil)
|
ctx.SetOutputFiles(adg.intermediateCacheOutputPaths, "")
|
||||||
|
ctx.SetOutputFiles(adg.javaSrcjars, ".srcjars")
|
||||||
func (adg *AconfigDeclarationsGroup) OutputFiles(tag string) (android.Paths, error) {
|
|
||||||
switch tag {
|
|
||||||
case "":
|
|
||||||
return adg.intermediateCacheOutputPaths, nil
|
|
||||||
case ".srcjars":
|
|
||||||
return adg.javaSrcjars, nil
|
|
||||||
default:
|
|
||||||
return nil, fmt.Errorf("unsupported module reference tag %s", tag)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (adg *AconfigDeclarationsGroup) Srcjars() android.Paths {
|
func (adg *AconfigDeclarationsGroup) Srcjars() android.Paths {
|
||||||
|
Reference in New Issue
Block a user