Skip to content

Commit bcbc8df

Browse files
committed
minor doc cleanups
1 parent 87c4832 commit bcbc8df

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

dataconnect/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,20 @@ open `quickstart-android/dataconnect/movie-connector/queries.gql` and run the `L
7171
### 5. Running the app
7272

7373
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+
```

dataconnect/app/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ android {
5454
}
5555

5656
dependencies {
57+
5758
implementation(libs.androidx.core.ktx)
5859
implementation(libs.androidx.lifecycle.runtime.ktx)
5960
implementation(libs.androidx.lifecycle.viewmodel.compose)

dataconnect/dataconnect/movie-connector/connector.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)