Skip to content

Commit

Permalink
Version 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Threema committed Jul 16, 2024
1 parent f7aaa92 commit 8b2e7de
Show file tree
Hide file tree
Showing 336 changed files with 11,055 additions and 4,047 deletions.
88 changes: 47 additions & 41 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ if (getGradle().getStartParameter().getTaskRequests().toString().contains("Hms")
// version codes

// Only use the scheme "<major>.<minor>.<patch>" for the app_version
def app_version = "5.3.2"
def app_version = "5.4"

// beta_suffix with leading dash (e.g. `-beta1`)
// should be one of (alpha|beta|rc) and an increasing number or empty for a regular release.
// Note: in nightly builds this will be overwritten with a nightly version "-n12345"
def beta_suffix = ""

def defaultVersionCode = 959
def defaultVersionCode = 973

/**
* Return the git hash, if git is installed.
Expand Down Expand Up @@ -85,7 +85,7 @@ def keystores = [
release: findKeystore("threema"),
hms_release: findKeystore("threema_hms"),
onprem_release: findKeystore("onprem"),
blue_release: findKeystore("red"),
blue_release: findKeystore("threema_blue"),
]

android {
Expand Down Expand Up @@ -121,7 +121,6 @@ android {
buildConfigField "boolean", "CHAT_SERVER_GROUPS", "true"
buildConfigField "boolean", "DISABLE_CERT_PINNING", "false"
buildConfigField "boolean", "VIDEO_CALLS_ENABLED", "true"
buildConfigField "boolean", "GROUP_CALLS_ENABLED", "true"
buildConfigField "byte[]", "SERVER_PUBKEY", "new byte[] {(byte) 0x45, (byte) 0x0b, (byte) 0x97, (byte) 0x57, (byte) 0x35, (byte) 0x27, (byte) 0x9f, (byte) 0xde, (byte) 0xcb, (byte) 0x33, (byte) 0x13, (byte) 0x64, (byte) 0x8f, (byte) 0x5f, (byte) 0xc6, (byte) 0xee, (byte) 0x9f, (byte) 0xf4, (byte) 0x36, (byte) 0x0e, (byte) 0xa9, (byte) 0x2a, (byte) 0x8c, (byte) 0x17, (byte) 0x51, (byte) 0xc6, (byte) 0x61, (byte) 0xe4, (byte) 0xc0, (byte) 0xd8, (byte) 0xc9, (byte) 0x09 }"
buildConfigField "byte[]", "SERVER_PUBKEY_ALT", "new byte[] {(byte) 0xda, (byte) 0x7c, (byte) 0x73, (byte) 0x79, (byte) 0x8f, (byte) 0x97, (byte) 0xd5, (byte) 0x87, (byte) 0xc3, (byte) 0xa2, (byte) 0x5e, (byte) 0xbe, (byte) 0x0a, (byte) 0x91, (byte) 0x41, (byte) 0x7f, (byte) 0x76, (byte) 0xdb, (byte) 0xcc, (byte) 0xcd, (byte) 0xda, (byte) 0x29, (byte) 0x30, (byte) 0xe6, (byte) 0xa9, (byte) 0x09, (byte) 0x0a, (byte) 0xf6, (byte) 0x2e, (byte) 0xba, (byte) 0x6f, (byte) 0x15 }"
buildConfigField "String", "GIT_HASH", "\"${getGitHash()}\""
Expand All @@ -146,8 +145,9 @@ android {
buildConfigField "String", "DEFAULT_APP_THEME", "\"2\""

buildConfigField "String[]", "ONPREM_CONFIG_TRUSTED_PUBLIC_KEYS", "null"
buildConfigField "boolean", "SEND_CONSUMED_DELIVERY_RECEIPTS", "false"
buildConfigField "boolean", "MD_ENABLED", "false"
buildConfigField "boolean", "EDIT_MESSAGES_ENABLED", "false"
buildConfigField "boolean", "DELETE_MESSAGES_ENABLED", "false"

// config fields for action URLs / deep links
buildConfigField "String", "uriScheme", "\"threema\""
Expand Down Expand Up @@ -266,6 +266,8 @@ android {
buildConfigField "String", "AVATAR_FETCH_URL", "\"https://avatar.test.threema.ch/\""
buildConfigField "String", "APP_RATING_URL", "\"https://test.threema.ch/app-rating/android/{rating}\""
buildConfigField "boolean", "MD_ENABLED", "true"
buildConfigField "boolean", "EDIT_MESSAGES_ENABLED", "true"
buildConfigField "boolean", "DELETE_MESSAGES_ENABLED", "true"
}
sandbox_work {
versionName "${app_version}k${beta_suffix}"
Expand Down Expand Up @@ -298,6 +300,9 @@ android {
buildConfigField "String", "actionUrl", "\"work.test.threema.ch\""

buildConfigField "boolean", "MD_ENABLED", "true"
buildConfigField "boolean", "EDIT_MESSAGES_ENABLED", "true"
buildConfigField "boolean", "DELETE_MESSAGES_ENABLED", "true"


manifestPlaceholders = [
uriScheme : "threemawork",
Expand Down Expand Up @@ -405,7 +410,8 @@ android {
buildConfigField "String", "APP_RATING_URL", "\"https://test.threema.ch/app-rating/android-work/{rating}\""
buildConfigField "String", "LOG_TAG", "\"3mablue\""

buildConfigField "boolean", "SEND_CONSUMED_DELIVERY_RECEIPTS", "true"
buildConfigField "boolean", "EDIT_MESSAGES_ENABLED", "true"
buildConfigField "boolean", "DELETE_MESSAGES_ENABLED", "true"

// config fields for action URLs / deep links
buildConfigField "String", "uriScheme", "\"threemablue\""
Expand Down Expand Up @@ -581,10 +587,11 @@ android {
debug {
debuggable true
jniDebuggable false
testCoverageEnabled false
ndk {
debugSymbolLevel 'FULL'
}
enableUnitTestCoverage false
enableAndroidTestCoverage false

if (keystores['debug'] != null) {
signingConfig signingConfigs.debug
Expand Down Expand Up @@ -649,7 +656,7 @@ android {
packagingOptions {
jniLibs {
// replacement for extractNativeLibs in AndroidManifest
useLegacyPackaging = false
useLegacyPackaging = true
}
resources {
excludes += [
Expand Down Expand Up @@ -763,7 +770,7 @@ dependencies {

implementation project(':domain')

implementation 'net.zetetic:sqlcipher-android:4.5.5@aar'
implementation 'net.zetetic:sqlcipher-android:4.5.7@aar'

implementation 'com.davemorrissey.labs:subsampling-scale-image-view-androidx:3.10.0'
implementation 'net.sf.opencsv:opencsv:2.3'
Expand All @@ -784,42 +791,42 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.palette:palette-ktx:1.0.0'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.biometric:biometric:1.1.0'
implementation 'androidx.work:work-runtime-ktx:2.9.0'
implementation 'androidx.fragment:fragment-ktx:1.6.2'
implementation 'androidx.activity:activity-ktx:1.8.2'
implementation 'androidx.fragment:fragment-ktx:1.8.0'
implementation 'androidx.activity:activity-ktx:1.9.0'
implementation 'androidx.sqlite:sqlite:2.2.2'
implementation "androidx.concurrent:concurrent-futures:1.1.0"
implementation "androidx.camera:camera-camera2:1.3.2"
implementation "androidx.camera:camera-lifecycle:1.3.2"
implementation "androidx.camera:camera-view:1.3.2"
implementation 'androidx.camera:camera-video:1.3.2'
implementation "androidx.concurrent:concurrent-futures:1.2.0"
implementation "androidx.camera:camera-camera2:1.3.4"
implementation "androidx.camera:camera-lifecycle:1.3.4"
implementation "androidx.camera:camera-view:1.3.4"
implementation 'androidx.camera:camera-video:1.3.4'
implementation "androidx.media:media:1.7.0"
implementation 'androidx.media3:media3-exoplayer:1.3.1'
implementation 'androidx.media3:media3-ui:1.3.1'
implementation "androidx.media3:media3-session:1.3.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.7.0"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.7.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.7.0"
implementation "androidx.lifecycle:lifecycle-service:2.7.0"
implementation "androidx.lifecycle:lifecycle-process:2.7.0"
implementation "androidx.lifecycle:lifecycle-common-java8:2.7.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.2"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.8.2"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.8.2"
implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.8.2"
implementation "androidx.lifecycle:lifecycle-service:2.8.2"
implementation "androidx.lifecycle:lifecycle-process:2.8.2"
implementation "androidx.lifecycle:lifecycle-common-java8:2.8.2"
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation "androidx.paging:paging-runtime-ktx:3.2.1"
implementation "androidx.paging:paging-runtime-ktx:3.3.0"
implementation "androidx.sharetarget:sharetarget:1.2.0"
implementation 'androidx.room:room-runtime:2.6.1'
implementation 'androidx.window:window:1.2.0'
implementation 'androidx.window:window:1.3.0'
kapt 'androidx.room:room-compiler:2.6.1'

implementation 'org.bouncycastle:bcprov-jdk15to18:1.78.1'

implementation 'com.google.android.material:material:1.10.0' // last version before switch to tonal system: https://github.com/material-components/material-components-android/releases/tag/1.11.0
implementation 'com.google.zxing:core:3.3.3' // zxing 3.4 crashes on API < 24
implementation 'com.googlecode.libphonenumber:libphonenumber:8.13.23' // make sure to update this in domain's build.gradle as well
implementation 'com.googlecode.libphonenumber:libphonenumber:8.13.39' // make sure to update this in domain's build.gradle as well

// webclient dependencies
implementation 'org.msgpack:msgpack-core:0.8.24!!'
Expand All @@ -846,27 +853,26 @@ dependencies {
annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0'

// Kotlin
implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.core:core-ktx:1.13.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1"
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
androidTestImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"

// use leak canary in dev builds
// use leak canary in debug builds
if (!project.hasProperty("noLeakCanary")) {
def leakCanaryDependency = 'com.squareup.leakcanary:leakcanary-android:2.13'
blueImplementation(leakCanaryDependency)
greenImplementation(leakCanaryDependency)
sandbox_workImplementation(leakCanaryDependency)
// Uncomment the following line to use leak canary in *any* debug build
// debugImplementation(leakCanaryDependency)
debugImplementation('com.squareup.leakcanary:leakcanary-android:2.13')
}

// test dependencies
testImplementation "junit:junit:$junit_version"
testImplementation(testFixtures(project(":domain")))

// custom test helpers, shared between unit test and android tests
testImplementation(project(":test-helpers"))
androidTestImplementation(project(":test-helpers"))

// use powermock instead of mockito. it support mocking static classes.
def mockitoVersion = '2.0.9'
testImplementation "org.powermock:powermock-api-mockito2:${mockitoVersion}"
Expand All @@ -880,7 +886,7 @@ dependencies {
testImplementation 'com.tngtech.archunit:archunit-junit4:0.18.0'

androidTestImplementation(testFixtures(project(":domain")))
androidTestImplementation 'androidx.test:rules:1.5.0'
androidTestImplementation 'androidx.test:rules:1.6.0'
androidTestImplementation 'tools.fastlane:screengrab:2.1.1', {
exclude group: 'androidx.annotation', module: 'annotation'
}
Expand All @@ -890,7 +896,7 @@ dependencies {
androidTestImplementation 'androidx.test:runner:1.4.0', {
exclude group: 'androidx.annotation', module: 'annotation'
}
androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.5'
androidTestImplementation 'androidx.test.ext:junit-ktx:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.4.0', {
exclude group: 'androidx.annotation', module: 'annotation'
exclude group: 'androidx.appcompat', module: 'appcompat'
Expand All @@ -903,8 +909,8 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.4.0', {
exclude group: 'androidx.annotation', module: 'annotation'
}
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
androidTestImplementation 'androidx.test:core-ktx:1.5.0'
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.3.0'
androidTestImplementation 'androidx.test:core-ktx:1.6.0'
androidTestImplementation "org.mockito:mockito-core:4.8.1"
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlin_coroutines_version"

Expand Down Expand Up @@ -946,7 +952,7 @@ dependencies {
blueImplementation(name: 'libgsaverification-client', ext: 'aar')

// Maplibre (may have transitive dependencies on Google location services)
def maplibreDependency = 'org.maplibre.gl:android-sdk:10.3.0'
def maplibreDependency = 'org.maplibre.gl:android-sdk:11.0.1'
noneImplementation maplibreDependency
store_googleImplementation maplibreDependency
store_google_workImplementation maplibreDependency
Expand Down
41 changes: 41 additions & 0 deletions app/src/androidTest/java/ch/threema/app/TestCoreServiceManager.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/* _____ _
* |_ _| |_ _ _ ___ ___ _ __ __ _
* | | | ' \| '_/ -_) -_) ' \/ _` |_
* |_| |_||_|_| \___\___|_|_|_\__,_(_)
*
* Threema for Android
* Copyright (c) 2024 Threema GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* 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/>.
*/

package ch.threema.app

import ch.threema.app.managers.CoreServiceManager
import ch.threema.app.multidevice.MultiDeviceManagerImpl
import ch.threema.app.stores.PreferenceStoreInterface
import ch.threema.app.tasks.TaskArchiverImpl
import ch.threema.app.utils.DeviceCookieManagerImpl
import ch.threema.domain.models.AppVersion
import ch.threema.domain.taskmanager.TaskManager
import ch.threema.storage.DatabaseServiceNew

class TestCoreServiceManager(
override val version: AppVersion,
override val databaseService: DatabaseServiceNew,
override val preferenceStore: PreferenceStoreInterface,
override val taskArchiver: TaskArchiverImpl,
override val deviceCookieManager: DeviceCookieManagerImpl,
override val taskManager: TaskManager,
override val multiDeviceManager: MultiDeviceManagerImpl,
): CoreServiceManager
Loading

0 comments on commit 8b2e7de

Please sign in to comment.