~singpolyma/cheogram-android

3a38c76eb2015677691bbb3ad30810a251caa394 — Stephen Paul Weber 1 year, 3 months ago ed2f7f8
Get libwebrtc using gradle
2 files changed, 15 insertions(+), 6 deletions(-)

M .builds/debian-stable.yml
M build.gradle
M .builds/debian-stable.yml => .builds/debian-stable.yml +0 -5
@@ 22,11 22,6 @@ tasks:
    echo y | android/cmdline-tools/tools/bin/sdkmanager "build-tools;29.0.2"
    touch ~/.android/repositories.cfg
    yes | android/cmdline-tools/tools/bin/sdkmanager --licenses
- libwebrtc: |
    cd cheogram-android
    mkdir libs
    cd libs
    wget -qO libwebrtc.aar https://cloudflare-ipfs.com/ipfs/QmeqMiLxHi8AAjXobxr3QTfa1bSSLyAu86YviAqQnjxCjM/libwebrtc.aar
- build: |
    cd cheogram-android
    ./gradlew assembleCheogramFreeSystemDebug

M build.gradle => build.gradle +15 -1
@@ 18,6 18,20 @@ repositories {
    jcenter()
}

// https://stackoverflow.com/a/38105112/8611
def urlFile = { url, name ->
    File file = new File("$buildDir/download/${name}")
    file.parentFile.mkdirs()
    if (!file.exists()) {
        new URL(url).withInputStream { downloadStream ->
            file.withOutputStream { fileOut ->
                fileOut << downloadStream
            }
        }
    }
    files(file.absolutePath)
}

configurations {
    playstoreImplementation
    compatImplementation


@@ 77,7 91,7 @@ dependencies {

    implementation 'com.google.guava:guava:30.1.1-android'
    quicksyImplementation 'io.michaelrocks:libphonenumber-android:8.12.36'
    implementation fileTree(include: ['libwebrtc.aar'], dir: 'libs')
    implementation urlFile('https://cloudflare-ipfs.com/ipfs/QmeqMiLxHi8AAjXobxr3QTfa1bSSLyAu86YviAqQnjxCjM/libwebrtc.aar', 'libwebrtc.aar')
}

ext {