diff options
| author | 2019-06-05 17:17:32 +0000 | |
|---|---|---|
| committer | 2019-06-05 17:17:32 +0000 | |
| commit | b4c35f33786175f19bcb69ee069ac64b7c699717 (patch) | |
| tree | 3a166a941b06ab02ed398ef0646110d337cb6330 /java/java.go | |
| parent | 933d2a8e636d6f126619be3a70e292c74777f248 (diff) | |
| parent | 41955e8895fe33022a6759b9739a2368b206c392 (diff) | |
Merge "Support tagged module references"
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 15 | 
1 files changed, 8 insertions, 7 deletions
| diff --git a/java/java.go b/java/java.go index 31c6afec8..bfbd98c8f 100644 --- a/java/java.go +++ b/java/java.go @@ -351,15 +351,20 @@ type Module struct {  	dexpreopter  } -func (j *Module) Srcs() android.Paths { -	return append(android.Paths{j.outputFile}, j.extraOutputFiles...) +func (j *Module) OutputFiles(tag string) (android.Paths, error) { +	switch tag { +	case "": +		return append(android.Paths{j.outputFile}, j.extraOutputFiles...), nil +	default: +		return nil, fmt.Errorf("unsupported module reference tag %q", tag) +	}  }  func (j *Module) DexJarFile() android.Path {  	return j.dexJarFile  } -var _ android.SourceFileProducer = (*Module)(nil) +var _ android.OutputFileProducer = (*Module)(nil)  type Dependency interface {  	HeaderJars() android.Paths @@ -813,8 +818,6 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps {  			}  		default:  			switch tag { -			case android.DefaultsDepTag, android.SourceDepTag: -				// Nothing to do  			case systemModulesTag:  				if deps.systemModules != nil {  					panic("Found two system module dependencies") @@ -824,8 +827,6 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps {  					panic("Missing directory for system module dependency")  				}  				deps.systemModules = sm.outputFile -			default: -				ctx.ModuleErrorf("depends on non-java module %q", otherName)  			}  		}  	}) |