Skip to content

Commit bf3d0c9

Browse files
committed
Set up kotlin, compose and material3
1 parent f997b10 commit bf3d0c9

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
/captures
1010
/projectFilesBackup*
1111
/keystore.properties
12+
/.kotlin

app/build.gradle.kts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import java.io.FileInputStream
44
plugins {
55
alias(libs.plugins.android.application)
66
alias(libs.plugins.unmock)
7+
alias(libs.plugins.kotlin.android)
8+
alias(libs.plugins.kotlin.compose)
79
}
810

911
// Place actual signing configuration in "keystore.properties"
@@ -74,9 +76,14 @@ android {
7476
targetCompatibility = JavaVersion.VERSION_11
7577
}
7678

79+
kotlinOptions {
80+
jvmTarget = "11"
81+
}
82+
7783
buildFeatures {
7884
viewBinding = true
7985
buildConfig = true
86+
compose = true
8087
}
8188

8289
lint {
@@ -99,7 +106,10 @@ dependencies {
99106
implementation(libs.okhttp)
100107
implementation(libs.typed.preferences)
101108
implementation(libs.material)
109+
implementation(libs.androidx.ui.tooling.preview)
110+
implementation(libs.androidx.material3)
102111
implementation(libs.androidx.core)
112+
implementation(libs.androidx.core.ktx)
103113
implementation(libs.androidx.appcompat)
104114
implementation(libs.androidx.annotation)
105115
implementation(libs.androidx.exifinterface)
@@ -109,6 +119,7 @@ dependencies {
109119
annotationProcessor(libs.dagger.compiler)
110120

111121
debugImplementation(libs.leakcanary)
122+
debugImplementation(libs.androidx.ui.tooling)
112123

113124
testImplementation(libs.junit)
114125
testImplementation(libs.com.google.truth)

build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
plugins {
22
alias(libs.plugins.android.application) apply false
33
alias(libs.plugins.unmock) apply false
4+
alias(libs.plugins.kotlin.android) apply false
5+
alias(libs.plugins.kotlin.compose) apply false
46
}

gradle/libs.versions.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ timber = "5.0.1"
77
okhttp = "5.3.2"
88
typedPreferences = "2.1.0"
99
material = "1.13.0"
10+
material3 = "1.4.0"
1011
core = "1.17.0"
1112
appcompat = "1.7.1"
1213
annotation = "1.9.1"
@@ -22,6 +23,9 @@ androidTest = "1.7.0"
2223
espressoCore = "3.7.0"
2324
agp = "8.13.2"
2425
unmock = "0.9.0"
26+
kotlin = "2.2.21"
27+
uiToolingPreview = "1.9.4"
28+
uiTooling = "1.9.4"
2529

2630
[libraries]
2731
otto = { group = "com.squareup", name = "otto", version.ref = "otto" }
@@ -31,7 +35,9 @@ timber = { group = "com.jakewharton.timber", name = "timber", version.ref = "tim
3135
okhttp = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" }
3236
typed-preferences = { group = "info.metadude.android", name = "typed-preferences", version.ref = "typedPreferences" }
3337
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
38+
androidx-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "material3" }
3439
androidx-core = { group = "androidx.core", name = "core", version.ref = "core" }
40+
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "core" }
3541
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
3642
androidx-annotation = { group = "androidx.annotation", name = "annotation", version.ref = "annotation" }
3743
androidx-exifinterface = { group = "androidx.exifinterface", name = "exifinterface", version.ref = "exifinterface" }
@@ -47,7 +53,11 @@ androidx-test-core = { group = "androidx.test", name = "core", version.ref = "an
4753
androidx-test-runner = { group = "androidx.test", name = "runner", version.ref = "androidTest" }
4854
androidx-test-rules = { group = "androidx.test", name = "rules", version.ref = "androidTest" }
4955
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
56+
androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview", version.ref = "uiToolingPreview" }
57+
androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling", version.ref = "uiTooling" }
5058

5159
[plugins]
5260
android-application = { id = "com.android.application", version.ref = "agp" }
53-
unmock = {id = "de.mobilej.unmock", version.ref= "unmock"}
61+
unmock = {id = "de.mobilej.unmock", version.ref= "unmock"}
62+
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
63+
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

0 commit comments

Comments
 (0)