File tree Expand file tree Collapse file tree 3 files changed +22
-2
lines changed
dataconnect/movie-connector Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -71,3 +71,20 @@ open `quickstart-android/dataconnect/movie-connector/queries.gql` and run the `L
71
71
### 5. Running the app
72
72
73
73
Press the Run button in Android Studio to run the sample app on your device.
74
+
75
+ ### 6. Re-generating the source code for Data Connect connectors
76
+
77
+ This project defines a custom Gradle plugin that looks after generating the Kotlin code for the
78
+ queries and mutations defined in the GraphQL files. The code will be generated on-demand when
79
+ needed by a build. To generate the code manually, run:
80
+
81
+ ```
82
+ ../gradlew generateDebugDataConnectSources
83
+ ```
84
+
85
+ If you are making frequent changes to the GraphQL files, it may be convenient to run the code
86
+ generation upon _ every_ change, without waiting for a build. To do that, run:
87
+
88
+ ```
89
+ ../gradlew generateDebugDataConnectSources --continuous
90
+ ```
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ android {
54
54
}
55
55
56
56
dependencies {
57
+
57
58
implementation(libs.androidx.core.ktx)
58
59
implementation(libs.androidx.lifecycle.runtime.ktx)
59
60
implementation(libs.androidx.lifecycle.viewmodel.compose)
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ generate:
8
8
kotlinSdk :
9
9
# Create a custom package name for your generated SDK
10
10
package : com.google.firebase.dataconnect.movies
11
- # Use an arbitrary directory for generating the code, as the custom task in
12
- # app/build.gradle.kts will generate into the appropriate directory.
11
+ # Use an arbitrary directory for generating the code, as the
12
+ # "com.google.firebase.example.dataconnect.gradle" custom Gradle plugin applied by
13
+ # app/build.gradle.kts will look after generating the code on-demand into the
14
+ # appropriate directory.
13
15
outputDir : ../.generated
You can’t perform that action at this time.
0 commit comments