Merge branch 'main' into feature/share-images-via-small-talk

This commit is contained in:
Adam Brown 2022-06-11 19:11:45 +01:00
commit e9ad0b4a64
27 changed files with 70 additions and 37 deletions

View File

@ -13,8 +13,18 @@ android {
def versionJson = new groovy.json.JsonSlurper().parseText(rootProject.file('version.json').text)
versionCode versionJson.code
versionName versionJson.name
if (isDebugBuild) {
resConfigs "en", "xxhdpi"
variantFilter { variant ->
if (variant.buildType.name == "release") {
setIgnore(true)
}
}
} else {
resConfigs "en"
}
}
bundle {
abi.enableSplit true
@ -24,7 +34,7 @@ android {
buildTypes {
debug {
versionNameSuffix =" [debug]"
versionNameSuffix = " [debug]"
matchingFallbacks = ['release']
signingConfig.storeFile rootProject.file("tools/debug.keystore")
}

View File

@ -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 {

View File

@ -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

View File

@ -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()

View File

@ -1,4 +1,4 @@
applyAndroidLibraryModule(project)
applyAndroidComposeLibraryModule(project)
dependencies {
implementation project(":core")

View File

@ -0,0 +1,7 @@
applyAndroidComposeLibraryModule(project)
dependencies {
implementation project(":core")
implementation project(":features:navigator")
api project(":domains:android:core")
}

View File

@ -1,6 +1,7 @@
applyAndroidLibraryModule(project)
plugins { id 'kotlin' }
dependencies {
compileOnly project(":domains:android:stub")
implementation project(":core")
implementation project(":features:navigator")
}

View File

@ -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")

View File

@ -1,6 +1,7 @@
applyAndroidLibraryModule(project)
plugins { id 'kotlin' }
dependencies {
compileOnly project(":domains:android:stub")
implementation project(':core')
implementation project(':domains:android:core')
}

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")
}

View File

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="app.dapk.st.navigator"/>

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -182,6 +182,9 @@ internal class VerificationHandler(
sendToDevice(ToDevicePayload.VerificationDone(verificationTransaction.transactionId))
stateFlow.emit(Verification.State.Done)
}
is Verification.Event.Done -> {
// TODO
}
}
}

View File

@ -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'

View File

@ -172,5 +172,8 @@ fun testAfterInitialSync(block: suspend MatrixTestScope.(TestMatrix, TestMatrix)
private fun Flow<Verification.State>.automaticVerification(testMatrix: TestMatrix) = this.onEach {
when (it) {
is Verification.State.WaitingForMatchConfirmation -> testMatrix.client.cryptoService().verificationAction(Verification.Action.AcknowledgeMatch)
else -> {
// do nothing
}
}
}

View File

@ -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