summaryrefslogtreecommitdiff
path: root/java/sdk.go
diff options
context:
space:
mode:
author Dan Willemsen <dwillemsen@google.com> 2020-05-28 15:28:00 -0700
committer Dan Willemsen <dwillemsen@google.com> 2020-08-11 01:11:44 +0000
commit9f43597ff7349c4facd9e338e5b4b277e625e518 (patch)
tree563333b446401903f78258ab679ab6e344868b12 /java/sdk.go
parenta57e56a684cb0d250a4f9060c59f7cc5ae607ec3 (diff)
Remove obsolete PDK build functionality
This hasn't worked for a couple years, and continues to bitrot. Just remove it. Adds a bpfix rule so that we can eventually remove the product_variables.pdk definition, which is now always a no-op. Test: treehugger Change-Id: I830b54d419b59f6db1d4617b45e61a78234f57a7 Merged-In: I830b54d419b59f6db1d4617b45e61a78234f57a7
Diffstat (limited to 'java/sdk.go')
-rw-r--r--java/sdk.go30
1 files changed, 2 insertions, 28 deletions
diff --git a/java/sdk.go b/java/sdk.go
index fa4c05364..b44cd8e1a 100644
--- a/java/sdk.go
+++ b/java/sdk.go
@@ -191,23 +191,6 @@ func (s sdkSpec) prebuiltSdkAvailableForUnbundledBuild() bool {
return s.kind != sdkPrivate && s.kind != sdkNone && s.kind != sdkCorePlatform
}
-// forPdkBuild converts this sdkSpec into another sdkSpec that is for the PDK builds.
-func (s sdkSpec) forPdkBuild(ctx android.EarlyModuleContext) sdkSpec {
- // For PDK builds, use the latest SDK version instead of "current" or ""
- if s.kind == sdkPrivate || s.kind == sdkPublic {
- kind := s.kind
- if kind == sdkPrivate {
- // We don't have prebuilt SDK for private APIs, so use the public SDK
- // instead. This looks odd, but that's how it has been done.
- // TODO(b/148271073): investigate the need for this.
- kind = sdkPublic
- }
- version := sdkVersion(LatestSdkVersionInt(ctx))
- return sdkSpec{kind, version, s.raw}
- }
- return s
-}
-
// usePrebuilt determines whether prebuilt SDK should be used for this sdkSpec with the given context.
func (s sdkSpec) usePrebuilt(ctx android.EarlyModuleContext) bool {
if s.version.isCurrent() {
@@ -233,9 +216,6 @@ func (s sdkSpec) effectiveVersion(ctx android.EarlyModuleContext) (sdkVersion, e
if !s.valid() {
return s.version, fmt.Errorf("invalid sdk version %q", s.raw)
}
- if ctx.Config().IsPdkBuild() {
- s = s.forPdkBuild(ctx)
- }
if s.version.isNumbered() {
return s.version, nil
}
@@ -350,9 +330,6 @@ func decodeSdkDep(ctx android.EarlyModuleContext, sdkContext sdkContext) sdkDep
return sdkDep{}
}
- if ctx.Config().IsPdkBuild() {
- sdkVersion = sdkVersion.forPdkBuild(ctx)
- }
if !sdkVersion.validateSystemSdk(ctx) {
return sdkDep{}
}
@@ -511,7 +488,7 @@ func sdkSingletonFactory() android.Singleton {
type sdkSingleton struct{}
func (sdkSingleton) GenerateBuildActions(ctx android.SingletonContext) {
- if ctx.Config().AlwaysUsePrebuiltSdks() || ctx.Config().IsPdkBuild() {
+ if ctx.Config().AlwaysUsePrebuiltSdks() {
return
}
@@ -631,9 +608,6 @@ func createAPIFingerprint(ctx android.SingletonContext) {
if ctx.Config().PlatformSdkCodename() == "REL" {
cmd.Text("echo REL >").Output(out)
- } else if ctx.Config().IsPdkBuild() {
- // TODO: get this from the PDK artifacts?
- cmd.Text("echo PDK >").Output(out)
} else if !ctx.Config().AlwaysUsePrebuiltSdks() {
in, err := ctx.GlobWithDeps("frameworks/base/api/*current.txt", nil)
if err != nil {
@@ -663,7 +637,7 @@ func ApiFingerprintPath(ctx android.PathContext) android.OutputPath {
}
func sdkMakeVars(ctx android.MakeVarsContext) {
- if ctx.Config().AlwaysUsePrebuiltSdks() || ctx.Config().IsPdkBuild() {
+ if ctx.Config().AlwaysUsePrebuiltSdks() {
return
}