This is the Firebase Android Data Connect SDK.
All Gradle commands should be run from the source root (which is one level up from this folder). See the README.md in the source root for instructions on publishing/testing Firebase Data Connect.
To build Firebase Data Connect, from the source root run:
./gradlew :firebase-dataconnect:assembleReleaseTo run unit tests for Firebase Data Connect, from the source root run:
./gradlew :firebase-dataconnect:checkRunning integration tests requires a Firebase project because they connect to the Firebase Data Connect backend.
See here for how to setup a project.
Once you setup the project, download google-services.json and place it in the source root.
Make sure you have created a Firebase Data Connect instance for your project, before you proceed.
By default, integration tests run against the Firebase Data Connect emulator.
The integration tests require that the Firebase Data Connect emulator is running on port 9399, which is default when running it via the Firebase CLI.
-
npm install -g firebase-tools -
Install the Firebase Data Connect emulator.
firebase setup:emulators:dataconnect -
Run the emulator
firebase emulators:start --only dataconnect -
Select the
Firebase Data Connect Integration Tests (Firebase Data Connect Emulator)run configuration to run all integration tests.
To run the integration tests against prod, select DataConnectProdIntegrationTest run
configuration.
Then run:
./gradlew :firebase-dataconnect:connectedCheckYou can also test on Firebase Test Lab, which allow you to run the integration tests on devices hosted in a Google data center.
See here for instructions of how to setup Firebase Test Lab for your project.
Run:
./gradlew :firebase-dataconnect:deviceCheckRun below to format Kotlin and Java code:
./gradlew :firebase-dataconnect:spotlessApplySee here if you want to be able to format code from within Android Studio.
./gradlew -PprojectsToPublish="firebase-dataconnect" publishReleasingLibrariesToMavenLocalDevelopers may then take a dependency on these locally published versions by adding the
mavenLocal() repository to your
repositories block in your
app module's build.gradle.
After importing the project into Android Studio and building successfully for the first time,
Android Studio will delete the run configuration xml files in ./idea/runConfigurations. Undo these
changes with the command:
$ git checkout .idea/runConfigurations