From 479884c93d676598a3ab28bd820fd8be11ea7a64 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 10 Jul 2018 13:39:30 -0700 Subject: [PATCH] Add min_sdk_version to android_library_import modules pom2bp now inserts a min_sdk_version into android_library_import modules. Bug: 110848854 Test: m checkbuild Change-Id: I1396eabd8bfa02755c829ddac03022ffb7a5673e --- java/aar.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java/aar.go b/java/aar.go index e054d247f..a4069bb8d 100644 --- a/java/aar.go +++ b/java/aar.go @@ -336,7 +336,8 @@ func AndroidLibraryFactory() android.Module { type AARImportProperties struct { Aars []string - Sdk_version *string + Sdk_version *string + Min_sdk_version *string Static_libs []string Libs []string @@ -362,6 +363,9 @@ func (a *AARImport) sdkVersion() string { } func (a *AARImport) minSdkVersion() string { + if a.properties.Min_sdk_version != nil { + return *a.properties.Min_sdk_version + } return a.sdkVersion() }