@@ -63,7 +63,8 @@ class AndroidBuild extends JavaBuild {
6363 // Versions of all required dependencies
6464 static public String TARGET_SDK ;
6565 static public String TARGET_PLATFORM ;
66- static public String SUPPORT_VER ;
66+ static public String APPCOMPAT_VER ;
67+ static public String V4LEGACY_VER ;
6768 static public String PLAY_SERVICES_VER ;
6869 static public String WEAR_VER ;
6970 static public String GVR_VER ;
@@ -345,7 +346,8 @@ private void createAppModule(String moduleName)
345346 replaceMap .put ("@@package_name@@" , getPackageName ());
346347 replaceMap .put ("@@min_sdk@@" , minSdk );
347348 replaceMap .put ("@@target_sdk@@" , TARGET_SDK );
348- replaceMap .put ("@@support_version@@" , SUPPORT_VER );
349+ replaceMap .put ("@@appcompat_version@@" , APPCOMPAT_VER );
350+ replaceMap .put ("@@v4legacy_version@@" , V4LEGACY_VER );
349351 replaceMap .put ("@@play_services_version@@" , PLAY_SERVICES_VER );
350352 replaceMap .put ("@@wear_version@@" , WEAR_VER );
351353 replaceMap .put ("@@gvr_version@@" , GVR_VER );
@@ -910,12 +912,19 @@ static public void initVersions(File file) {
910912 }
911913 TARGET_PLATFORM = "android-" + TARGET_SDK ;
912914
913- SUPPORT_VER = Preferences .get ("android.sdk.support" );
914- String defSupportVer = props .getProperty ("com.android.support%support-v4" );
915- if (SUPPORT_VER == null || !versionCheck (SUPPORT_VER , defSupportVer )) {
916- SUPPORT_VER = defSupportVer ;
917- Preferences .set ("android.sdk.support" , SUPPORT_VER );
918- }
915+ APPCOMPAT_VER = Preferences .get ("android.sdk.appcompat" );
916+ String defAppCompatVer = props .getProperty ("androidx.appcompat%appcompat" );
917+ if (APPCOMPAT_VER == null || !versionCheck (APPCOMPAT_VER , defAppCompatVer )) {
918+ APPCOMPAT_VER = defAppCompatVer ;
919+ Preferences .set ("android.sdk.appcompat" , APPCOMPAT_VER );
920+ }
921+
922+ V4LEGACY_VER = Preferences .get ("android.sdk.v4legacy" );
923+ String defV4LegacyVer = props .getProperty ("androidx.legacy%legacy-support-v4" );
924+ if (V4LEGACY_VER == null || !versionCheck (V4LEGACY_VER , defV4LegacyVer )) {
925+ V4LEGACY_VER = defV4LegacyVer ;
926+ Preferences .set ("android.sdk.v4legacy" , V4LEGACY_VER );
927+ }
919928
920929 PLAY_SERVICES_VER = Preferences .get ("android.sdk.play_services" );
921930 String defPlayServicesVer = props .getProperty ("com.google.android.gms%play-services-wearable" );
0 commit comments