prepping for kotlin 1.7.0 release, removing compose from modules that don't need it

This commit is contained in:
Adam Brown 2022-06-11 13:29:47 +01:00
parent 716790712b
commit 4a0d2cd42d
14 changed files with 31 additions and 20 deletions

View File

@ -24,8 +24,8 @@ subprojects {
kotlinOptions { kotlinOptions {
jvmTarget = "1.8" jvmTarget = "1.8"
freeCompilerArgs = [ freeCompilerArgs = [
'-Xopt-in=kotlin.contracts.ExperimentalContracts', '-opt-in=kotlin.contracts.ExperimentalContracts',
'-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi', '-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi',
] ]
} }
} }
@ -52,7 +52,7 @@ ext.applyLibraryPlugins = { project ->
project.apply plugin: 'kotlin-android' project.apply plugin: 'kotlin-android'
} }
ext.androidSdkVersion = 31 ext.androidSdkVersion = 32
ext.applyCommonAndroidParameters = { project -> ext.applyCommonAndroidParameters = { project ->
def android = project.android def android = project.android
@ -66,11 +66,6 @@ ext.applyCommonAndroidParameters = { project ->
minSdkVersion 24 minSdkVersion 24
targetSdkVersion androidSdkVersion targetSdkVersion androidSdkVersion
} }
android.buildFeatures.compose = true
android.composeOptions {
kotlinCompilerExtensionVersion = Dependencies.google.kotlinCompilerExtensionVersion
}
} }
ext.applyLibraryModuleOptimisations = { project -> ext.applyLibraryModuleOptimisations = { project ->
@ -101,13 +96,23 @@ ext.applyCompose = { project ->
dependencies.implementation Dependencies.google.androidxComposeMaterial dependencies.implementation Dependencies.google.androidxComposeMaterial
dependencies.implementation Dependencies.google.androidxComposeIconsExtended dependencies.implementation Dependencies.google.androidxComposeIconsExtended
dependencies.implementation Dependencies.google.androidxActivityCompose 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 -> ext.applyAndroidLibraryModule = { project ->
applyLibraryPlugins(project) applyLibraryPlugins(project)
applyCommonAndroidParameters(project) applyCommonAndroidParameters(project)
applyLibraryModuleOptimisations(project) applyLibraryModuleOptimisations(project)
applyCompose(project)
} }
ext.applyCrashlyticsIfRelease = { project -> ext.applyCrashlyticsIfRelease = { project ->

View File

@ -4,7 +4,7 @@ plugins {
} }
dependencies { dependencies {
implementation Dependencies.mavenCentral.kotlinCoroutinesCore api Dependencies.mavenCentral.kotlinCoroutinesCore
testFixturesImplementation Dependencies.mavenCentral.kotlinCoroutinesCore testFixturesImplementation Dependencies.mavenCentral.kotlinCoroutinesCore
testFixturesImplementation Dependencies.mavenCentral.kluent testFixturesImplementation Dependencies.mavenCentral.kluent
testFixturesImplementation Dependencies.mavenCentral.mockk testFixturesImplementation Dependencies.mavenCentral.mockk

View File

@ -90,7 +90,7 @@ ext.Dependencies.with {
def kotlinVer = "1.6.10" def kotlinVer = "1.6.10"
def sqldelightVer = "1.5.3" def sqldelightVer = "1.5.3"
def composeVer = "1.1.0" def composeVer = "1.1.1"
def ktorVer = "2.0.2" def ktorVer = "2.0.2"
google = new DependenciesContainer() google = new DependenciesContainer()

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
applyAndroidLibraryModule(project) applyAndroidComposeLibraryModule(project)
apply plugin: 'kotlin-parcelize' apply plugin: 'kotlin-parcelize'
dependencies { dependencies {

View File

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

View File

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

View File

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

View File

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

View File

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