1
1
apply plugin : ' com.android.application'
2
2
apply plugin : ' kotlin-android'
3
3
apply plugin : ' kotlin-kapt'
4
- apply plugin : " androidx.navigation.safeargs.kotlin"
5
4
6
5
android {
7
6
compileSdkVersion rootProject. compileSdkVersion
@@ -77,6 +76,10 @@ android {
77
76
}
78
77
}
79
78
79
+ buildFeatures {
80
+ compose true
81
+ }
82
+
80
83
dataBinding {
81
84
enabled = true
82
85
enabledForTests = true
@@ -95,6 +98,10 @@ android {
95
98
exclude ' META-INF/AL2.0'
96
99
exclude ' META-INF/LGPL2.1'
97
100
}
101
+
102
+ composeOptions {
103
+ kotlinCompilerExtensionVersion " $composeVersion "
104
+ }
98
105
}
99
106
100
107
/*
@@ -104,14 +111,9 @@ android {
104
111
dependencies {
105
112
106
113
// App dependencies
107
- implementation " androidx.appcompat:appcompat:$appCompatVersion "
108
- implementation " androidx.cardview:cardview:$cardVersion "
109
- implementation " com.google.android.material:material:$materialVersion "
110
- implementation " androidx.recyclerview:recyclerview:$recyclerViewVersion "
111
114
implementation " androidx.annotation:annotation:$androidXAnnotations "
112
115
implementation " org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion "
113
116
implementation " com.jakewharton.timber:timber:$timberVersion "
114
- implementation " androidx.legacy:legacy-support-v4:$androidXLegacySupport "
115
117
implementation " androidx.test.espresso:espresso-idling-resource:$espressoVersion "
116
118
implementation " androidx.room:room-runtime:$roomVersion "
117
119
kapt " androidx.room:room-compiler:$roomVersion "
@@ -122,8 +124,19 @@ dependencies {
122
124
implementation " androidx.room:room-ktx:$roomVersion "
123
125
implementation " androidx.lifecycle:lifecycle-viewmodel-ktx:$archLifecycleVersion "
124
126
implementation " androidx.lifecycle:lifecycle-livedata-ktx:$archLifecycleVersion "
125
- implementation " androidx.navigation:navigation-fragment-ktx:$navigationVersion "
126
- implementation " androidx.navigation:navigation-ui-ktx:$navigationVersion "
127
+
128
+ // Jetpack Compose
129
+ implementation " androidx.activity:activity-compose:$activityComposeVersion "
130
+ implementation " androidx.compose.material:material:$composeVersion "
131
+ implementation " androidx.compose.animation:animation:$composeVersion "
132
+ implementation " androidx.compose.ui:ui-tooling-preview:$composeVersion "
133
+ implementation " androidx.compose.runtime:runtime-livedata:$composeVersion "
134
+ implementation " androidx.navigation:navigation-compose:$navigationVersion "
135
+ implementation " androidx.lifecycle:lifecycle-viewmodel-compose:$archLifecycleVersion "
136
+ implementation " com.google.accompanist:accompanist-appcompat-theme:$accompanistVersion "
137
+ implementation " com.google.accompanist:accompanist-swiperefresh:$accompanistVersion "
138
+ debugImplementation " androidx.compose.ui:ui-tooling:$composeVersion "
139
+ debugImplementation " androidx.compose.ui:ui-test-manifest:$composeVersion "
127
140
128
141
// Dependencies for local unit tests
129
142
testImplementation " junit:junit:$junitVersion "
@@ -137,19 +150,18 @@ dependencies {
137
150
testImplementation " androidx.test.espresso:espresso-contrib:$espressoVersion "
138
151
testImplementation " androidx.test.espresso:espresso-intents:$espressoVersion "
139
152
testImplementation " com.google.truth:truth:$truthVersion "
153
+ testImplementation " androidx.compose.ui:ui-test-junit4:$composeVersion "
140
154
141
155
// Dependencies for Android unit tests
142
156
androidTestImplementation " junit:junit:$junitVersion "
143
157
androidTestImplementation " org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion "
158
+ androidTestImplementation " androidx.compose.ui:ui-test-junit4:$composeVersion "
144
159
145
160
// AndroidX Test - JVM testing
146
161
testImplementation " androidx.test:core-ktx:$androidXTestCoreVersion "
147
162
testImplementation " androidx.test.ext:junit-ktx:$androidXTestExtKotlinRunnerVersion "
148
163
testImplementation " androidx.test:rules:$androidXTestRulesVersion "
149
- // Once https://issuetracker.google.com/127986458 is fixed this can be testImplementation
150
- debugImplementation " androidx.fragment:fragment-testing:$fragmentVersion "
151
164
implementation " androidx.test:core:$androidXTestCoreVersion "
152
- implementation " androidx.fragment:fragment-ktx:$fragmentVersion "
153
165
154
166
// AndroidX Test - Instrumented testing
155
167
androidTestImplementation " androidx.test:core-ktx:$androidXTestCoreVersion "
@@ -165,14 +177,6 @@ dependencies {
165
177
androidTestImplementation " org.robolectric:annotations:$robolectricVersion "
166
178
implementation " androidx.test.espresso:espresso-idling-resource:$espressoVersion "
167
179
168
- // Resolve conflicts between main and test APK:
169
- androidTestImplementation " androidx.annotation:annotation:$androidXAnnotations "
170
- androidTestImplementation " androidx.legacy:legacy-support-v4:$androidXLegacySupport "
171
- androidTestImplementation " androidx.recyclerview:recyclerview:$recyclerViewVersion "
172
- androidTestImplementation " androidx.appcompat:appcompat:$appCompatVersion "
173
- androidTestImplementation " com.google.android.material:material:$materialVersion "
174
-
175
180
// Kotlin
176
181
implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion "
177
- implementation " androidx.fragment:fragment-ktx:$fragmentKtxVersion "
178
182
}
0 commit comments