Skip to content

Commit 3dc3bf0

Browse files
committed
more env var renaming
1 parent 84a950c commit 3dc3bf0

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ buildscript {
1010
mavenCentral()
1111
}
1212
dependencies {
13-
classpath 'com.android.tools.build:gradle:4.1.1'
13+
classpath 'com.android.tools.build:gradle:4.1.3'
1414
classpath group: 'commons-io', name: 'commons-io', version: '2.8.0'
1515
classpath group: 'org.zeroturnaround', name: 'zt-zip', version: '1.14'
1616
}
@@ -38,7 +38,7 @@ allprojects {
3838
ext.processingVersion = versions.getProperty("org.processing")
3939
ext.toolingVersion = versions.getProperty("org.gradle%gradle-tooling-api")
4040
ext.slf4jVersion = versions.getProperty("org.slf4j")
41-
ext.gradlewVersion = versions.getProperty("gradlew")
41+
ext.gradlewVersion = versions.getProperty("gradle-wrapper")
4242
ext.toolsLibVersion = versions.getProperty("android-toolslib")
4343
ext.jdtVersion = versions.getProperty("org.eclipse.jdt")
4444

mode/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ task permissions(type:Exec) {
6161
task wrapper(type: Wrapper) {
6262
gradleVersion = "${gradlewVersion}" // version required for gradle wrapper
6363
}
64+
6465
wrapper.doLast {
6566
File wrapperFolder = file("mode/gradlew");
6667
wrapperFolder.mkdirs();
@@ -70,8 +71,7 @@ wrapper.doLast {
7071
FileUtils.copyDirectory(file("gradle"), file("../debug/gradle"))
7172
delete "gradle"
7273
ZipUtil.pack(file("mode/gradlew"), new File("mode/mode/gradlew.zip"));
73-
delete "mode/gradlew"
74-
74+
delete "mode/gradlew"
7575
}
7676

7777
clean.doFirst {

mode/src/processing/mode/android/AndroidBuild.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)