Skip to content

Commit bbb2008

Browse files
committed
chore: bump dependency versions
1 parent d78cf98 commit bbb2008

File tree

18 files changed

+176
-89
lines changed

18 files changed

+176
-89
lines changed

build.gradle.kts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ buildscript {
66
jcenter()
77
}
88
dependencies {
9-
classpath("com.android.tools.build:gradle:4.0.0")
10-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72")
9+
classpath("com.android.tools.build:gradle:$androidToolsBuildVersion")
10+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
1111
}
1212
}
1313

@@ -22,6 +22,9 @@ allprojects {
2222
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.ExperimentalStdlibApi"
2323
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
2424
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlinx.coroutines.FlowPreview"
25+
kotlinOptions.freeCompilerArgs += "-Xallow-jvm-ir-dependencies"
26+
27+
kotlinOptions.jvmTarget = "1.8"
2528
}
2629
}
2730

buildSrc/build.gradle.kts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
1+
@file:Suppress("HasPlatformType")
2+
3+
import java.util.Properties
4+
15
plugins {
26
`kotlin-dsl`
37
`kotlin-dsl-precompiled-script-plugins`
48
}
59

610
repositories {
711
google()
8-
jcenter()
12+
jcenter()
913
}
1014

15+
private val properties = Properties().apply { File("gradle.properties").inputStream().use { load(it) } }
16+
17+
val androidToolsBuildVersion = properties.getProperty("androidToolsBuildVersion")
18+
val kotlinVersion = properties.getProperty("kotlinVersion")
19+
1120
dependencies {
12-
implementation("com.android.tools.build:gradle:4.0.0")
13-
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72")
21+
implementation("com.android.tools.build:gradle:$androidToolsBuildVersion")
22+
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
1423
}

buildSrc/gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gradle.properties
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
@file:Suppress("HasPlatformType")
2+
3+
import java.io.File
4+
import java.util.Properties
5+
6+
private val properties = Properties().apply { File("gradle.properties").inputStream().use { load(it) } }
7+
8+
// Versions
9+
val androidToolsBuildVersion = properties.getProperty("androidToolsBuildVersion")
10+
val androidxActivityVersion = properties.getProperty("androidxActivityVersion")
11+
val androidxAppcompatVersion = properties.getProperty("androidxAppcompatVersion")
12+
val androidxConstraintLayoutVersion = properties.getProperty("androidxConstraintLayoutVersion")
13+
val androidxCoreVersion = properties.getProperty("androidxCoreVersion")
14+
val androidxDynamicAnimationVersion = properties.getProperty("androidxDynamicAnimationVersion")
15+
val androidxEspressoVersion = properties.getProperty("androidxEspressoVersion")
16+
val androidxJunitVersion = properties.getProperty("androidxJunitVersion")
17+
val androidxLifecycleVersion = properties.getProperty("androidxLifecycleVersion")
18+
val androidxRecyclerviewVersion = properties.getProperty("androidxRecyclerviewVersion")
19+
val arrowVersion = properties.getProperty("arrowVersion")
20+
val coroutinesVersion = properties.getProperty("coroutinesVersion")
21+
val junitVersion = properties.getProperty("junitVersion")
22+
val kotlinComposeVersion = properties.getProperty("kotlinComposeVersion")
23+
val kotlinVersion = properties.getProperty("kotlinVersion")
24+
val moshiVersion = properties.getProperty("moshiVersion")
25+
val okhttpVersion = properties.getProperty("okhttpVersion")
26+
val retrofitVersion = properties.getProperty("retrofitVersion")
27+
28+
// Android
29+
val androidCompileSdkVersion = properties.getProperty("androidCompileSdkVersion").toInt()
30+
val androidMinSdkVersion = properties.getProperty("androidMinSdkVersion").toInt()
31+
val androidTargetSdkVersion = properties.getProperty("androidTargetSdkVersion").toInt()

buildSrc/src/main/kotlin/shared-android.gradle.kts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
plugins {
22
id("com.android.application")
33
id("kotlin-android")
4-
id("kotlin-android-extensions")
54
id("kotlin-kapt")
65
}
76

87
android {
9-
compileSdkVersion(29)
8+
compileSdkVersion(androidCompileSdkVersion)
109

1110
defaultConfig {
12-
minSdkVersion(28)
13-
targetSdkVersion(29)
11+
minSdkVersion(androidMinSdkVersion)
12+
targetSdkVersion(androidTargetSdkVersion)
1413
versionCode = 1
1514
versionName = "0.1.0"
1615
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -32,6 +31,7 @@ android {
3231
}
3332
}
3433

34+
@Suppress("UnstableApiUsage")
3535
compileOptions {
3636
kotlinOptions {
3737
jvmTarget = "1.8"
@@ -44,19 +44,19 @@ android {
4444
}
4545

4646
dependencies {
47-
androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0")
48-
androidTestImplementation("androidx.test.ext:junit:1.1.1")
49-
implementation("androidx.activity:activity-ktx:1.2.0-alpha06")
50-
implementation("androidx.appcompat:appcompat:1.1.0")
51-
implementation("androidx.constraintlayout:constraintlayout:2.0.0-beta6")
52-
implementation("androidx.core:core-ktx:1.3.0")
53-
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.3.0-alpha04")
54-
implementation("androidx.recyclerview:recyclerview:1.1.0")
55-
implementation("io.arrow-kt:arrow-optics:0.10.5")
47+
androidTestImplementation("androidx.test.espresso:espresso-core:$androidxEspressoVersion")
48+
androidTestImplementation("androidx.test.ext:junit:$androidxJunitVersion")
49+
implementation("androidx.activity:activity-ktx:$androidxActivityVersion")
50+
implementation("androidx.appcompat:appcompat:$androidxAppcompatVersion")
51+
implementation("androidx.constraintlayout:constraintlayout:$androidxConstraintLayoutVersion")
52+
implementation("androidx.core:core-ktx:$androidxCoreVersion")
53+
implementation("androidx.lifecycle:lifecycle-runtime-ktx:$androidxLifecycleVersion")
54+
implementation("androidx.recyclerview:recyclerview:$androidxRecyclerviewVersion")
55+
implementation("io.arrow-kt:arrow-optics:$arrowVersion")
5656
implementation(project(":composable-architecture"))
5757
implementation(project(":composable-architecture-android"))
58-
kapt("io.arrow-kt:arrow-meta:0.10.5")
59-
testImplementation("junit:junit:4.13")
60-
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.7")
58+
kapt("io.arrow-kt:arrow-meta:$arrowVersion")
59+
testImplementation("junit:junit:$junitVersion")
60+
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion")
6161
testImplementation(project(":composable-architecture-test"))
6262
}

composable-architecture-android/build.gradle.kts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,13 @@ plugins {
44
}
55

66
android {
7-
compileSdkVersion(29)
8-
compileOptions {
9-
kotlinOptions {
10-
jvmTarget = "1.8"
11-
}
12-
}
7+
compileSdkVersion(androidCompileSdkVersion)
138
sourceSets["main"].java.srcDir("src/main/kotlin")
149
}
1510

1611
dependencies {
17-
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.2.0")
18-
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0")
19-
implementation("io.arrow-kt:arrow-optics:0.10.5")
12+
implementation("androidx.lifecycle:lifecycle-livedata-ktx:$androidxLifecycleVersion")
13+
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$androidxLifecycleVersion")
14+
implementation("io.arrow-kt:arrow-optics:$arrowVersion")
2015
implementation(project(":composable-architecture"))
2116
}

composable-architecture-test/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ plugins {
33
}
44

55
dependencies {
6-
implementation("io.arrow-kt:arrow-optics:0.10.5")
7-
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.3.72")
8-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.7")
6+
implementation("io.arrow-kt:arrow-optics:$arrowVersion")
7+
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion")
8+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion")
99
implementation(project(":composable-architecture"))
1010
}

composable-architecture/build.gradle.kts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ plugins {
44
}
55

66
dependencies {
7-
implementation("io.arrow-kt:arrow-optics:0.10.5")
8-
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.3.72")
9-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7")
10-
kaptTest("io.arrow-kt:arrow-meta:0.10.5")
11-
testImplementation("com.squareup.moshi:moshi-kotlin:1.9.2")
12-
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.7")
7+
implementation("io.arrow-kt:arrow-optics:$arrowVersion")
8+
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion")
9+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
10+
kaptTest("io.arrow-kt:arrow-meta:$arrowVersion")
11+
testImplementation("com.squareup.moshi:moshi-kotlin:$moshiVersion")
12+
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion")
1313
testImplementation(project(":composable-architecture-test"))
1414
}

composable-architecture/src/main/kotlin/composablearchitecture/Store.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ class Store<State, Action> private constructor(
6464
}
6565

6666
fun send(action: Action) {
67-
require(Thread.currentThread().name.startsWith("main")) {
67+
val currentThread = Thread.currentThread()
68+
require(
69+
currentThread.name.startsWith("main") || currentThread.name.contains("Test worker")
70+
) {
6871
"Sending actions from background threads is not allowed"
6972
}
7073

examples/case-studies/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ android {
99
}
1010

1111
dependencies {
12-
implementation("androidx.dynamicanimation:dynamicanimation:1.0.0")
12+
implementation("androidx.dynamicanimation:dynamicanimation:$androidxDynamicAnimationVersion")
1313
}

0 commit comments

Comments
 (0)