Skip to content

Commit 196ebb2

Browse files
authored
Fix USB Serial Depreciation error (#462)
* use aar package for USB serial
1 parent 1417476 commit 196ebb2

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

android/comlib/build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ apply from: 'download.gradle'
1616

1717
def googleWebrtcFile = file("${project.ext.LIB_DIR}/google-webrtc-1.0.32006.aar")
1818
def wroupFile = file("${project.ext.LIB_DIR}/Wroup-master-release.aar")
19+
def usbserialFile = file("${project.ext.LIB_DIR}/usbserial-6.1.0-release.aar")
1920

2021
// Task to check for AAR files
2122
task checkAars {
2223
dependsOn downloadAars // Ensure this matches the actual download task name
2324

2425
doLast {
25-
if (!googleWebrtcFile.exists() || !wroupFile.exists()) {
26+
if (!googleWebrtcFile.exists() || !wroupFile.exists() || !usbserialFile.exists()) {
2627
throw new GradleException("Required AAR files are missing. Please run the download task.")
2728
}
2829
}
@@ -36,6 +37,10 @@ dependencies {
3637
if (wroupFile.exists()) {
3738
api files(wroupFile)
3839
}
40+
41+
if (usbserialFile.exists()) {
42+
api files(usbserialFile)
43+
}
3944
}
4045

4146
// Ensure that checkAars runs before any Java compile tasks

android/comlib/download.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ task downloadAars(type: Download) {
22
src([
33
'https://storage.googleapis.com/openbot_aar/Wroup-master-release.aar',
44
'https://storage.googleapis.com/openbot_aar/google-webrtc-1.0.32006.aar',
5+
'https://storage.googleapis.com/openbot_aar/usbserial-6.1.0-release.aar',
56
])
67
dest project.ext.LIB_DIR
78
onlyIfModified true
89
overwrite false
9-
}
10+
}

android/robot/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id 'io.github.reactivecircus.app-versioning' version "1.1.2"
33
id 'com.google.gms.google-services'
4+
id 'com.android.application'
45
}
56

67
appVersioning {
@@ -84,7 +85,6 @@ dependencies {
8485

8586
implementation "com.google.android.gms:play-services-location:$location_version"
8687
implementation "com.google.android.gms:play-services-nearby:$nearby_version"
87-
implementation 'com.github.felHR85:UsbSerial:6.1.0'
8888
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
8989
implementation 'org.zeroturnaround:zt-zip:1.14'
9090
implementation 'com.loopj.android:android-async-http:1.4.9'

0 commit comments

Comments
 (0)