Merge "Changes tree built Robolectric name"

This commit is contained in:
Treehugger Robot
2021-09-23 21:04:51 +00:00
committed by Gerrit Code Review

View File

@@ -417,10 +417,10 @@ func (r *robolectricRuntimes) GenerateAndroidBuildActions(ctx android.ModuleCont
} }
runtimeFromSourceJar := android.OutputFileForModule(ctx, runtimeFromSourceModule, "") runtimeFromSourceJar := android.OutputFileForModule(ctx, runtimeFromSourceModule, "")
// TODO(murj) Update this to ctx.Config().PlatformSdkCodename() once the platform // "TREE" name is essential here because it hooks into the "TREE" name in
// classes like android.os.Build are updated to S. // Robolectric's SdkConfig.java that will always correspond to the NEWEST_SDK
runtimeName := fmt.Sprintf("android-all-%s-robolectric-r0.jar", // in Robolectric configs.
"R") runtimeName := "android-all-current-robolectric-r0.jar"
installedRuntime := ctx.InstallFile(androidAllDir, runtimeName, runtimeFromSourceJar) installedRuntime := ctx.InstallFile(androidAllDir, runtimeName, runtimeFromSourceJar)
r.runtimes = append(r.runtimes, installedRuntime) r.runtimes = append(r.runtimes, installedRuntime)
} }