diff --git a/app/build.gradle b/app/build.gradle
index 548b2c4..3c6f0bc 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -13,7 +13,17 @@ android {
def versionJson = new groovy.json.JsonSlurper().parseText(rootProject.file('version.json').text)
versionCode versionJson.code
versionName versionJson.name
- resConfigs "en"
+
+ if (isDebugBuild) {
+ resConfigs "en", "xxhdpi"
+ variantFilter { variant ->
+ if (variant.buildType.name == "release") {
+ setIgnore(true)
+ }
+ }
+ } else {
+ resConfigs "en"
+ }
}
bundle {
@@ -24,7 +34,7 @@ android {
buildTypes {
debug {
- versionNameSuffix =" [debug]"
+ versionNameSuffix = " [debug]"
matchingFallbacks = ['release']
signingConfig.storeFile rootProject.file("tools/debug.keystore")
}
diff --git a/build.gradle b/build.gradle
index 7826dc6..252aaa0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -18,14 +18,16 @@ def launchTask = getGradle()
.getTaskRequests()
.toString()
.toLowerCase()
+def isReleaseBuild = launchTask.contains("release")
+ext.isDebugBuild = !isReleaseBuild
subprojects {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = [
- '-Xopt-in=kotlin.contracts.ExperimentalContracts',
- '-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi',
+ '-opt-in=kotlin.contracts.ExperimentalContracts',
+ '-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi',
]
}
}
@@ -52,7 +54,7 @@ ext.applyLibraryPlugins = { project ->
project.apply plugin: 'kotlin-android'
}
-ext.androidSdkVersion = 31
+ext.androidSdkVersion = 32
ext.applyCommonAndroidParameters = { project ->
def android = project.android
@@ -66,11 +68,6 @@ ext.applyCommonAndroidParameters = { project ->
minSdkVersion 24
targetSdkVersion androidSdkVersion
}
-
- android.buildFeatures.compose = true
- android.composeOptions {
- kotlinCompilerExtensionVersion = Dependencies.google.kotlinCompilerExtensionVersion
- }
}
ext.applyLibraryModuleOptimisations = { project ->
@@ -101,17 +98,26 @@ ext.applyCompose = { project ->
dependencies.implementation Dependencies.google.androidxComposeMaterial
dependencies.implementation Dependencies.google.androidxComposeIconsExtended
dependencies.implementation Dependencies.google.androidxActivityCompose
+
+ def android = project.android
+ android.buildFeatures.compose = true
+ android.composeOptions {
+ kotlinCompilerExtensionVersion = Dependencies.google.kotlinCompilerExtensionVersion
+ }
+}
+
+ext.applyAndroidComposeLibraryModule = { project ->
+ applyAndroidLibraryModule(project)
+ applyCompose(project)
}
ext.applyAndroidLibraryModule = { project ->
applyLibraryPlugins(project)
applyCommonAndroidParameters(project)
applyLibraryModuleOptimisations(project)
- applyCompose(project)
}
ext.applyCrashlyticsIfRelease = { project ->
- def isReleaseBuild = launchTask.contains("release")
if (isReleaseBuild) {
project.apply plugin: 'com.google.firebase.crashlytics'
project.afterEvaluate {
diff --git a/core/build.gradle b/core/build.gradle
index 23fca28..b573f32 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -4,7 +4,7 @@ plugins {
}
dependencies {
- implementation Dependencies.mavenCentral.kotlinCoroutinesCore
+ api Dependencies.mavenCentral.kotlinCoroutinesCore
testFixturesImplementation Dependencies.mavenCentral.kotlinCoroutinesCore
testFixturesImplementation Dependencies.mavenCentral.kluent
testFixturesImplementation Dependencies.mavenCentral.mockk
diff --git a/dependencies.gradle b/dependencies.gradle
index 981a591..2525b32 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -90,19 +90,19 @@ ext.Dependencies.with {
def kotlinVer = "1.6.10"
def sqldelightVer = "1.5.3"
- def composeVer = "1.1.0"
+ def composeVer = "1.1.1"
def ktorVer = "2.0.2"
google = new DependenciesContainer()
google.with {
- androidGradlePlugin = "com.android.tools.build:gradle:7.1.2"
+ androidGradlePlugin = "com.android.tools.build:gradle:7.2.1"
androidxComposeUi = "androidx.compose.ui:ui:${composeVer}"
androidxComposeFoundation = "androidx.compose.foundation:foundation:${composeVer}"
androidxComposeMaterial = "androidx.compose.material:material:${composeVer}"
androidxComposeIconsExtended = "androidx.compose.material:material-icons-extended:${composeVer}"
androidxActivityCompose = "androidx.activity:activity-compose:1.4.0"
- kotlinCompilerExtensionVersion = "1.1.0-rc02"
+ kotlinCompilerExtensionVersion = "${composeVer}"
}
mavenCentral = new DependenciesContainer()
diff --git a/design-library/build.gradle b/design-library/build.gradle
index aa3a0d4..578435a 100644
--- a/design-library/build.gradle
+++ b/design-library/build.gradle
@@ -1,4 +1,4 @@
-applyAndroidLibraryModule(project)
+applyAndroidComposeLibraryModule(project)
dependencies {
implementation project(":core")
diff --git a/domains/android/compose-core/build.gradle b/domains/android/compose-core/build.gradle
new file mode 100644
index 0000000..c79d69b
--- /dev/null
+++ b/domains/android/compose-core/build.gradle
@@ -0,0 +1,7 @@
+applyAndroidComposeLibraryModule(project)
+
+dependencies {
+ implementation project(":core")
+ implementation project(":features:navigator")
+ api project(":domains:android:core")
+}
diff --git a/domains/android/core/src/main/AndroidManifest.xml b/domains/android/compose-core/src/main/AndroidManifest.xml
similarity index 100%
rename from domains/android/core/src/main/AndroidManifest.xml
rename to domains/android/compose-core/src/main/AndroidManifest.xml
diff --git a/domains/android/core/src/main/kotlin/app/dapk/st/core/ActivityExtensions.kt b/domains/android/compose-core/src/main/kotlin/app/dapk/st/core/ActivityExtensions.kt
similarity index 100%
rename from domains/android/core/src/main/kotlin/app/dapk/st/core/ActivityExtensions.kt
rename to domains/android/compose-core/src/main/kotlin/app/dapk/st/core/ActivityExtensions.kt
diff --git a/domains/android/core/src/main/kotlin/app/dapk/st/core/ComposeExtensions.kt b/domains/android/compose-core/src/main/kotlin/app/dapk/st/core/ComposeExtensions.kt
similarity index 100%
rename from domains/android/core/src/main/kotlin/app/dapk/st/core/ComposeExtensions.kt
rename to domains/android/compose-core/src/main/kotlin/app/dapk/st/core/ComposeExtensions.kt
diff --git a/domains/android/core/src/main/kotlin/app/dapk/st/core/DapkActivity.kt b/domains/android/compose-core/src/main/kotlin/app/dapk/st/core/DapkActivity.kt
similarity index 100%
rename from domains/android/core/src/main/kotlin/app/dapk/st/core/DapkActivity.kt
rename to domains/android/compose-core/src/main/kotlin/app/dapk/st/core/DapkActivity.kt
diff --git a/domains/android/core/src/main/kotlin/app/dapk/st/core/components/Components.kt b/domains/android/compose-core/src/main/kotlin/app/dapk/st/core/components/Components.kt
similarity index 100%
rename from domains/android/core/src/main/kotlin/app/dapk/st/core/components/Components.kt
rename to domains/android/compose-core/src/main/kotlin/app/dapk/st/core/components/Components.kt
diff --git a/domains/android/core/build.gradle b/domains/android/core/build.gradle
index 896c7c4..054db34 100644
--- a/domains/android/core/build.gradle
+++ b/domains/android/core/build.gradle
@@ -1,6 +1,7 @@
-applyAndroidLibraryModule(project)
+plugins { id 'kotlin' }
dependencies {
+ compileOnly project(":domains:android:stub")
implementation project(":core")
implementation project(":features:navigator")
}
diff --git a/domains/android/stub/build.gradle b/domains/android/stub/build.gradle
index 8ee9c3d..4a7ad4a 100644
--- a/domains/android/stub/build.gradle
+++ b/domains/android/stub/build.gradle
@@ -13,6 +13,8 @@ if (localProperties.exists()) {
dependencies {
def androidVer = androidSdkVersion
+ api files("${properties.getProperty("sdk.dir")}/platforms/android-${androidVer}/android.jar")
+
kotlinFixtures(it)
testFixturesImplementation testFixtures(project(":core"))
testFixturesImplementation files("${properties.getProperty("sdk.dir")}/platforms/android-${androidVer}/android.jar")
diff --git a/domains/android/work/build.gradle b/domains/android/work/build.gradle
index ee78269..74a5b71 100644
--- a/domains/android/work/build.gradle
+++ b/domains/android/work/build.gradle
@@ -1,6 +1,7 @@
-applyAndroidLibraryModule(project)
+plugins { id 'kotlin' }
dependencies {
+ compileOnly project(":domains:android:stub")
implementation project(':core')
implementation project(':domains:android:core')
}
diff --git a/features/directory/build.gradle b/features/directory/build.gradle
index f51aaab..b005881 100644
--- a/features/directory/build.gradle
+++ b/features/directory/build.gradle
@@ -1,10 +1,10 @@
-applyAndroidLibraryModule(project)
+applyAndroidComposeLibraryModule(project)
dependencies {
implementation project(":matrix:services:sync")
implementation project(":matrix:services:message")
implementation project(":matrix:services:room")
- implementation project(":domains:android:core")
+ implementation project(":domains:android:compose-core")
implementation project(":domains:android:viewmodel")
implementation project(":features:messenger")
implementation project(":core")
diff --git a/features/home/build.gradle b/features/home/build.gradle
index 0c30581..5507d8c 100644
--- a/features/home/build.gradle
+++ b/features/home/build.gradle
@@ -1,4 +1,4 @@
-applyAndroidLibraryModule(project)
+applyAndroidComposeLibraryModule(project)
dependencies {
implementation project(":matrix:services:profile")
@@ -7,7 +7,7 @@ dependencies {
implementation project(":features:login")
implementation project(":features:settings")
implementation project(":features:profile")
- implementation project(":domains:android:core")
+ implementation project(":domains:android:compose-core")
implementation project(":domains:android:viewmodel")
implementation project(':domains:store')
implementation project(":core")
diff --git a/features/login/build.gradle b/features/login/build.gradle
index 0913f47..3a3af95 100644
--- a/features/login/build.gradle
+++ b/features/login/build.gradle
@@ -1,7 +1,7 @@
-applyAndroidLibraryModule(project)
+applyAndroidComposeLibraryModule(project)
dependencies {
- implementation project(":domains:android:core")
+ implementation project(":domains:android:compose-core")
implementation project(":domains:android:push")
implementation project(":domains:android:viewmodel")
implementation project(":matrix:services:auth")
diff --git a/features/messenger/build.gradle b/features/messenger/build.gradle
index 21b929f..4603773 100644
--- a/features/messenger/build.gradle
+++ b/features/messenger/build.gradle
@@ -1,11 +1,11 @@
-applyAndroidLibraryModule(project)
+applyAndroidComposeLibraryModule(project)
apply plugin: 'kotlin-parcelize'
dependencies {
implementation project(":matrix:services:sync")
implementation project(":matrix:services:message")
implementation project(":matrix:services:room")
- implementation project(":domains:android:core")
+ implementation project(":domains:android:compose-core")
implementation project(":domains:android:viewmodel")
implementation project(":core")
implementation project(":features:navigator")
diff --git a/features/navigator/build.gradle b/features/navigator/build.gradle
index 06e2a88..d8faab7 100644
--- a/features/navigator/build.gradle
+++ b/features/navigator/build.gradle
@@ -1,7 +1,8 @@
-applyAndroidLibraryModule(project)
+plugins { id 'kotlin' }
apply plugin: 'kotlin-parcelize'
dependencies {
+ compileOnly project(":domains:android:stub")
implementation project(":core")
implementation project(":matrix:common")
}
\ No newline at end of file
diff --git a/features/navigator/src/main/AndroidManifest.xml b/features/navigator/src/main/AndroidManifest.xml
deleted file mode 100644
index 9926105..0000000
--- a/features/navigator/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/features/profile/build.gradle b/features/profile/build.gradle
index 1e02634..6a2f7b0 100644
--- a/features/profile/build.gradle
+++ b/features/profile/build.gradle
@@ -1,4 +1,4 @@
-applyAndroidLibraryModule(project)
+applyAndroidComposeLibraryModule(project)
dependencies {
implementation project(":matrix:services:sync")
@@ -6,7 +6,7 @@ dependencies {
implementation project(":matrix:services:profile")
implementation project(":features:settings")
implementation project(':domains:store')
- implementation project(":domains:android:core")
+ implementation project(":domains:android:compose-core")
implementation project(":domains:android:viewmodel")
implementation project(":design-library")
implementation project(":core")
diff --git a/features/settings/build.gradle b/features/settings/build.gradle
index 4a91dc2..c3dac7e 100644
--- a/features/settings/build.gradle
+++ b/features/settings/build.gradle
@@ -1,11 +1,11 @@
-applyAndroidLibraryModule(project)
+applyAndroidComposeLibraryModule(project)
dependencies {
implementation project(":matrix:services:sync")
implementation project(":matrix:services:crypto")
implementation project(":features:navigator")
implementation project(':domains:store')
- implementation project(":domains:android:core")
+ implementation project(":domains:android:compose-core")
implementation project(":domains:android:viewmodel")
implementation project(":design-library")
implementation project(":core")
diff --git a/features/verification/build.gradle b/features/verification/build.gradle
index 8a489fc..989463e 100644
--- a/features/verification/build.gradle
+++ b/features/verification/build.gradle
@@ -1,8 +1,8 @@
-applyAndroidLibraryModule(project)
+applyAndroidComposeLibraryModule(project)
dependencies {
implementation project(":matrix:services:crypto")
- implementation project(":domains:android:core")
+ implementation project(":domains:android:compose-core")
implementation project(":domains:android:viewmodel")
implementation project(":design-library")
implementation project(":core")
diff --git a/matrix/services/crypto/src/main/kotlin/app/dapk/st/matrix/crypto/internal/VerificationHandler.kt b/matrix/services/crypto/src/main/kotlin/app/dapk/st/matrix/crypto/internal/VerificationHandler.kt
index 035709f..47d6594 100644
--- a/matrix/services/crypto/src/main/kotlin/app/dapk/st/matrix/crypto/internal/VerificationHandler.kt
+++ b/matrix/services/crypto/src/main/kotlin/app/dapk/st/matrix/crypto/internal/VerificationHandler.kt
@@ -182,6 +182,9 @@ internal class VerificationHandler(
sendToDevice(ToDevicePayload.VerificationDone(verificationTransaction.transactionId))
stateFlow.emit(Verification.State.Done)
}
+ is Verification.Event.Done -> {
+ // TODO
+ }
}
}
diff --git a/settings.gradle b/settings.gradle
index e8b1af8..d457b3a 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -23,6 +23,7 @@ include ':features:share-entry'
include ':domains:android:stub'
include ':domains:android:core'
+include ':domains:android:compose-core'
include ':domains:android:imageloader'
include ':domains:android:work'
include ':domains:android:tracking'
diff --git a/test-harness/src/test/kotlin/SmokeTest.kt b/test-harness/src/test/kotlin/SmokeTest.kt
index b4831e3..5ed1bae 100644
--- a/test-harness/src/test/kotlin/SmokeTest.kt
+++ b/test-harness/src/test/kotlin/SmokeTest.kt
@@ -172,5 +172,8 @@ fun testAfterInitialSync(block: suspend MatrixTestScope.(TestMatrix, TestMatrix)
private fun Flow.automaticVerification(testMatrix: TestMatrix) = this.onEach {
when (it) {
is Verification.State.WaitingForMatchConfirmation -> testMatrix.client.cryptoService().verificationAction(Verification.Action.AcknowledgeMatch)
+ else -> {
+ // do nothing
+ }
}
}
\ No newline at end of file
diff --git a/tools/coverage.gradle b/tools/coverage.gradle
index 6138a33..15d22bd 100644
--- a/tools/coverage.gradle
+++ b/tools/coverage.gradle
@@ -28,7 +28,7 @@ def excludes = [
def initializeReport(report, projects, classExcludes) {
projects.each { project -> project.apply plugin: 'jacoco' }
- report.executionData { fileTree(rootProject.rootDir.absolutePath).include("**/build/jacoco/*.exec") }
+ report.executionData { fileTree(rootProject.rootDir.absolutePath).include("**/build/**/*.exec") }
report.reports {
xml.enabled true