diff options
author | Tim Krüger <t@timkrueger.me> | 2022-01-20 20:05:24 +0300 |
---|---|---|
committer | Tim Krüger <t@timkrueger.me> | 2022-02-23 13:34:30 +0300 |
commit | bad5b5f9bccae7f88eb533cf900094956487849f (patch) | |
tree | d11be888d1d6f11512d009587d51cc94da6808b1 /app/build.gradle | |
parent | 3af4f368cb25baacab462fe4d0260f0bd7f8d87f (diff) |
Update WebRTC library
The updated libwebrtc will be load from the talk-clients-webrtc repository [1]
and not from a dependency repository. The 'lint' task must now depend on the
'perBuild' task to make sure that the WebRTC library is downloaded from the
configured URL.
To get the new version to work a change is needed because of this announcement:
> Google is planning to transition Chrome’s WebRTC implementation from the
> current SDP format (called “Plan B”) to a standards conformant format
> (“Unified Plan”, draft-ietf-rtcweb-jsep) over the next couple of quarters.
>
> - [2]
Currently we are in phase 4 of the transition [3]. So actually 'Plan B'
must be used to avoid bigger changes to our code base at this time. But
'Plan B' is depracted and will be removed in phase 5 of the transition
[4].
Resolves: #1773
See:
- [1] https://github.com/nextcloud-releases/talk-clients-webrtc
- [2] https://webrtc.org/getting-started/unified-plan-transition-guide
- [3] https://webrtc.org/getting-started/unified-plan-transition-guide#phase_4_make_%E2%80%9Cplan_b%E2%80%9D_throw
- [4] https://webrtc.org/getting-started/unified-plan-transition-guide#phase_5_remove_%E2%80%9Cplan_b%E2%80%9D
Signed-off-by: Tim Krüger <t@timkrueger.me>
Diffstat (limited to 'app/build.gradle')
-rw-r--r-- | app/build.gradle | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/app/build.gradle b/app/build.gradle index 661bf3cce..6b894348c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,9 +4,11 @@ * @author Mario Danic * @author Andy Scherzinger * @author Marcel Hibbe + * @author Tim Krüger * Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de> * Copyright (C) 2017-2019 Mario Danic <mario@lovelyhq.com> * Copyright (C) 2021 Marcel Hibbe <dev@mhibbe.de> + * Copyright (C) 2022 Tim Krüger <t@timkrueger.me> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,6 +36,20 @@ configurations { ktlint } +def urlFile = { url, fileName -> + File file = new File("$buildDir/download/${fileName}") + file.parentFile.mkdirs() + if (!file.exists()) { + new URL(url).withInputStream { downloadStream -> + file.withOutputStream { fileOut -> + fileOut << downloadStream + } + } + } + files(file.absolutePath) +} + + android { compileSdkVersion 30 buildToolsVersion '30.0.3' @@ -134,6 +150,7 @@ android { } check.dependsOn 'spotbugsGplayDebugReport', 'lint', 'ktlint', 'detekt' + lint.dependsOn 'preBuild' compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -240,7 +257,8 @@ dependencies { kapt "com.jakewharton:butterknife-compiler:${butterknifeVersion}" implementation 'eu.davidea:flexible-adapter:5.1.0' implementation 'eu.davidea:flexible-adapter-ui:1.0.0' - implementation 'org.webrtc:google-webrtc:1.0.32006' + implementation urlFile('https://github.com/nextcloud-releases/talk-clients-webrtc/releases/download/96.4664.0-RC1/libwebrtc-96.4664.0.aar', + 'libwebrtc-96.4664.0.aar') implementation 'com.yarolegovich:lovely-dialog:1.1.1' implementation 'com.yarolegovich:mp:1.1.6' implementation 'me.zhanghai.android.effortlesspermissions:library:1.1.0' |