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
7171### 5. Running the app
7272
7373Press 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 {
5454}
5555
5656dependencies {
57+
5758 implementation(libs.androidx.core.ktx)
5859 implementation(libs.androidx.lifecycle.runtime.ktx)
5960 implementation(libs.androidx.lifecycle.viewmodel.compose)
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ generate:
88 kotlinSdk :
99 # Create a custom package name for your generated SDK
1010 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.
1315 outputDir : ../.generated
You can’t perform that action at this time.
0 commit comments