Skip to content

Commit 8438cb9

Browse files
Merge pull request #845 from android/main-compose-merge
Main <- compose merge
2 parents 3d71ecf + a2247fa commit 8438cb9

File tree

70 files changed

+3129
-3299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+3129
-3299
lines changed

.github/workflows/blueprints.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ on:
44
push:
55
branches:
66
- main
7+
- views
78
pull_request:
89
branches:
910
- main
11+
- views
1012

1113
jobs:
1214
build:

app/build.gradle

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
33
apply plugin: 'kotlin-kapt'
4-
apply plugin: "androidx.navigation.safeargs.kotlin"
54

65
android {
76
compileSdkVersion rootProject.compileSdkVersion
@@ -77,6 +76,10 @@ android {
7776
}
7877
}
7978

79+
buildFeatures {
80+
compose true
81+
}
82+
8083
dataBinding {
8184
enabled = true
8285
enabledForTests = true
@@ -95,6 +98,10 @@ android {
9598
exclude 'META-INF/AL2.0'
9699
exclude 'META-INF/LGPL2.1'
97100
}
101+
102+
composeOptions {
103+
kotlinCompilerExtensionVersion "$composeVersion"
104+
}
98105
}
99106

100107
/*
@@ -104,14 +111,9 @@ android {
104111
dependencies {
105112

106113
// 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"
111114
implementation "androidx.annotation:annotation:$androidXAnnotations"
112115
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
113116
implementation "com.jakewharton.timber:timber:$timberVersion"
114-
implementation "androidx.legacy:legacy-support-v4:$androidXLegacySupport"
115117
implementation "androidx.test.espresso:espresso-idling-resource:$espressoVersion"
116118
implementation "androidx.room:room-runtime:$roomVersion"
117119
kapt "androidx.room:room-compiler:$roomVersion"
@@ -122,8 +124,19 @@ dependencies {
122124
implementation "androidx.room:room-ktx:$roomVersion"
123125
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$archLifecycleVersion"
124126
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"
127140

128141
// Dependencies for local unit tests
129142
testImplementation "junit:junit:$junitVersion"
@@ -137,19 +150,18 @@ dependencies {
137150
testImplementation "androidx.test.espresso:espresso-contrib:$espressoVersion"
138151
testImplementation "androidx.test.espresso:espresso-intents:$espressoVersion"
139152
testImplementation "com.google.truth:truth:$truthVersion"
153+
testImplementation "androidx.compose.ui:ui-test-junit4:$composeVersion"
140154

141155
// Dependencies for Android unit tests
142156
androidTestImplementation "junit:junit:$junitVersion"
143157
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion"
158+
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$composeVersion"
144159

145160
// AndroidX Test - JVM testing
146161
testImplementation "androidx.test:core-ktx:$androidXTestCoreVersion"
147162
testImplementation "androidx.test.ext:junit-ktx:$androidXTestExtKotlinRunnerVersion"
148163
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"
151164
implementation "androidx.test:core:$androidXTestCoreVersion"
152-
implementation "androidx.fragment:fragment-ktx:$fragmentVersion"
153165

154166
// AndroidX Test - Instrumented testing
155167
androidTestImplementation "androidx.test:core-ktx:$androidXTestCoreVersion"
@@ -165,14 +177,6 @@ dependencies {
165177
androidTestImplementation "org.robolectric:annotations:$robolectricVersion"
166178
implementation "androidx.test.espresso:espresso-idling-resource:$espressoVersion"
167179

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-
175180
// Kotlin
176181
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
177-
implementation "androidx.fragment:fragment-ktx:$fragmentKtxVersion"
178182
}

0 commit comments

Comments
 (0)