Merge "Share EffectiveLicenseFiles for snapshot modules" am: b9386b703e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1751244 Change-Id: I87791ed0e59bca282a3327599403682fa1dd75ed
This commit is contained in:
@@ -483,6 +483,7 @@ type Module interface {
|
|||||||
InitRc() Paths
|
InitRc() Paths
|
||||||
VintfFragments() Paths
|
VintfFragments() Paths
|
||||||
NoticeFiles() Paths
|
NoticeFiles() Paths
|
||||||
|
EffectiveLicenseFiles() Paths
|
||||||
|
|
||||||
AddProperties(props ...interface{})
|
AddProperties(props ...interface{})
|
||||||
GetProperties() []interface{}
|
GetProperties() []interface{}
|
||||||
@@ -1515,6 +1516,10 @@ func (m *ModuleBase) ExportedToMake() bool {
|
|||||||
return m.commonProperties.NamespaceExportedToMake
|
return m.commonProperties.NamespaceExportedToMake
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *ModuleBase) EffectiveLicenseFiles() Paths {
|
||||||
|
return m.commonProperties.Effective_license_text
|
||||||
|
}
|
||||||
|
|
||||||
// computeInstallDeps finds the installed paths of all dependencies that have a dependency
|
// computeInstallDeps finds the installed paths of all dependencies that have a dependency
|
||||||
// tag that is annotated as needing installation via the IsInstallDepNeeded method.
|
// tag that is annotated as needing installation via the IsInstallDepNeeded method.
|
||||||
func (m *ModuleBase) computeInstallDeps(ctx ModuleContext) ([]*installPathsDepSet, []*packagingSpecsDepSet) {
|
func (m *ModuleBase) computeInstallDeps(ctx ModuleContext) ([]*installPathsDepSet, []*packagingSpecsDepSet) {
|
||||||
|
@@ -83,6 +83,9 @@ type Snapshottable interface {
|
|||||||
// SnapshotLibrary returns true if this module is a snapshot library.
|
// SnapshotLibrary returns true if this module is a snapshot library.
|
||||||
IsSnapshotLibrary() bool
|
IsSnapshotLibrary() bool
|
||||||
|
|
||||||
|
// EffectiveLicenseFiles returns the list of License files for this module.
|
||||||
|
EffectiveLicenseFiles() android.Paths
|
||||||
|
|
||||||
// SnapshotRuntimeLibs returns a list of libraries needed by this module at runtime but which aren't build dependencies.
|
// SnapshotRuntimeLibs returns a list of libraries needed by this module at runtime but which aren't build dependencies.
|
||||||
SnapshotRuntimeLibs() []string
|
SnapshotRuntimeLibs() []string
|
||||||
|
|
||||||
|
@@ -501,13 +501,13 @@ func (c *snapshotSingleton) GenerateBuildActions(ctx android.SingletonContext) {
|
|||||||
headers = append(headers, m.SnapshotHeaders()...)
|
headers = append(headers, m.SnapshotHeaders()...)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(m.NoticeFiles()) > 0 {
|
if len(m.EffectiveLicenseFiles()) > 0 {
|
||||||
noticeName := ctx.ModuleName(m) + ".txt"
|
noticeName := ctx.ModuleName(m) + ".txt"
|
||||||
noticeOut := filepath.Join(noticeDir, noticeName)
|
noticeOut := filepath.Join(noticeDir, noticeName)
|
||||||
// skip already copied notice file
|
// skip already copied notice file
|
||||||
if !installedNotices[noticeOut] {
|
if !installedNotices[noticeOut] {
|
||||||
installedNotices[noticeOut] = true
|
installedNotices[noticeOut] = true
|
||||||
snapshotOutputs = append(snapshotOutputs, combineNoticesRule(ctx, m.NoticeFiles(), noticeOut))
|
snapshotOutputs = append(snapshotOutputs, combineNoticesRule(ctx, m.EffectiveLicenseFiles(), noticeOut))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user