From 8679859058f0832cef13b8da28cc8960f828a660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCrten?= <sebastian@mobanisto.de> Date: Tue, 18 Jan 2022 14:53:38 +0100 Subject: [PATCH] Upgrade briar-core Add jackson_version as this is now required by bramble-core's build.gradle. Extend feature flags implementations in our modules and disable private groups, forums and blogs in core. --- briar | 2 +- build.gradle.kts | 1 + .../kotlin/org/briarproject/briar/desktop/DesktopModule.kt | 7 ++++--- .../org/briarproject/briar/desktop/DesktopTestModule.kt | 7 ++++--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/briar b/briar index 65be2d2b26..24d058cdcc 160000 --- a/briar +++ b/briar @@ -1 +1 @@ -Subproject commit 65be2d2b2655062c539d6b4ba931bfe730ece2e2 +Subproject commit 24d058cdccc286b410f28a29642b4aff70fe1926 diff --git a/build.gradle.kts b/build.gradle.kts index 6787df09a6..9645a34e9e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -22,6 +22,7 @@ buildscript { extra.apply { set("dagger_version", "2.33") set("okhttp_version", "3.12.13") + set("jackson_version", "2.13.0") set("tor_version", "0.3.5.17") set("obfs4proxy_version", "0.0.12-dev-40245c4a") set("junit_version", "4.13.2") diff --git a/src/main/kotlin/org/briarproject/briar/desktop/DesktopModule.kt b/src/main/kotlin/org/briarproject/briar/desktop/DesktopModule.kt index 9ec987d1ab..0fef13cee3 100644 --- a/src/main/kotlin/org/briarproject/briar/desktop/DesktopModule.kt +++ b/src/main/kotlin/org/briarproject/briar/desktop/DesktopModule.kt @@ -124,17 +124,18 @@ internal class DesktopModule( } @Provides - internal fun provideFeatureFlags() = object : FeatureFlags { + internal fun provideFeatureFlags(desktopFeatureFlags: DesktopFeatureFlags) = object : FeatureFlags { override fun shouldEnableImageAttachments() = true override fun shouldEnableProfilePictures() = true override fun shouldEnableDisappearingMessages() = false + override fun shouldEnablePrivateGroupsInCore() = desktopFeatureFlags.shouldEnablePrivateGroups() + override fun shouldEnableForumsInCore() = desktopFeatureFlags.shouldEnableForums() + override fun shouldEnableBlogsInCore() = desktopFeatureFlags.shouldEnableBlogs() } @Provides @Singleton internal fun provideDesktopFeatureFlags() = object : DesktopFeatureFlags { - // TODO: once we have shouldEnableBlogsInCore() in briar core, wire them up with these here - // so that the value for shouldEnableBlogs() is always the same the respective core flag. override fun shouldEnablePrivateGroups() = false override fun shouldEnableForums() = false override fun shouldEnableBlogs() = false diff --git a/src/test/kotlin/org/briarproject/briar/desktop/DesktopTestModule.kt b/src/test/kotlin/org/briarproject/briar/desktop/DesktopTestModule.kt index dbe18201fc..cdb7c3ac19 100644 --- a/src/test/kotlin/org/briarproject/briar/desktop/DesktopTestModule.kt +++ b/src/test/kotlin/org/briarproject/briar/desktop/DesktopTestModule.kt @@ -130,17 +130,18 @@ internal class DesktopTestModule( } @Provides - internal fun provideFeatureFlags() = object : FeatureFlags { + internal fun provideFeatureFlags(desktopFeatureFlags: DesktopFeatureFlags) = object : FeatureFlags { override fun shouldEnableImageAttachments() = true override fun shouldEnableProfilePictures() = true override fun shouldEnableDisappearingMessages() = false + override fun shouldEnablePrivateGroupsInCore() = desktopFeatureFlags.shouldEnablePrivateGroups() + override fun shouldEnableForumsInCore() = desktopFeatureFlags.shouldEnableForums() + override fun shouldEnableBlogsInCore() = desktopFeatureFlags.shouldEnableBlogs() } @Provides @Singleton internal fun provideDesktopFeatureFlags() = object : DesktopFeatureFlags { - // TODO: once we have shouldEnableBlogsInCore() in briar core, wire them up with these here - // so that the value for shouldEnableBlogs() is always the same the respective core flag. override fun shouldEnablePrivateGroups() = false override fun shouldEnableForums() = false override fun shouldEnableBlogs() = false -- GitLab