Skip to content

Commit 34bc04e

Browse files
committed
doc: modify README.md file with CHANGELOG notes
1 parent 2f9935b commit 34bc04e

File tree

4 files changed

+16
-27
lines changed

4 files changed

+16
-27
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
# Android - Clean Architecture - Kotlin [![Build Status](https://travis-ci.org/android10/Android-CleanArchitecture-Kotlin.svg?branch=main)](https://travis-ci.org/android10/Android-CleanArchitecture-Kotlin) [![codecov](https://codecov.io/gh/android10/Android-CleanArchitecture-Kotlin/branch/main/graph/badge.svg?token=x1AtDcNuDv)](https://codecov.io/gh/android10/Android-CleanArchitecture-Kotlin)
44
The purpose of this repo is to follow up Clean Architecture principles by bringing them to Android. It is worth saying that the idea is to take advantage of the Kotlin Programming Language features plus also pull in lessons learned and ideas from other interesting approaches like Functional Programming.
55

6+
## Project Status
7+
8+
- **Last Update 2024.08**
9+
- Migrated to Kotlin 2.0.
10+
- Migrated to Jetpack Compose.
11+
- Bug Fixes.
12+
613
## Blog post with implementation details explanation:
714
[Architecting Android… Reloaded](https://fernandocejas.com/2018/05/07/architecting-android-reloaded/)
815

app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ dependencies {
7575
// implementation(libs.kotlin.compose.compiler.plugin)
7676

7777
// Application dependencies
78-
implementation(libs.kotlin.stdlib.jdk8)
78+
implementation(libs.kotlin.stdlib)
7979
implementation(libs.kotlinx.coroutines.core)
8080
implementation(libs.kotlinx.coroutines.android)
8181
implementation(libs.koin.android)

app/src/main/kotlin/com/fernandocejas/sample/features/movies/ui/MoviesActivity.kt

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,31 +34,13 @@ class MoviesActivity : AppCompatActivity() {
3434
setContentView(R.layout.test_layout)
3535
}
3636

37-
fun testString() {
38-
var stringInput: String? = null
39-
// stringInput is smart-cast to String type
40-
stringInput = ""
41-
try {
42-
// The compiler knows that stringInput isn't null
43-
println(stringInput.length)
44-
// 0
37+
private fun testKotlinTwo() {
4538

46-
// The compiler rejects previous smart cast information for
47-
// stringInput. Now stringInput has the String? type.
48-
stringInput = null
49-
50-
// Trigger an exception
51-
if (2 > 1) throw Exception()
52-
stringInput = ""
53-
} catch (exception: Exception) {
54-
// In Kotlin 2.0.0, the compiler knows stringInput
55-
// can be null, so stringInput stays nullable.
56-
println(stringInput?.length)
57-
// null
58-
59-
// In Kotlin 1.9.20, the compiler says that a safe call isn't
60-
// needed, but this is incorrect.
61-
}
6239
}
6340
}
6441

42+
fun <T> List<T>.secondOrNull(): T? = if (this.size > 1) this[1] else null
43+
44+
val numbers = listOf(1, 2, 3)
45+
val secondNumber = numbers.secondOrNull() // Type inferred as Int?
46+

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ compileSdk = "34"
44
minSdk = "30"
55
targetSdk = "34"
66
# kotlin ---------
7-
kotlin = "2.0.0"
7+
kotlin = "2.0.10"
88
kotlinCoroutines = "1.7.3"
99
# android --------
1010
ksp = "2.0.0-1.0.21"
@@ -40,7 +40,7 @@ androidGradlePlugin = "8.5.1"
4040

4141
[libraries]
4242
# kotlin dependencies ---
43-
kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
43+
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
4444
kotlin-compose-compiler-plugin-embeddable = { module = "org.jetbrains.kotlin:kotlin-compose-compiler-plugin-embeddable", version.ref = "kotlin" }
4545
kotlin-compose-compiler-plugin = { module = "org.jetbrains.kotlin:kotlin-compose-compiler-plugin", version.ref = "kotlin" }
4646
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinCoroutines" }

0 commit comments

Comments
 (0)