Make RuleBuilder methods take Paths

There are no more Make paths being used in Soong now that
dexpreopting and hiddenapi are in Soong. Use the Path types
in the inputs to RuleBuilder, and fix all users of RuleBuilder.

This reapplies I886f803d9a3419a43b2cae412537645f94c5dfbf with
fixes to disable preopt for Soong-only builds when the global
dexpreopt.config doesn't exist.

Test: all soong tests
Test: m checkbuild
Change-Id: I4dae9ecd5de22f062f9478ec8f0747f099cf8190
This commit is contained in:
Colin Cross
2019-02-15 10:39:37 -08:00
parent 501d7e594a
commit 69f59a3327
13 changed files with 645 additions and 477 deletions

View File

@@ -15,8 +15,6 @@
package java
import (
"path/filepath"
"github.com/google/blueprint"
"android/soong/android"
@@ -175,14 +173,3 @@ func hiddenAPIEncodeDex(ctx android.ModuleContext, output android.WritablePath,
TransformZipAlign(ctx, output, tmpOutput)
}
}
type hiddenAPIPath struct {
path string
}
var _ android.Path = (*hiddenAPIPath)(nil)
func (p *hiddenAPIPath) String() string { return p.path }
func (p *hiddenAPIPath) Ext() string { return filepath.Ext(p.path) }
func (p *hiddenAPIPath) Base() string { return filepath.Base(p.path) }
func (p *hiddenAPIPath) Rel() string { return p.path }