Skip to content
Snippets Groups Projects
Verified Commit d9853517 authored by Mikolai Gütschow's avatar Mikolai Gütschow
Browse files

bump briar core, enable private group support in random TestDataCreator

parent b594ceb3
No related branches found
No related tags found
1 merge request!328Upgrade briar with random test data for private groups
Pipeline #14650 passed
Showing
with 19 additions and 21 deletions
Subproject commit fe31e60e66917f9377f6465f3c883b95f95fd895
Subproject commit b88dbee8818fa4f650ec7bd96afa23f78fd1ac88
......@@ -40,6 +40,7 @@ import org.briarproject.bramble.io.DnsModule
import org.briarproject.bramble.mailbox.MailboxModule
import org.briarproject.bramble.mailbox.ModularMailboxModule
import org.briarproject.bramble.network.JavaNetworkModule
import org.briarproject.bramble.plugin.tor.CircumventionModule
import org.briarproject.bramble.socks.SocksModule
import org.briarproject.bramble.system.ClockModule
import org.briarproject.bramble.system.DefaultTaskSchedulerModule
......@@ -69,7 +70,6 @@ import org.briarproject.briar.desktop.ui.MessageCounter
import org.briarproject.briar.desktop.ui.MessageCounterImpl
import org.briarproject.briar.desktop.viewmodel.ViewModelModule
import org.briarproject.briar.identity.IdentityModule
import org.briarproject.onionwrapper.CircumventionModule
import java.io.File
import java.nio.file.Path
import java.util.concurrent.Executor
......
......@@ -47,7 +47,6 @@ internal class DesktopModule {
override fun shouldEnablePrivateGroupsInCore() = desktopFeatureFlags.shouldEnablePrivateGroups()
override fun shouldEnableForumsInCore() = desktopFeatureFlags.shouldEnableForums()
override fun shouldEnableBlogsInCore() = desktopFeatureFlags.shouldEnableBlogs()
override fun shouldEnableMailbox() = false
}
@Provides
......
......@@ -96,7 +96,7 @@ fun BriarSidebar(
Spacer(Modifier.weight(1f))
if (configuration.shouldEnableTransportSettings()) BriarSidebarButton(UiMode.TRANSPORTS)
if (configuration.shouldEnableMailbox()) BriarSidebarButton(
BriarSidebarButton(
selected = uiMode == UiMode.MAILBOX,
onClick = { setUiMode(UiMode.MAILBOX) },
icon = UiMode.MAILBOX.icon,
......
......@@ -51,7 +51,6 @@ internal class DesktopTestModule {
override fun shouldEnablePrivateGroupsInCore() = desktopFeatureFlags.shouldEnablePrivateGroups()
override fun shouldEnableForumsInCore() = desktopFeatureFlags.shouldEnableForums()
override fun shouldEnableBlogsInCore() = desktopFeatureFlags.shouldEnableBlogs()
override fun shouldEnableMailbox() = true
}
@Provides
......
......@@ -20,5 +20,5 @@ package org.briarproject.briar.desktop
fun main() = RunWithTemporaryAccount {
getDeterministicTestDataCreator().createTestData(5, 20, 50, 10, 20)
getTestDataCreator().createTestData(5, 20, 50, 4, 10, 10)
getTestDataCreator().createTestData(5, 20, 50, 4, 10, 10, 10, 10)
}.run()
......@@ -19,5 +19,5 @@
package org.briarproject.briar.desktop
fun main() = RunWithTemporaryAccount {
getTestDataCreator().createTestData(5, 20, 50, 4, 10, 42)
getTestDataCreator().createTestData(5, 20, 50, 4, 4, 23, 4, 23)
}.run()
......@@ -143,7 +143,7 @@ class DeterministicTestDataCreatorImpl @Inject internal constructor(
numPrivateMsgs: Int,
avatarPercent: Int,
numPrivateGroups: Int,
numPrivateGroupPosts: Int
numPrivateGroupPosts: Int,
) {
val contacts = createContacts(numContacts, avatarPercent)
createPrivateMessages(contacts, numPrivateMsgs)
......@@ -333,7 +333,7 @@ class DeterministicTestDataCreatorImpl @Inject internal constructor(
@Throws(DbException::class)
private fun createPrivateMessages(
contacts: List<ContactId>,
numPrivateMsgs: Int
numPrivateMsgs: Int,
) {
for (i in contacts.indices) {
val contactId = contacts[i]
......@@ -354,7 +354,7 @@ class DeterministicTestDataCreatorImpl @Inject internal constructor(
private fun createPrivateMessage(
contactId: ContactId,
groupId: GroupId,
message: Message
message: Message,
) {
val timestamp = message.date.toEpochSecond(ZoneOffset.UTC) * 1000
val text = message.text
......@@ -372,7 +372,7 @@ class DeterministicTestDataCreatorImpl @Inject internal constructor(
images: List<String>,
timestamp: Long,
local: Boolean,
autoDelete: Boolean
autoDelete: Boolean,
) {
val timer =
if (autoDelete) AutoDeleteConstants.MIN_AUTO_DELETE_TIMER_MS else AutoDeleteConstants.NO_AUTO_DELETE_TIMER
......@@ -414,7 +414,7 @@ class DeterministicTestDataCreatorImpl @Inject internal constructor(
for (i in 0 until min(numPrivateGroups, GROUP_NAMES.size)) {
// create private group
val name = GROUP_NAMES[i]
var creator = identityManager.localAuthor
val creator = identityManager.localAuthor
val privateGroup = privateGroupFactory.createPrivateGroup(name, creator)
val joinMsg = groupMessageFactory.createJoinMessage(
privateGroup.id,
......@@ -436,7 +436,7 @@ class DeterministicTestDataCreatorImpl @Inject internal constructor(
private fun createRandomPrivateGroupMessages(
privateGroup: PrivateGroup,
contacts: List<ContactId>,
numPrivateGroupMessages: Int
numPrivateGroupMessages: Int,
) {
// TODO
}
......
......@@ -28,15 +28,15 @@ buildscript {
// keep version here in sync when updating briar
dependencies {
classpath("ru.vyarus:gradle-animalsniffer-plugin:1.5.3")
classpath("ru.vyarus:gradle-animalsniffer-plugin:1.7.0")
classpath(files("briar/libs/gradle-witness.jar"))
}
// keep version here in sync when updating briar
extra.apply {
set("kotlin_version", "1.7.10") // todo: different version used in Briar-Desktop?!
set("dagger_version", "2.43.2")
set("okhttp_version", "3.12.13")
set("kotlin_version", "1.8.20") // todo: different version used in Briar-Desktop?!
set("dagger_version", "2.45")
set("okhttp_version", "4.10.0")
set("jackson_version", "2.13.4")
set("tor_version", "0.4.7.13-2")
set("obfs4proxy_version", "0.0.14-tor2")
......@@ -45,8 +45,8 @@ buildscript {
set("bouncy_castle_version", "1.71")
set("junit_version", "4.13.2")
set("jmock_version", "2.12.0")
set("mockwebserver_version", "4.9.3")
set("onionwrapper_version", "0.0.1")
set("mockwebserver_version", "4.10.0")
set("onionwrapper_version", "0.0.2")
}
}
......
......@@ -42,7 +42,7 @@ import java.nio.file.StandardCopyOption
open class GenerateBuildDataSourceTask : AbstractBuildDataTask() {
companion object {
val LICENSES = buildMap<UnversionedArtifact, String> {
val LICENSES = buildMap {
put(UnversionedArtifact("ch.qos.logback", "logback-classic"), "EPL 1.0/LGPL 2.1")
put(UnversionedArtifact("ch.qos.logback", "logback-core"), "EPL 1.0/LGPL 2.1")
put(UnversionedArtifact("com.fasterxml.jackson.core", "jackson-annotations"), "Apache 2.0")
......@@ -56,7 +56,7 @@ open class GenerateBuildDataSourceTask : AbstractBuildDataTask() {
put(UnversionedArtifact("com.rometools", "rome"), "Apache 2.0")
put(UnversionedArtifact("com.rometools", "rome-utils"), "Apache 2.0")
put(UnversionedArtifact("com.squareup.okhttp3", "okhttp"), "Apache 2.0")
put(UnversionedArtifact("com.squareup.okio", "okio"), "Apache 2.0")
put(UnversionedArtifact("com.squareup.okio", "okio-jvm"), "Apache 2.0")
put(UnversionedArtifact("de.mobanisto", "toast4j"), "MIT")
put(UnversionedArtifact("io.github.microutils", "kotlin-logging-jvm"), "Apache 2.0")
put(UnversionedArtifact("javax.inject", "javax.inject"), "Apache 2.0")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment