Skip to content

Commit

Permalink
fix(deps): Update Kotlin to 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
sdsantos committed Nov 29, 2023
1 parent d718ec6 commit 6818847
Show file tree
Hide file tree
Showing 49 changed files with 2,932 additions and 2,571 deletions.
8 changes: 4 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# http://editorconfig.org
root = true

[*.{kt,kts}]
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 100

[*.{kt,kts}]
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
ext {
kotlinVersion = '1.8.21'
kotlinVersion = '1.9.21'
kotlinCoroutinesVersion = '1.7.3'
}
repositories {
Expand All @@ -9,7 +9,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:8.1.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath("org.jetbrains.dokka:dokka-core:1.9.10")
classpath 'org.jetbrains.dokka:dokka-core:1.9.10'
}
}

Expand Down
10 changes: 5 additions & 5 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ plugins {
id 'kotlin-android'
id 'kotlin-kapt'
id 'maven-publish'
id 'org.jlleitschuh.gradle.ktlint' version "11.5.0"
id 'org.jlleitschuh.gradle.ktlint' version "11.6.1"
id 'org.jetbrains.dokka' version "1.9.10"
}

apply from: 'jacoco.gradle'

android {
compileSdk 33
compileSdk 34

defaultConfig {
minSdk 23
targetSdk 33
targetSdk 34
versionCode 1
versionName "1.0.0"
namespace 'tech.relaycorp.awaladroid'
Expand Down Expand Up @@ -60,7 +60,7 @@ android {

dependencies {
// Java 8
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'

// Kotlin
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion"
Expand Down Expand Up @@ -123,7 +123,7 @@ dokkaHtml.configure {
ktlint {
verbose = true
android = true
version = "0.50.0"
version = "1.0.1"
}

afterEvaluate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ internal class AndroidPrivateKeyStore(
.build()
},
) : FilePrivateKeyStore(root) {

@Throws(EncryptionInitializationException::class)
override fun makeEncryptedInputStream(file: File) = buildEncryptedFile(file).openFileInput()

Expand Down
24 changes: 13 additions & 11 deletions lib/src/main/java/tech/relaycorp/awaladroid/Awala.kt
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,21 @@ public object Awala {

internal var contextDeferred: CompletableDeferred<AwalaContext> = CompletableDeferred()

internal fun getContextOrThrow(): AwalaContext = try {
contextDeferred.getCompleted()
} catch (e: IllegalStateException) {
throw SetupPendingException()
}
internal fun getContextOrThrow(): AwalaContext =
try {
contextDeferred.getCompleted()
} catch (e: IllegalStateException) {
throw SetupPendingException()
}

internal suspend fun awaitContextOrThrow(timeout: Duration = 3.seconds): AwalaContext = try {
withTimeout(timeout) {
contextDeferred.await()
internal suspend fun awaitContextOrThrow(timeout: Duration = 3.seconds): AwalaContext =
try {
withTimeout(timeout) {
contextDeferred.await()
}
} catch (e: TimeoutCancellationException) {
throw SetupPendingException()
}
} catch (e: TimeoutCancellationException) {
throw SetupPendingException()
}
}

/**
Expand Down
Loading

0 comments on commit 6818847

Please sign in to comment.