@@ -63,7 +63,7 @@ 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 GRADLE_VER ;
66+ static public String GRADLE_PLUGIN_VER ;
6767 static public String APPCOMPAT_VER ;
6868 static public String V4LEGACY_VER ;
6969 static public String PLAY_SERVICES_VER ;
@@ -293,7 +293,7 @@ private void createTopModule(String projectModules)
293293
294294 File buildTemplate = mode .getContentFile ("templates/" + TOP_GRADLE_BUILD_TEMPLATE );
295295 File buildlFile = new File (tmpFolder , "build.gradle" );
296- replaceMap .put ("@@gradle_version @@" , GRADLE_VER );
296+ replaceMap .put ("@@gradle_plugin_version @@" , GRADLE_PLUGIN_VER );
297297 AndroidUtil .createFileFromTemplate (buildTemplate , buildlFile , replaceMap );
298298
299299 File gradlePropsTemplate = mode .getContentFile ("templates/" + GRADLE_PROPERTIES_TEMPLATE );
@@ -913,11 +913,11 @@ static public void initVersions(File file) {
913913 // Versions strings of all dependencies are stored in a preferences file so they can be changed by the
914914 // user without having to rebuild/reinstall the mode.
915915
916- GRADLE_VER = Preferences .get ("android.gradle " );
917- String defGradleVersion = props .getProperty ("gradle" );
918- if (GRADLE_VER == null || PApplet .parseInt (GRADLE_VER ) != PApplet .parseInt (defGradleVersion )) {
919- GRADLE_VER = defGradleVersion ;
920- Preferences .set ("android.gradle " , GRADLE_VER );
916+ GRADLE_PLUGIN_VER = Preferences .get ("android.gradle_plugin " );
917+ String defGradlePluginVersion = props .getProperty ("android- gradle-plugin " );
918+ if (GRADLE_PLUGIN_VER == null || PApplet .parseInt (GRADLE_PLUGIN_VER ) != PApplet .parseInt (defGradlePluginVersion )) {
919+ GRADLE_PLUGIN_VER = defGradlePluginVersion ;
920+ Preferences .set ("android.gradle_plugin " , GRADLE_PLUGIN_VER );
921921 }
922922
923923 TARGET_SDK = Preferences .get ("android.sdk.target" );
0 commit comments