summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
authorsatayev <satayev@google.com>2020-05-04 16:03:44 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-05-04 16:03:44 +0000
commit9d6ea77c52fda15bae9b0364de1d94ced900bd20 (patch)
treed4ae40c406f601ee9b02d99891d14bccd765dcb3 /java/java.go
parent817133ee2ad00c0979befc98b20e616b1f4f9b2e (diff)
parent8cf899afcc69643f63350bc9f9f92677bb8feabd (diff)
Merge "Ensure APEX's Java deps use stable SDKs."
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go
index 7f3ba981f..f339a1a7b 100644
--- a/java/java.go
+++ b/java/java.go
@@ -86,6 +86,14 @@ func RegisterJavaBuildComponents(ctx android.RegistrationContext) {
ctx.RegisterSingletonType("kythe_java_extract", kytheExtractJavaFactory)
}
+func (j *Module) CheckStableSdkVersion() error {
+ sdkVersion := j.sdkVersion()
+ if sdkVersion.stable() {
+ return nil
+ }
+ return fmt.Errorf("non stable SDK %v", sdkVersion)
+}
+
func (j *Module) checkSdkVersions(ctx android.ModuleContext) {
if j.SocSpecific() || j.DeviceSpecific() ||
(j.ProductSpecific() && ctx.Config().EnforceProductPartitionInterface()) {