Skip to content

Commit a1f8edb

Browse files
committed
udpate deps in build and template files
1 parent 79a75b0 commit a1f8edb

18 files changed

+53
-72
lines changed

build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ buildscript {
1212
jcenter()
1313
}
1414
dependencies {
15-
classpath 'com.android.tools.build:gradle:3.5.1'
16-
classpath group: 'commons-io', name: 'commons-io', version: '2.6'
17-
classpath group: 'org.zeroturnaround', name: 'zt-zip', version: '1.13'
15+
classpath 'com.android.tools.build:gradle:4.1.1'
16+
classpath group: 'commons-io', name: 'commons-io', version: '2.8.0'
17+
classpath group: 'org.zeroturnaround', name: 'zt-zip', version: '1.14'
1818
}
1919
}
2020

@@ -25,7 +25,8 @@ allprojects {
2525
Properties versions = new Properties()
2626
versions.load(project.rootProject.file("mode/version.properties").newDataInputStream())
2727
ext.targetSdkVersion = versions.getProperty("android-platform")
28-
ext.supportLibsVersion = versions.getProperty("com.android.support%support-v4")
28+
ext.appcompatVersion = versions.getProperty("androidx.appcompat%appcompat")
29+
ext.v4legacyVersion = versions.getProperty("androidx.legacy%legacy-support-v4")
2930
ext.wearVersion = versions.getProperty("com.google.android.support%wearable")
3031
ext.gvrVersion = versions.getProperty("com.google.vr")
3132
ext.garVersion = versions.getProperty("com.google.ar")

core/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ apply plugin: 'aar'
77
dependencies {
88
implementation name: "android"
99

10-
implementationAar 'androidx.legacy:legacy-support-v4:1.0.0'
10+
implementationAar "androidx.legacy:legacy-support-v4:${v4legacyVersion}"
1111
implementationAar "com.google.android.support:wearable:${wearVersion}"
1212
}
1313

@@ -27,9 +27,9 @@ task createPom {
2727
}
2828
dependencies {
2929
dependency {
30-
groupId "com.android.support"
31-
artifactId "support-v4"
32-
version "${supportLibsVersion}"
30+
groupId "androidx.legacy"
31+
artifactId "legacy-support-v4"
32+
version "${v4legacyVersion}"
3333
scope "implementation"
3434
}
3535
dependency {

debug/apps/arscene/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,5 @@ dependencies {
2929
implementation project(':libs:processing-core')
3030
implementation project(':libs:processing-ar')
3131
implementation 'androidx.appcompat:appcompat:1.2.0'
32-
implementation 'com.google.android.material:material:1.2.1'
3332
implementation 'com.google.ar:core:1.22.0'
3433
}

debug/apps/vrcube/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,5 @@ dependencies {
2929
implementation project(':libs:processing-core')
3030
implementation project(':libs:processing-vr')
3131
implementation 'androidx.appcompat:appcompat:1.2.0'
32-
implementation 'com.google.android.material:material:1.2.1'
3332
implementation 'com.google.vr:sdk-base:1.180.0'
3433
}

debug/apps/wallpaper/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,5 @@ dependencies {
2727
implementation fileTree(include: ['*.jar'], dir: 'libs')
2828
testImplementation 'junit:junit:4.13'
2929
implementation project(':libs:processing-core')
30-
implementation 'androidx.annotation:annotation:1.1.0'
3130
implementation 'androidx.appcompat:appcompat:1.2.0'
3231
}

debug/apps/watchface/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ dependencies {
2828
implementation fileTree(include: ['*.jar'], dir: 'libs')
2929
testImplementation 'junit:junit:4.13'
3030
implementation project(':libs:processing-core')
31-
implementation 'androidx.palette:palette:1.0.0'
32-
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
33-
implementation 'androidx.percentlayout:percentlayout:1.0.0'
34-
implementation 'androidx.recyclerview:recyclerview:1.1.0'
3531
implementation 'com.google.android.gms:play-services-wearable:17.0.0'
3632
implementation 'com.google.android.support:wearable:2.8.1'
3733
compileOnly 'com.google.android.wearable:wearable:2.8.1'

mode/mode.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ url = http://android.processing.org
44
sentence = Create projects with Processing for Android devices
55
paragraph = This version of the Android Mode is for Processing 3.1+
66
imports=processing.mode.java.JavaMode
7-
version = 277
8-
prettyVersion = 4.1.1
7+
version = 278
8+
prettyVersion = 4.2.0
99
minRevision = 249
1010
maxRevision = 1269

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

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

mode/src/processing/mode/android/AndroidSDK.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public AndroidSDK(File folder) throws BadSDKException, IOException {
9999
throw new BadSDKException(AndroidMode.getTextString("android_sdk.error.missing_sdk_folder", folder));
100100
}
101101

102-
cmdlineTools = new File(folder, "cmdline-tools");
102+
cmdlineTools = new File(folder, "cmdline-tools/latest");
103103
if (!cmdlineTools.exists()) {
104104
throw new BadSDKException(AndroidMode.getTextString("android_sdk.error.missing_tools_folder", folder));
105105
}
@@ -302,6 +302,7 @@ public void run() {
302302
}, "AndroidSDK: reading licenses").start();
303303
Thread.sleep(1000);
304304
os.write(response.getBytes());
305+
os.flush();
305306
os.close();
306307
} catch (IOException e) {
307308
e.printStackTrace();

mode/templates/ARBuild.gradle.tmpl

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@ android {
3030

3131
dependencies {
3232
implementation fileTree(include: ['*.jar'], dir: 'libs')
33+
implementation 'androidx.appcompat:appcompat:@@appcompat_version@@'
3334
implementation 'com.google.ar:core:@@gar_version@@'
34-
implementation 'de.javagl:obj:0.2.1'
35-
implementation 'com.android.support:appcompat-v7:@@support_version@@'
36-
implementation 'com.android.support:design:@@support_version@@'
3735
implementation files('libs/processing-core.jar')
38-
implementation files('libs/ar.jar')
39-
testImplementation 'junit:junit:4.12'
40-
androidTestImplementation 'com.android.support.test:runner:1.0.1'
41-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
36+
implementation files('libs/ar.jar')
37+
androidTestImplementation 'com.android.support.test:runner:1.3.0'
38+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
39+
testImplementation 'junit:junit:4.13'
4240
}

0 commit comments

Comments
 (0)