-
Notifications
You must be signed in to change notification settings - Fork 546
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed gradle build and lint for android (#451)
* fixed gradle build and lint for android
- Loading branch information
Showing
9 changed files
with
103 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/build | ||
libs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
//Abemart wroup and google webRtc are both deprecated on maven and other similar repositories | ||
//Hence created a local implementation of those libraries using pre-compiled .aar files in a shared modules called comlib | ||
plugins { | ||
id 'java-library' | ||
id 'de.undercouch.download' | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
// Define the libs directory | ||
project.ext.LIB_DIR = "${projectDir}/libs" | ||
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") | ||
|
||
// Task to check for AAR files | ||
task checkAars { | ||
dependsOn downloadAars // Ensure this matches the actual download task name | ||
|
||
doLast { | ||
if (!googleWebrtcFile.exists() || !wroupFile.exists()) { | ||
throw new GradleException("Required AAR files are missing. Please run the download task.") | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
if (googleWebrtcFile.exists()) { | ||
api files(googleWebrtcFile) | ||
} | ||
|
||
if (wroupFile.exists()) { | ||
api files(wroupFile) | ||
} | ||
} | ||
|
||
// Ensure that checkAars runs before any Java compile tasks | ||
tasks.withType(JavaCompile) { | ||
dependsOn checkAars | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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', | ||
]) | ||
dest project.ext.LIB_DIR | ||
onlyIfModified true | ||
overwrite false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Mon Feb 13 15:23:50 CET 2023 | ||
#Thu Sep 19 11:12:47 IST 2024 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip | ||
distributionPath=wrapper/dists | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
include ':robot', ':controller' | ||
include ':comlib' |