diff --git a/android/comlib/build.gradle b/android/comlib/build.gradle index 0452a758f..d28a996d4 100644 --- a/android/comlib/build.gradle +++ b/android/comlib/build.gradle @@ -16,13 +16,14 @@ apply from: 'download.gradle' def googleWebrtcFile = file("${project.ext.LIB_DIR}/google-webrtc-1.0.32006.aar") def wroupFile = file("${project.ext.LIB_DIR}/Wroup-master-release.aar") +def usbserialFile = file("${project.ext.LIB_DIR}/usbserial-6.1.0-release.aar") // Task to check for AAR files task checkAars { dependsOn downloadAars // Ensure this matches the actual download task name doLast { - if (!googleWebrtcFile.exists() || !wroupFile.exists()) { + if (!googleWebrtcFile.exists() || !wroupFile.exists() || !usbserialFile.exists()) { throw new GradleException("Required AAR files are missing. Please run the download task.") } } @@ -36,6 +37,10 @@ dependencies { if (wroupFile.exists()) { api files(wroupFile) } + + if (usbserialFile.exists()) { + api files(usbserialFile) + } } // Ensure that checkAars runs before any Java compile tasks diff --git a/android/comlib/download.gradle b/android/comlib/download.gradle index 5fa9638af..bdf84e2ec 100644 --- a/android/comlib/download.gradle +++ b/android/comlib/download.gradle @@ -2,8 +2,9 @@ task downloadAars(type: Download) { src([ 'https://storage.googleapis.com/openbot_aar/Wroup-master-release.aar', 'https://storage.googleapis.com/openbot_aar/google-webrtc-1.0.32006.aar', + 'https://storage.googleapis.com/openbot_aar/usbserial-6.1.0-release.aar', ]) dest project.ext.LIB_DIR onlyIfModified true overwrite false -} \ No newline at end of file +} diff --git a/android/robot/build.gradle b/android/robot/build.gradle index 4d68b5338..487229887 100755 --- a/android/robot/build.gradle +++ b/android/robot/build.gradle @@ -1,6 +1,7 @@ plugins { id 'io.github.reactivecircus.app-versioning' version "1.1.2" id 'com.google.gms.google-services' + id 'com.android.application' } appVersioning { @@ -84,7 +85,6 @@ dependencies { implementation "com.google.android.gms:play-services-location:$location_version" implementation "com.google.android.gms:play-services-nearby:$nearby_version" - implementation 'com.github.felHR85:UsbSerial:6.1.0' implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0' implementation 'org.zeroturnaround:zt-zip:1.14' implementation 'com.loopj.android:android-async-http:1.4.9'