From a2ee7f2cf4de917a554e67c839ba5098ec4a1b8c Mon Sep 17 00:00:00 2001 From: Yoan Pintas Date: Wed, 4 Oct 2023 07:47:38 +0000 Subject: [PATCH] Manage jitsi libs (#976) --- changelog.d/976.improvements | 1 + library/attachment-viewer/build.gradle | 2 +- library/ui-styles/build.gradle | 2 +- towncrier.toml | 2 +- vector-app/build.gradle | 148 ++++++++++++------------- vector-config/build.gradle | 2 +- vector/build.gradle | 12 +- 7 files changed, 84 insertions(+), 85 deletions(-) create mode 100644 changelog.d/976.improvements diff --git a/changelog.d/976.improvements b/changelog.d/976.improvements new file mode 100644 index 0000000000..648bccc72c --- /dev/null +++ b/changelog.d/976.improvements @@ -0,0 +1 @@ +Remove Jitsi dependency diff --git a/library/attachment-viewer/build.gradle b/library/attachment-viewer/build.gradle index 9a9cd60c8a..c089ccfc8e 100644 --- a/library/attachment-viewer/build.gradle +++ b/library/attachment-viewer/build.gradle @@ -36,7 +36,7 @@ android { // Tchap: Add tchap flavors // The 'target' dimension permits to specify which platform are used - flavorDimensions "target" + flavorDimensions = ["target"] productFlavors { devTchap { dimension "target"} diff --git a/library/ui-styles/build.gradle b/library/ui-styles/build.gradle index bf0c855ce9..099954a5dc 100644 --- a/library/ui-styles/build.gradle +++ b/library/ui-styles/build.gradle @@ -41,7 +41,7 @@ android { // Tchap: Add tchap flavors // The 'target' dimension permits to specify which platform are used - flavorDimensions "target" + flavorDimensions = ["target"] productFlavors { devTchap { dimension "target" } diff --git a/towncrier.toml b/towncrier.toml index d93c1af179..1c6ce194b6 100644 --- a/towncrier.toml +++ b/towncrier.toml @@ -1,5 +1,5 @@ [tool.towncrier] - version = "2.9.3" + version = "2.9.4" directory = "changelog.d" filename = "TCHAP_CHANGES.md" name = "Changes in Tchap" diff --git a/vector-app/build.gradle b/vector-app/build.gradle index c608ad17f5..0c1d2883ee 100644 --- a/vector-app/build.gradle +++ b/vector-app/build.gradle @@ -37,7 +37,7 @@ ext.versionMinor = 9 // Note: even values are reserved for regular release, odd values for hotfix release. // When creating a hotfix, you should decrease the value, since the current value // is the value for the next regular release. -ext.versionPatch = 3 +ext.versionPatch = 4 static def getGitTimestamp() { def cmd = 'git show -s --format=%ct' @@ -329,7 +329,7 @@ android { // The 'target' dimension permits to specify which platform are used // The 'voip' flavor dimension permits to include/exclude jitsi at compilation time // The 'pinning' flavor dimension permits to enable/disable certificate pinning with fingerprint check - flavorDimensions "store", "target", "crypto", "voip", "pinning" + flavorDimensions = ["store", "target", "crypto", "voip", "pinning"] productFlavors { gplay { @@ -457,40 +457,40 @@ android { // Tchap: Use custom configuration for Flipper library configurations { - fdroidBtchapWithvoipWithoutpinningDebugImplementation - fdroidDevTchapWithvoipWithoutpinningDebugImplementation - fdroidTchapWithvoipWithoutpinningDebugImplementation + fdroidBtchapRustCryptoWithvoipWithoutpinningDebugImplementation + fdroidDevTchapRustCryptoWithvoipWithoutpinningDebugImplementation + fdroidTchapRustCryptoWithvoipWithoutpinningDebugImplementation - gplayBtchapWithvoipWithoutpinningDebugImplementation - gplayDevTchapWithvoipWithoutpinningDebugImplementation - gplayTchapWithvoipWithoutpinningDebugImplementation + gplayBtchapRustCryptoWithvoipWithoutpinningDebugImplementation + gplayDevTchapRustCryptoWithvoipWithoutpinningDebugImplementation + gplayTchapRustCryptoWithvoipWithoutpinningDebugImplementation - fdroidBtchapWithvoipWithpinningDebugImplementation - fdroidDevTchapWithvoipWithpinningDebugImplementation - fdroidTchapWithvoipWithpinningDebugImplementation + fdroidBtchapRustCryptoWithvoipWithpinningDebugImplementation + fdroidDevTchapRustCryptoWithvoipWithpinningDebugImplementation + fdroidTchapRustCryptoWithvoipWithpinningDebugImplementation - gplayBtchapWithvoipWithpinningDebugImplementation - gplayDevTchapWithvoipWithpinningDebugImplementation - gplayTchapWithvoipWithpinningDebugImplementation + gplayBtchapRustCryptoWithvoipWithpinningDebugImplementation + gplayDevTchapRustCryptoWithvoipWithpinningDebugImplementation + gplayTchapRustCryptoWithvoipWithpinningDebugImplementation - fdroidBtchapWithoutvoipWithpinningDebugImplementation - fdroidDevTchapWithoutvoipWithpinningDebugImplementation - fdroidTchapWithoutvoipWithpinningDebugImplementation + fdroidBtchapRustCryptoWithoutvoipWithpinningDebugImplementation + fdroidDevTchapRustCryptoWithoutvoipWithpinningDebugImplementation + fdroidTchapRustCryptoWithoutvoipWithpinningDebugImplementation - gplayBtchapWithoutvoipWithpinningDebugImplementation - gplayDevTchapWithoutvoipWithpinningDebugImplementation - gplayTchapWithoutvoipWithpinningDebugImplementation + gplayBtchapRustCryptoWithoutvoipWithpinningDebugImplementation + gplayDevTchapRustCryptoWithoutvoipWithpinningDebugImplementation + gplayTchapRustCryptoWithoutvoipWithpinningDebugImplementation - fdroidBtchapWithoutvoipWithoutpinningDebugImplementation - fdroidDevTchapWithoutvoipWithoutpinningDebugImplementation - fdroidTchapWithoutvoipWithoutpinningDebugImplementation + fdroidBtchapRustCryptoWithoutvoipWithoutpinningDebugImplementation + fdroidDevTchapRustCryptoWithoutvoipWithoutpinningDebugImplementation + fdroidTchapRustCryptoWithoutvoipWithoutpinningDebugImplementation - gplayBtchapWithoutvoipWithoutpinningDebugImplementation - gplayDevTchapWithoutvoipWithoutpinningDebugImplementation - gplayTchapWithoutvoipWithoutpinningDebugImplementation + gplayBtchapRustCryptoWithoutvoipWithoutpinningDebugImplementation + gplayDevTchapRustCryptoWithoutvoipWithoutpinningDebugImplementation + gplayTchapRustCryptoWithoutvoipWithoutpinningDebugImplementation } dependencies { @@ -536,82 +536,82 @@ dependencies { // Tchap: We had to exclude fbjni for withVoip, the library is already include in jitsi library // Flipper, debug builds only - gplayBtchapWithvoipWithpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - gplayBtchapWithvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + gplayBtchapRustCryptoWithvoipWithpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + gplayBtchapRustCryptoWithvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - gplayTchapWithvoipWithpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - gplayTchapWithvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + gplayTchapRustCryptoWithvoipWithpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + gplayTchapRustCryptoWithvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - gplayDevTchapWithvoipWithpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - gplayDevTchapWithvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + gplayDevTchapRustCryptoWithvoipWithpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + gplayDevTchapRustCryptoWithvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - fdroidBtchapWithvoipWithpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - fdroidBtchapWithvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + fdroidBtchapRustCryptoWithvoipWithpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + fdroidBtchapRustCryptoWithvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - fdroidTchapWithvoipWithpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - fdroidTchapWithvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + fdroidTchapRustCryptoWithvoipWithpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + fdroidTchapRustCryptoWithvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - fdroidDevTchapWithvoipWithpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - fdroidDevTchapWithvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + fdroidDevTchapRustCryptoWithvoipWithpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + fdroidDevTchapRustCryptoWithvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - gplayBtchapWithvoipWithoutpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - gplayBtchapWithvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + gplayBtchapRustCryptoWithvoipWithoutpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + gplayBtchapRustCryptoWithvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - gplayDevTchapWithvoipWithoutpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - gplayDevTchapWithvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + gplayDevTchapRustCryptoWithvoipWithoutpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + gplayDevTchapRustCryptoWithvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - gplayTchapWithvoipWithoutpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - gplayTchapWithvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + gplayTchapRustCryptoWithvoipWithoutpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + gplayTchapRustCryptoWithvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - fdroidBtchapWithvoipWithoutpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - fdroidBtchapWithvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + fdroidBtchapRustCryptoWithvoipWithoutpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + fdroidBtchapRustCryptoWithvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - fdroidDevTchapWithvoipWithoutpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - fdroidDevTchapWithvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + fdroidDevTchapRustCryptoWithvoipWithoutpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + fdroidDevTchapRustCryptoWithvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - fdroidTchapWithvoipWithoutpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - fdroidTchapWithvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + fdroidTchapRustCryptoWithvoipWithoutpinningDebugImplementation(libs.flipper.flipper) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } + fdroidTchapRustCryptoWithvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) { exclude group: 'com.facebook.fbjni', module: 'fbjni' } - gplayBtchapWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipper) - gplayBtchapWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) + gplayBtchapRustCryptoWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipper) + gplayBtchapRustCryptoWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) - gplayTchapWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipper) - gplayTchapWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) + gplayTchapRustCryptoWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipper) + gplayTchapRustCryptoWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) - gplayDevTchapWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipper) - gplayDevTchapWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) + gplayDevTchapRustCryptoWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipper) + gplayDevTchapRustCryptoWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) - fdroidBtchapWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipper) - fdroidBtchapWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) + fdroidBtchapRustCryptoWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipper) + fdroidBtchapRustCryptoWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) - fdroidTchapWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipper) - fdroidTchapWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) + fdroidTchapRustCryptoWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipper) + fdroidTchapRustCryptoWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) - fdroidDevTchapWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipper) - fdroidDevTchapWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) + fdroidDevTchapRustCryptoWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipper) + fdroidDevTchapRustCryptoWithoutvoipWithoutpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) - gplayBtchapWithoutvoipWithpinningDebugImplementation(libs.flipper.flipper) - gplayBtchapWithoutvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) + gplayBtchapRustCryptoWithoutvoipWithpinningDebugImplementation(libs.flipper.flipper) + gplayBtchapRustCryptoWithoutvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) - gplayTchapWithoutvoipWithpinningDebugImplementation(libs.flipper.flipper) - gplayTchapWithoutvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) + gplayTchapRustCryptoWithoutvoipWithpinningDebugImplementation(libs.flipper.flipper) + gplayTchapRustCryptoWithoutvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) - gplayDevTchapWithoutvoipWithpinningDebugImplementation(libs.flipper.flipper) - gplayDevTchapWithoutvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) + gplayDevTchapRustCryptoWithoutvoipWithpinningDebugImplementation(libs.flipper.flipper) + gplayDevTchapRustCryptoWithoutvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) - fdroidBtchapWithoutvoipWithpinningDebugImplementation(libs.flipper.flipper) - fdroidBtchapWithoutvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) + fdroidBtchapRustCryptoWithoutvoipWithpinningDebugImplementation(libs.flipper.flipper) + fdroidBtchapRustCryptoWithoutvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) - fdroidTchapWithoutvoipWithpinningDebugImplementation(libs.flipper.flipper) - fdroidTchapWithoutvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) + fdroidTchapRustCryptoWithoutvoipWithpinningDebugImplementation(libs.flipper.flipper) + fdroidTchapRustCryptoWithoutvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) - fdroidDevTchapWithoutvoipWithpinningDebugImplementation(libs.flipper.flipper) - fdroidDevTchapWithoutvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) + fdroidDevTchapRustCryptoWithoutvoipWithpinningDebugImplementation(libs.flipper.flipper) + fdroidDevTchapRustCryptoWithoutvoipWithpinningDebugImplementation(libs.flipper.flipperNetworkPlugin) debugImplementation 'com.facebook.soloader:soloader:0.10.4' debugImplementation "com.kgurgul.flipper:flipper-realm-android:2.2.0" diff --git a/vector-config/build.gradle b/vector-config/build.gradle index 39f1fdecfb..1d3f549c43 100644 --- a/vector-config/build.gradle +++ b/vector-config/build.gradle @@ -15,7 +15,7 @@ android { // The 'target' dimension permits to specify which platform are used // The 'voip' flavor dimension permits to include/exclude jitsi at compilation time - flavorDimensions "target", "voip" + flavorDimensions = ["target", "voip"] productFlavors { withvoip { dimension "voip" } diff --git a/vector/build.gradle b/vector/build.gradle index b063ae486d..6c0207e4c4 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -82,7 +82,7 @@ android { // The 'target' dimension permits to specify which platform are used // The 'voip' flavor dimension permits to include/exclude jitsi at compilation time // The 'pinning' flavor dimension permits to enable/disable certificate pinning with fingerprint check - flavorDimensions "store", "target", "crypto", "voip", "pinning" + flavorDimensions = ["store", "target", "crypto", "voip", "pinning"] productFlavors { gplay { @@ -271,12 +271,11 @@ dependencies { implementation "androidx.emoji2:emoji2:1.3.0" + // Tchap: Manage jitsi lib // WebRTC - // org.webrtc:google-webrtc is for development purposes only - // implementation 'org.webrtc:google-webrtc:1.0.+' - implementation('com.facebook.react:react-native-webrtc:111.0.0-jitsi-13672566@aar') + withoutvoipImplementation('org.jitsi:webrtc:111.0.1') // Jitsi - api('org.jitsi.react:jitsi-meet-sdk:8.1.1') { // Tchap: always compile with jsitsi-meet else webrtc is unresolved. + withvoipApi('org.jitsi.react:jitsi-meet-sdk:8.1.1') { exclude group: 'com.google.firebase' exclude group: 'com.google.android.gms' exclude group: 'com.android.installreferrer' @@ -287,8 +286,7 @@ dependencies { exclude group: 'com.android.support', module: 'appcompat-v7' } - // Tchap - // Fix issue on okhttp3 import + // Tchap: Fix issue on okhttp3 import api 'com.squareup.okhttp3:okhttp' // QR-code