Skip to content
Snippets Groups Projects
Verified Commit dff2d12f authored by Sebastian's avatar Sebastian
Browse files

Move main sources to own "briar-desktop" module

parent 637ccc90
Branches
Tags
1 merge request!216Move main sources to own "desktop" module
Pipeline #11236 passed
Showing
with 150 additions and 44 deletions
......@@ -31,7 +31,7 @@ ktlint:
stage: test
script:
- git submodule update
- ./gradlew --no-daemon :check
- ./gradlew --no-daemon briar-desktop:check
rules:
- if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS'
when: never # avoids duplicate jobs for branch and MR
......@@ -44,7 +44,7 @@ b_jar:
script:
- ./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-11-openjdk-amd64 --no-daemon kaptKotlin
- ./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64 --no-daemon -PbuildType=nightly -x kaptKotlin packageUberJarForCurrentOS
- mv build/compose/jars/Briar-*.jar ./briar-desktop.jar
- mv briar-desktop/build/compose/jars/Briar-*.jar ./briar-desktop.jar
artifacts:
paths:
- briar-desktop.jar
......@@ -58,7 +58,7 @@ b_bullseye_deb:
- ./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-11-openjdk-amd64 --no-daemon kaptKotlin
- ./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64 --no-daemon -PbuildType=nightly -x kaptKotlin packageDeb
- utils/finalize-deb.sh
- mv build/compose/binaries/main/deb/briar-desktop.deb ./briar-desktop-debian-bullseye.deb
- mv briar-desktop/build/compose/binaries/main/deb/briar-desktop.deb ./briar-desktop-debian-bullseye.deb
artifacts:
paths:
- briar-desktop-debian-bullseye.deb
......@@ -73,7 +73,7 @@ b_20_ubuntu_deb:
- ./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-11-openjdk-amd64 --no-daemon kaptKotlin
- ./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64 --no-daemon -PbuildType=nightly -x kaptKotlin packageDeb
- utils/finalize-deb.sh
- mv build/compose/binaries/main/deb/briar-desktop.deb ./briar-desktop-ubuntu-20.04.deb
- mv briar-desktop/build/compose/binaries/main/deb/briar-desktop.deb ./briar-desktop-ubuntu-20.04.deb
artifacts:
paths:
- briar-desktop-ubuntu-20.04.deb
......@@ -88,7 +88,7 @@ b_18_ubuntu_deb:
- ./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-11-openjdk-amd64 --no-daemon kaptKotlin
- ./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64 --no-daemon -PbuildType=nightly -x kaptKotlin packageDeb
- utils/finalize-deb.sh
- mv build/compose/binaries/main/deb/briar-desktop.deb ./briar-desktop-ubuntu-18.04.deb
- mv briar-desktop/build/compose/binaries/main/deb/briar-desktop.deb ./briar-desktop-ubuntu-18.04.deb
artifacts:
paths:
- briar-desktop-ubuntu-18.04.deb
......@@ -101,7 +101,7 @@ rb_jar:
script:
- ./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-11-openjdk-amd64 --no-daemon kaptKotlin
- ./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64 --no-daemon -PbuildType=beta -x kaptKotlin packageUberJarForCurrentOS
- mv build/compose/jars/Briar-*.jar ./briar-desktop.jar
- mv briar-desktop/build/compose/jars/Briar-*.jar ./briar-desktop.jar
artifacts:
paths:
- briar-desktop.jar
......@@ -115,7 +115,7 @@ rb_bullseye_deb:
- ./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-11-openjdk-amd64 --no-daemon kaptKotlin
- ./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64 --no-daemon -PbuildType=beta -x kaptKotlin packageDeb
- utils/finalize-deb.sh
- mv build/compose/binaries/main/deb/briar-desktop.deb ./briar-desktop-debian-bullseye.deb
- mv briar-desktop/build/compose/binaries/main/deb/briar-desktop.deb ./briar-desktop-debian-bullseye.deb
artifacts:
paths:
- briar-desktop-debian-bullseye.deb
......@@ -130,7 +130,7 @@ rb_20_ubuntu_deb:
- ./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-11-openjdk-amd64 --no-daemon kaptKotlin
- ./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64 --no-daemon -PbuildType=beta -x kaptKotlin packageDeb
- utils/finalize-deb.sh
- mv build/compose/binaries/main/deb/briar-desktop.deb ./briar-desktop-ubuntu-20.04.deb
- mv briar-desktop/build/compose/binaries/main/deb/briar-desktop.deb ./briar-desktop-ubuntu-20.04.deb
artifacts:
paths:
- briar-desktop-ubuntu-20.04.deb
......@@ -145,7 +145,7 @@ rb_18_ubuntu_deb:
- ./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-11-openjdk-amd64 --no-daemon kaptKotlin
- ./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64 --no-daemon -PbuildType=beta -x kaptKotlin packageDeb
- utils/finalize-deb.sh
- mv build/compose/binaries/main/deb/briar-desktop.deb ./briar-desktop-ubuntu-18.04.deb
- mv briar-desktop/build/compose/binaries/main/deb/briar-desktop.deb ./briar-desktop-ubuntu-18.04.deb
artifacts:
paths:
- briar-desktop-ubuntu-18.04.deb
......
......
......@@ -38,8 +38,8 @@
</profile>
</annotationProcessing>
<bytecodeTargetLevel target="1.8">
<module name="Briar-compose.main" target="11" />
<module name="Briar-compose.test" target="11" />
<module name="briar-desktop.desktop.main" target="17" />
<module name="briar-desktop.desktop.test" target="17" />
</bytecodeTargetLevel>
</component>
</project>
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Briar Desktop" type="JetRunConfigurationType">
<option name="MAIN_CLASS_NAME" value="org.briarproject.briar.desktop.MainKt" />
<module name="briar-desktop.main" />
<module name="briar-desktop.briar-desktop.main" />
<option name="PROGRAM_PARAMETERS" value="--debug" />
<shortenClasspath name="NONE" />
<method v="2">
<option name="Make" enabled="true" />
</method>
......
......
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="TestDeterministicConversationsKt" type="JetRunConfigurationType" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="org.briarproject.briar.desktop.TestDeterministicConversationsKt" />
<module name="briar-desktop.test" />
<module name="briar-desktop.briar-desktop.test" />
<shortenClasspath name="NONE" />
<method v="2">
<option name="Make" enabled="true" />
......
......
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="TestMixedConversationsKt" type="JetRunConfigurationType" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="org.briarproject.briar.desktop.TestMixedConversationsKt" />
<module name="briar-desktop.test" />
<shortenClasspath name="NONE" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
\ No newline at end of file
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="TestRandomConversationsKt" type="JetRunConfigurationType" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="org.briarproject.briar.desktop.TestRandomConversationsKt" />
<module name="briar-desktop.test" />
<shortenClasspath name="NONE" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
\ No newline at end of file
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="TestListConversationDataKt" type="JetRunConfigurationType" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="org.briarproject.briar.desktop.testdata.TestListConversationDataKt" />
<module name="briar-desktop.test" />
<configuration default="false" name="TestWithTwoConnectedTemporaryAccountsKt" type="JetRunConfigurationType" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="org.briarproject.briar.desktop.TestWithTwoConnectedTemporaryAccountsKt" />
<module name="briar-desktop.briar-desktop.test" />
<shortenClasspath name="NONE" />
<method v="2">
<option name="Make" enabled="true" />
......
......
......@@ -3,9 +3,8 @@ host = https://www.transifex.com
lang_map = zh-Hans: zh_CN, zh-Hant: zh_TW
[briar.briar-desktop]
file_filter = src/main/resources/strings/BriarDesktop_<lang>.properties
file_filter = briar-desktop/src/main/resources/strings/BriarDesktop_<lang>.properties
minimum_perc = 50
source_file = src/main/resources/strings/BriarDesktop.properties
source_file = briar-desktop/src/main/resources/strings/BriarDesktop.properties
source_lang = en
type = UNICODEPROPERTIES
......@@ -5,7 +5,7 @@
When working on the code base, consider running the style checks and unit
tests locally, because the CI will complain anyway:
./gradlew :check
./gradlew briar-desktop:check
The above command does both. To run style checks only:
......@@ -17,7 +17,7 @@ If that fails, try formatting:
Running unit tests only:
./gradlew :test --tests "*"
./gradlew briar-desktop:test --tests "*"
That will run tests from the desktop project only. On the other hand, this
will also run tests on briar core:
......
......
......@@ -14,7 +14,8 @@ _This section is of interest only for developers of Briar Desktop_.
To update translations locally, first install `transifex-client`. You can then pull updates with `tx pull -a`.
If that command added a language that was previously not supported,
you have to manually insert the language code in [UnencryptedSettings.kt](./src/main/kotlin/org/briarproject/briar/desktop/settings/UnencryptedSettings.kt)
you have to manually insert the language code
in [UnencryptedSettings.kt](./briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/settings/UnencryptedSettings.kt)
for it to be shown in the language selection.
The Localization Lab has some instructions and advice for
......@@ -27,7 +28,8 @@ This is how updating translations in Briar Desktop works:
* We pull the updates from Transifex and commit them before each release
* Occasionally we make minor updates locally and push them to Transifex
Translations only happen on Transifex. You might want to make your changes through Transifex by joining the respective language teams.
Translations only happen on Transifex.
You might want to make your changes through Transifex by joining the respective language teams.
To test Briar Desktop in your language,
you can simply change the respective setting in the settings screen.
......
......
File moved
/*
* Briar Desktop
* Copyright (C) 2021-2022 The Briar Project
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
@file:Suppress("HardCodedStringLiteral")
import org.jetbrains.compose.compose
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.6.10"
kotlin("kapt") version "1.6.10"
id("org.jetbrains.compose") version "1.1.1"
id("java")
id("idea")
id("org.jlleitschuh.gradle.ktlint") version "10.1.0"
id("org.briarproject.briar.desktop.build-data-gradle-plugin")
}
val versionCode = "0.2.1"
val buildType = if (project.hasProperty("buildType")) project.properties["buildType"] else "snapshot"
group = "app.briar.desktop"
version = "$versionCode-$buildType"
buildData {
packageName = "org.briarproject.briar.desktop"
}
dependencies {
implementation(compose.desktop.currentOs)
implementation(compose.materialIconsExtended)
// needed to access Dispatchers.Swing for EventExecutor
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:1.6.1")
implementation("com.github.ajalt.clikt:clikt:3.4.0")
implementation("com.ibm.icu:icu4j:70.1")
implementation(project(path = ":briar-core", configuration = "default"))
implementation(project(path = ":bramble-java", configuration = "default"))
implementation("io.github.microutils:kotlin-logging-jvm:2.1.21")
implementation("org.slf4j:jul-to-slf4j:1.7.36")
implementation("ch.qos.logback:logback-classic:1.2.11")
val daggerVersion = "2.24"
kapt("com.google.dagger:dagger-compiler:$daggerVersion")
testImplementation(kotlin("test-testng"))
testImplementation("commons-io:commons-io:2.11.0")
kaptTest("com.google.dagger:dagger-compiler:$daggerVersion")
}
tasks.test {
useTestNG()
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}
tasks.withType<org.gradle.jvm.tasks.Jar> {
exclude("META-INF/BC1024KE.RSA", "META-INF/BC1024KE.SF", "META-INF/BC1024KE.DSA")
exclude("META-INF/BC2048KE.RSA", "META-INF/BC2048KE.SF", "META-INF/BC2048KE.DSA")
}
tasks.jar {
exclude("META-INF/BC1024KE.RSA", "META-INF/BC1024KE.SF", "META-INF/BC1024KE.DSA")
exclude("META-INF/BC2048KE.RSA", "META-INF/BC2048KE.SF", "META-INF/BC2048KE.DSA")
}
compose.desktop {
application {
mainClass = "org.briarproject.briar.desktop.MainKt"
nativeDistributions {
targetFormats(TargetFormat.Msi, TargetFormat.Exe, TargetFormat.Deb, TargetFormat.Rpm)
packageName = "Briar"
description = "Secure messaging, anywhere"
vendor = "The Briar Project"
copyright = "2021-2022 The Briar Project"
licenseFile.set(project.file("LICENSE.txt"))
appResourcesRootDir.set(project.layout.projectDirectory.dir("src/appResources"))
// As described at https://github.com/JetBrains/compose-jb/tree/master/tutorials/Native_distributions_and_local_execution#configuring-included-jdk-modules
// the Gradle plugin does not automatically determine necessary JDK modules to ship
// so that we need to define required modules here:
modules("java.sql")
modules("java.naming")
modules("jdk.localedata")
linux {
packageName = "briar-desktop"
// Explicitly specifying the debian revision '-1' doesn't seem to work, it gets always appended.
// I think we're fine having revision '-1' as it will only be used to break ties when the upstream
// version is the same for two packages.
debPackageVersion = "$versionCode-$buildType"
// rpm versions may not contain hyphens, so use underscore
rpmPackageVersion = "${versionCode}_$buildType"
iconFile.set(project.file("src/main/resources/images/logo_circle.png"))
debMaintainer = "contact@briarproject.org"
appCategory = "comm"
menuGroup = "Network;Chat;InstantMessaging;"
}
windows {
iconFile.set(project.file("src/main/resources/images/logo_circle.ico"))
upgradeUuid = "cc8b40f7-f190-4cea-bfec-ceb9ef85df09"
// Windows doesn't support things like 'nightly' or 'release'. Only numeric versions are acceptable
packageVersion = versionCode
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment