-
Notifications
You must be signed in to change notification settings - Fork 644
firebase-dataconnect merge into main branch #6290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 250 commits
Commits
Show all changes
673 commits
Select commit
Hold shift + click to select a range
c1a3a17
DataConnectBackend.kt: fixed bugs in fromInstrumentationArgument() an…
dconeybe a23fb2f
DataConnectSettings.kt: fix default host to firebasedataconnect.googl…
dconeybe 068efdf
Use DataConnectBackend.kt in integration tests
dconeybe a6807e8
DataConnectGrpcClient.kt: add x-goog-request-params header (#559)
dconeybe 45d8192
TestDataConnectFactory.kt: force a FirebaseApp to be specified, since…
dconeybe e0b8382
TestConnectorFactory.kt: make sure to use the settings from the DataC…
dconeybe e9f50dc
DataConnectGrpcClient.kt: log the metadata
dconeybe 34fd4ed
Modify some tests to inherit from DataConnectIntegrationTestBase
dconeybe 3c04775
FirebaseAuthBackend.kt added, and AuthIntegrationTest.kt modified to …
dconeybe ae7d61c
refactor emulator directory to more closely match what is generated b…
dconeybe 2cc1c19
start_postgres_pod.sh: improve the wording regarding local connection…
dconeybe e25efeb
emulator_noauth.sh: add back -local_connection_string since running t…
dconeybe 3e5fcef
Fix hardcoded serviceId and location in tests
dconeybe 02d2f33
PostsConnector.kt: fix hardcoded serviceId and location
dconeybe 78d31e2
DataConnectAuth.kt/DataConnectGrpcClient.kt: consistently print scrub…
dconeybe 26c9064
DataConnectGrpcClient.kt: remove the 'Bearer' prefix of the x-firebas…
dconeybe e5bf084
Factor out location and serviceId used in tests
dconeybe d663045
emulator_noauth.sh: explicitly specify 'us-central1' so it's obvious …
dconeybe e87d7a8
Merge remote-tracking branch 'public/master' into dataconnect
dconeybe 8a6b018
delete the firebase-dataconnect demo app, which was mostly useless
dconeybe 895fc1c
DataConnectSettingsUnitTest.kt: fix expected default host to "firebas…
dconeybe 971bdf1
DataConnectUntypedDataIntegrationTest.kt: add tests for null lists (#…
dconeybe 4c1940a
Add copyright notice to generated code (b/336814936) (#561)
dconeybe 22b111d
generate the code into the 'build' directory
dconeybe f8ecfa5
QueryApiProposal.kt removed, since it is no longer needed
dconeybe 40d3ac8
Add APL2 license headers to all files (#562)
dconeybe f6e8a75
Merge remote-tracking branch 'public/master' into dataconnect
dconeybe ff9a735
Merge remote-tracking branch 'public/master' into dataconnect
dconeybe ceb6fab
Remove the 'dependsOn' kludge in gradle.kts files
dconeybe 46b98ff
Add scripts for releasing a scrubbed version of the firebase-dataconn…
dconeybe 5e2cc45
emulator_noauth.sh: remove -disable_sdk_generation=true so that codeg…
dconeybe acd65e5
demo_ops.gql: fix UpdateFoosByBar now that 'update' is no longer avai…
dconeybe d9c2b2a
gradle.properties: set version=16.0.0-alpha02 (was 0.0.3-dev)
dconeybe f7f4cee
clean up gradle files
dconeybe 91b4194
TimestampSerializerUnitTest.kt: add unit tests for decoding the min a…
dconeybe c897ea6
ScalarVariablesAndDataIntegrationTest.kt: add tests for float, int, a…
dconeybe 2f07042
ListVariablesAndDataIntegrationTest.kt added (#5943)
dconeybe e387e79
ScalarVariablesAndDataIntegrationTest.kt: use auto-generated key inst…
dconeybe a021eab
Delete obsolete scripts: iorelease.sh, iorelease_tests.sh, release.sh
dconeybe a63f40e
emulator/.gitignore: ignore some files created by the firebase cli
dconeybe 0bb46ec
DataConnectAuth.kt: fix bug in toScrubbedAccessToken() that was showi…
dconeybe 423669a
emulator_noauth.sh: update flags for verbose logs
dconeybe 7015978
emulator_noauth.sh: more logging fixes
dconeybe afdb547
gradle.properties: set version=16.0.0-alpha03 (was 16.0.0-alpha02)
dconeybe 9304aef
Add +/- time zone support in TimestampSerializer (#5946)
cherylEnkidu a0dcd2a
firebase-dataconnect.gradle.kts: set previewMode = "alpha" (#5963)
dconeybe 1a9314e
Merge remote-tracking branch 'origin/master' into dataconnect
dconeybe 9d6c358
scripts/dokkaHtml.sh: use python or python3 executable, whichever one…
dconeybe 1c57be9
OptionalVariable.kt: fix potential NPE in toString() and hashCode()
dconeybe 5c85bb8
kdoc added to all public members
dconeybe 43ebd1d
FirebaseDataConnect.kt: add a link to the public docs in the class co…
dconeybe b3eb0ad
TimestampSerializerUnitTest.kt: add more invalid case test coverage
dconeybe 05ecd7d
Use Javelin instead of python to server the dokkaHtml output.
dconeybe 3842161
firebase-dataconnect.gradle.kts: enable dokkaHtml caching for faster …
dconeybe 3da3483
kdoc refinements
dconeybe 7b15a3f
firebase-dataconnect.gradle.kts: use mustRunAfter instead of dependsO…
dconeybe 2b7a0db
more ktdoc refinements
dconeybe 81301bc
final ktdoc fixes
dconeybe 9df2596
FirebaseDataConnect.kt: add release notes to kdoc
dconeybe d9411e5
FirebaseDataConnect.kt: update release notes for 16.0.0-alpha03
dconeybe 35bf5c4
Bump firebase-dataconnect version to 16.0.0-alpha04 (was 16.0.0-alpha03)
dconeybe f9b5dd9
Comment the equals() and hashCode() methods in GeneratedConnector and…
dconeybe 454eb36
demo added
dconeybe f657420
DateSerializer.kt: fix time zone issues (#5976)
dconeybe 3483b14
demo: modified connector and project name, and cleaned up directory s…
dconeybe 328e5e4
replace 'dataconnect-demo' with 'prjh5zbv64sv6' to avoid confusions
dconeybe 8935d39
Merge remote-tracking branch 'origin/master' into dataconnect
dconeybe 349e201
Complete integration test coverage for scalar variables and fields, b…
dconeybe 309ea95
Merge remote-tracking branch 'origin/master' into dataconnect
dconeybe 91279b0
Change default port of useEmulator() to 9399 (was 9510). (#5996)
dconeybe 8fc4934
Merge remote-tracking branch 'origin/master' into dataconnect
dconeybe 8b5dc30
.gitignore: add dataconnect-debug.log
dconeybe 54df345
FirebaseDataConnectIntegrationTest.kt: update emulator port to 9399 (…
dconeybe d90d57b
FirebaseDataConnect.kt: update release notes with version of data con…
dconeybe 58e1ebd
FirebaseDataConnect.kt: set release date for 16.0.0-alpha04 to May 29…
dconeybe d7a8429
Bump firebase-dataconnect version to 16.0.0-alpha05 (was 16.0.0-alpha04)
dconeybe 205bd3e
gradle.properties: append '-dev' to the version number, making it '16…
dconeybe 0ce9d3a
Fix grpc shutdown (#6003)
dconeybe 9f02c08
Fix two useEmulator() integration tests to work even when the emulato…
dconeybe 7294064
TimestampScalarIntegrationTest.kt: increase the timeout for invalid t…
dconeybe a7f0692
firebase-dataconnect/RELEASING.md added
dconeybe d5cdd29
DataConnectGrpcRPCs.kt: fix strict mode violations when initializing …
dconeybe dca18c9
Improve debug logging of GRPC requests and responses (#6006)
dconeybe 305edcd
FirebaseDataConnect.kt: minor improvements to the release notes layout
dconeybe 918300b
Minor improvements to logging of GRPC events
dconeybe 6ec9628
Merge remote-tracking branch 'origin/master' into dataconnect
dconeybe 12b5329
Update scripts for Data Connect Emulator v1.2.0 (#6020)
dconeybe 3d1efb3
Merge remote-tracking branch 'origin/master' into dataconnect
dconeybe bceea42
Merge remote-tracking branch 'origin/master' into dataconnect
dconeybe c49d8f4
use mockk instead of mockito
dconeybe 7bcebfe
Merge remote-tracking branch 'origin/master' into dataconnect
dconeybe f2ad6d8
DataConnectGrpcClient.kt: minor cleanup of moving googRequestParamsHe…
dconeybe 16ca596
DataConnectAuth.kt: split into interface/implementation so that it ca…
dconeybe 70948c9
Add x-goog-api-client header to all grpc requests (#6029)
dconeybe eb735a5
Merge remote-tracking branch 'origin/master' into dataconnect
dconeybe 2abd62e
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 1a4e284
libs.versions.toml: define versions of kotlin serialization and dokka…
dconeybe 1714dfe
add kotest dependencies, and upgrade the kotest dependency in libs.ve…
dconeybe d2b84b2
add some kotest utils
dconeybe b87e7ca
DataConnectError.kt: rewrite without a data class 'impl' and add sour…
dconeybe c3e3967
InProcessDataConnectGrpcServer.kt: add abililty to examine the metadata
dconeybe 69187ac
DataConnectAuth.kt: work around IllegalStateException when calling ad…
dconeybe e054e28
DataConnectAuth.kt: merge interface/impl into just impl
dconeybe 77f1bd7
DataConnectGrpcMetadata.kt added
dconeybe a18c3ca
DataConnectGrpcRPCs.kt: move some logic from DataConnectGrpcClient.kt…
dconeybe 197f750
OldQueryManager.kt: split into multiple files rather than one, monoli…
dconeybe 209051e
cli_wrapper.sh: don't add -logtostderr since the firebase-tools wrapp…
dconeybe 0b3e63c
emulator.sh: don't specify --project since the upcoming emulators don…
dconeybe 300f26d
Fix timezone calculation in Timestamp (#6038)
cherylEnkidu ff17641
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe e3a437d
FirebaseDataConnectImpl.kt: report data connect emulator info (e.g. v…
dconeybe 5191c44
FirebaseDataConnectImpl.kt: stream errors from emulator using the new…
dconeybe b91a71c
DataConnectAuth.kt: refactor get token logic into 2 methods
dconeybe 356a1cf
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe a57c8b2
DataConnectLogLevelRule.kt: move from androidTestutil to testutil
dconeybe d69d5aa
DelayedDeferred.kt: re-write to be more usable
dconeybe ec3ad40
SuspendingCountDownLatch.kt added
dconeybe 24b1b28
DataConnectAuth.kt: major refactor and add unit tests
dconeybe 7e7b07e
Arbs.kt: fun Arb.Companion.projectId() added
dconeybe ab44c74
DataConnectAuthUnitTest.kt: refactor and move Logger mocking function…
dconeybe 42563eb
TestUtils.kt: mark randomOperationName() as deprecated; use Arb.opera…
dconeybe 91b5754
FirebaseDataConnectImpl.kt: minor internal cleanup; no functionality …
dconeybe 57b76b3
DataConnectGrpcClientUnitTest.kt: refactor and improve the unit tests…
dconeybe 31abc94
Retry requests that fail with UNAUTHENTICATED with a fresh auth token…
dconeybe 736cc63
DataConnectGrpcMetadata.kt: fix log message that lacked +
dconeybe 172e1c6
AuthIntegrationTest.kt: add test for UNAUTHENTICATED response
dconeybe 7626a23
AuthIntegrationTest.kt: use kotest instead of Truth
dconeybe 014b861
FirebaseDataConnect.kt: tweak release notes
dconeybe 4c207a8
Release firebase-dataconnect version 16.0.0-alpha05
dconeybe 2ad607a
Bump firebase-dataconnect version to 16.0.0-alpha06-dev and add "unre…
dconeybe 897ca46
RELEASING.md: minor tweak to an example commit message
dconeybe 416526c
RELEASING.md: add instructions to use google-services.json in the con…
dconeybe 8455af1
DataConnectBackend.kt: add kdoc documentation
dconeybe 1b1c5d1
add copyright blurb to files that lacked it
dconeybe cc0a7bd
protoc-gen-firebase-encoders.gradle: use libs.versions.toml to fix pr…
dconeybe 1674510
InProcessDataConnectGrpcServer.kt: include valid sample data in the d…
dconeybe 3c073c7
Make normal android libraries rather than 'firebase' android librarie…
dconeybe 5551357
firebase-dataconnect/api.txt: updated by running `./gradlew :firebase…
dconeybe 0cc79a1
dataconnect.yaml: add location, since it is required here instead of …
dconeybe d2b981e
person_ops.gql: switch @auth(level: USER) to @auth(level: USER_ANON) …
dconeybe 7da43d6
Fix character case of codegen in the cli built from google3, which wi…
dconeybe a9f9aed
check generated code into github so that CI builds will work without …
dconeybe a334bdc
format generated code with ktfmt
dconeybe fb4ab76
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 0c6481c
RELEASING.md: minor tweaks
dconeybe c38d53d
DataConnectAuth.kt: refactor to use atomics rather than mutexes
dconeybe 5fb2516
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe c9e8298
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 3149ffc
Remove package suffix from outputDir in connector.yaml for kotlin sdk…
dconeybe ce9fb56
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe a71bd61
Use spotless instead of ktfmt for code formatting, as the repo has mi…
dconeybe 0ce0a53
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 475dab7
QueryRefIntegrationTest.kt: modify executeShouldSupportMassiveConcurr…
dconeybe a22b1c6
QueryRefIntegrationTest.kt: modify executeShouldSupportMassiveConcurr…
dconeybe 29d20e4
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe c6ceab4
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 8f74bb7
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe b2b304c
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 4482893
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe a8f1ca2
Data Connect Gradle plugin added (#6162)
dconeybe 31c440a
Delete code generated by the data connect cli (#6163)
dconeybe abaa106
Use the new Data Connect gradle plugin in the 'connectors' submodule …
dconeybe dbf24b1
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 54608a6
InstrumentationUtils.kt added (#6174)
dconeybe 404c2b8
Refactor Auth to naturally support future AppCheck support (#6175)
dconeybe 3ad6721
GeneratedConnector.kt: add equals() and hashCode() (#6177)
dconeybe 58b6e2c
AppCheck support added to Data Connect (#6176)
dconeybe 75d5c7e
toScrubbedAccessToken() changed to specify if the token is the appche…
dconeybe 93e8912
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 596b3f5
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 9fbfef8
Add kotlin/gen to x-goog-request-params when used from the generated …
dconeybe 462c349
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 65520e3
./gradlew firebase-dataconnect:generateApiTxtFile
dconeybe c574b45
spotlessApply
dconeybe f3cfd96
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 045cea9
Change platform logging tag to "fire-data-connect", was "fire-datacon…
dconeybe fe61590
Download the Data Connect executable from the public URL in Gradle pl…
dconeybe 8cbba7b
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 81239e4
FirebaseAppUnitTestingRule.kt: improve class comments to note that th…
dconeybe 5ddf602
AppCheckIntegrationTest.kt: Use FirebaseOptions.applicationId instead…
dconeybe 2b00a5b
DataConnectGrpcMetadata.kt: minor code cleanup
dconeybe 2a582c0
x-firebase-gmpid header added to data connect (#6198)
dconeybe 7ea4958
DataConnectGrpcMetadata.kt: Omit x-firebase-gmpid if appId is empty o…
dconeybe 093bfc8
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe d147d1f
Fix firebase-vertexai to use libs.version.toml
dconeybe b49310f
remove traces of ktfmt
dconeybe dcccf16
AnyScalarIntegrationTest.kt added (#6213)
dconeybe fe46c1d
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 9edaf19
plugin: print logs if codegen fails
dconeybe c4a4865
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe c7e5328
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 1b6d311
plugin: add schemaExtensionsOutputEnabled
dconeybe bd10379
firebase.json: remove location
dconeybe 71613c5
DataConnectGrpcClient.kt: only check equality with Status.UNAUTHENTIC…
dconeybe a3b6334
AppCheckIntegrationTest.kt: expect PERMISSION_DENIED instead of UNAUT…
dconeybe cd76286
AppCheckIntegrationTest.kt fixups
dconeybe cb19122
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 106cb6a
switch back to us-central1, since its App Check enforcement now works
dconeybe 9e1912c
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 408a513
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 7cb6c47
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe d752534
Remove the defunct demo code
dconeybe a52410e
rename plugin to gradleplugin
dconeybe 3552bf4
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe dfa2340
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe ce7fb34
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 22a34d1
Overhaul AnyScalarIntegrationTest.kt (#6283)
dconeybe 23cb8e2
gradleplugin: add support for 1.3.6 and 1.3.7
dconeybe 8d86ef2
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 7b01d88
gradleplugin: add support for 1.3.8, which fixes codegen for `Any` sc…
dconeybe 30c95d9
Delete the "new" QueryManager, which was unused, and rename "OldQuery…
dconeybe dd5a27b
updated firebase-dataconnect/api.txt by running ./gradlew firebase-da…
dconeybe 146dbec
AnyValue and AnyValueSerializer added (#6285)
dconeybe fdb5019
AnyScalarIntegrationTest.kt added (#6287)
dconeybe e04ba3b
Fix syntax of CHANGELOG.md
dconeybe 922c1df
Merge branch 'main' into dataconnect
dconeybe 4673877
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe e023163
fix serialization version to 1.5.1
dconeybe 6eabd00
firebase-dataconnect/gradle.properties: change version=16.0.0-alpha06…
dconeybe e60798b
firebase-dataconnect.gradle.kts: set previewMode = "beta" and add "re…
dconeybe afab582
Removed `extra["packageName"]` from firebase-dataconnect.gradle.kts, …
dconeybe fe41d24
Remove extranuous gradle wrapper from firebase-dataconnect/gradleplugin
dconeybe 2f96d94
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 2b7f8c2
Add a bunch of unit test coverage for mutations and queries (#6296)
dconeybe 9f3210a
Add SerializersModule support to QueryRef and MutationRef (#6297)
dconeybe 0466055
CallerSdkType added (#6298)
dconeybe 348d5dd
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe 6175cf7
remove dokka and javalin, since it's not idiomatic in the firebase-an…
dconeybe 347cfd1
README.md: apply code review feedback
dconeybe e414d9f
gradle.properties: add latestReleasedVersion=16.0.0-alpha05
dconeybe 72ae373
Downgrade kotlin version in firebase-dataconnect/gradleplugin from 1.…
dconeybe 6c81c28
v1alpha -> v1beta (#6299)
dconeybe 37ae3df
CHANGELOG.md: fix syntax
dconeybe 95b8f1b
Remove convenience bash scripts that called the now-deleted dokka gra…
dconeybe 817b804
Refactor to avoid spurious XXXKt classes in api.txt (#6303)
dconeybe 90dc795
Remove unnecessary excludes from gradle.kts files (#6304)
dconeybe 9654762
Remove dependency on protolite-well-known-types
dconeybe 3a07dd9
firebase-dataconnect.gradle.kts: change libs.kotlinx.coroutines.core …
dconeybe 6d3405f
RELEASING.md deleted, since it is no longer relevant as data connect …
dconeybe 1405dc6
CHANGELOG.md: fix character case, as suggested by code reviewer
dconeybe 9d47d2c
CHANGELOG.md: change public preview wording
dconeybe d65be8c
Remove unnecessary dependency on google/api/field_behavior.proto in c…
dconeybe faf4302
Merge remote-tracking branch 'origin/main' into dataconnect
dconeybe fcbc6cf
Update firebase-dataconnect/CHANGELOG.md
dconeybe a6b10a5
Update firebase-dataconnect/CHANGELOG.md
dconeybe 663a9fd
Update firebase-dataconnect/CHANGELOG.md
dconeybe bcda6da
CHANGELOG.md: Move entries for post-16.0.0-alpah05 from FirebaseDataC…
dconeybe 96c26df
connectors.gradle.kts: remove obsolete dependency on kotlin-reflect
dconeybe 9c9c43d
tidy up dependencies section of gradle.kts files
dconeybe 6d20245
RandomSeedTestRule.kt added
dconeybe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dataconnect.local.properties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Unreleased | ||
* [feature] Initial release of the Data Connect SDK (public preview). See | ||
https://firebase.google.com/docs/data-connect/android-sdk for instructions on | ||
getting started. | ||
* [feature] Add ability to specify SerializersModule when serializing. | ||
dconeybe marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
* [feature] CallerSdkType added, to enable tracking generated SDK usage. | ||
dconeybe marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
* [changed] Changed gRPC proto package to v1beta (was v1alpha). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# firebase-dataconnect | ||
|
||
This is the Firebase Android Data Connect SDK. | ||
|
||
## Building | ||
|
||
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: | ||
```bash | ||
./gradlew :firebase-dataconnect:assembleRelease | ||
``` | ||
|
||
## Unit Testing | ||
|
||
To run unit tests for Firebase Data Connect, from the source root run: | ||
```bash | ||
./gradlew :firebase-dataconnect:check | ||
``` | ||
|
||
## Integration Testing | ||
|
||
Running integration tests requires a Firebase project because they connect to | ||
the Firebase Data Connect backend. | ||
|
||
See [here](../README.md#project-setup) 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. | ||
|
||
### Setting up 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 Data Connect Toolkit. | ||
|
||
* [Install the Firebase CLI](https://firebase.google.com/docs/cli/). | ||
``` | ||
npm install -g firebase-tools | ||
``` | ||
* [Install the Firebase Data Connect | ||
emulator](https://firebase.google.com/docs/FIX_URL/security/test-rules-emulator#install_the_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. | ||
|
||
### Run on Local Android Emulator | ||
|
||
Then run: | ||
```bash | ||
./gradlew :firebase-dataconnect:connectedCheck | ||
``` | ||
|
||
### Run on Firebase Test Lab | ||
|
||
You 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](../README.md#running-integration-tests-on-firebase-test-lab) for | ||
instructions of how to setup Firebase Test Lab for your project. | ||
|
||
Run: | ||
```bash | ||
./gradlew :firebase-dataconnect:deviceCheck | ||
``` | ||
|
||
## Code Formatting | ||
|
||
Run below to format Kotlin and Java code: | ||
```bash | ||
./gradlew :firebase-dataconnect:spotlessApply | ||
``` | ||
|
||
See [here](../README.md#code-formatting) if you want to be able to format code | ||
from within Android Studio. | ||
|
||
## Build Local Jar of Firebase Data Connect SDK | ||
|
||
```bash | ||
./gradlew -PprojectsToPublish="firebase-dataconnect" publishReleasingLibrariesToMavenLocal | ||
``` | ||
|
||
Developers may then take a dependency on these locally published versions by adding | ||
the `mavenLocal()` repository to your [repositories | ||
block](https://docs.gradle.org/current/userguide/declaring_repositories.html) in | ||
your app module's build.gradle. | ||
|
||
## Misc | ||
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 | ||
``` |
73 changes: 73 additions & 0 deletions
73
firebase-dataconnect/androidTestutil/androidTestutil.gradle.kts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
* Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { | ||
id("com.android.library") | ||
id("kotlin-android") | ||
alias(libs.plugins.kotlinx.serialization) | ||
} | ||
|
||
android { | ||
val compileSdkVersion : Int by rootProject | ||
val targetSdkVersion : Int by rootProject | ||
val minSdkVersion : Int by rootProject | ||
|
||
namespace = "com.google.firebase.dataconnect.androidTestutil" | ||
compileSdk = compileSdkVersion | ||
defaultConfig { | ||
minSdk = minSdkVersion | ||
targetSdk = targetSdkVersion | ||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { jvmTarget = "1.8" } | ||
|
||
packaging { | ||
resources { | ||
excludes.add("META-INF/LICENSE.md") | ||
excludes.add("META-INF/LICENSE-notice.md") | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
api("com.google.firebase:firebase-common:21.0.0") | ||
api(project(":firebase-dataconnect")) | ||
api(project(":firebase-dataconnect:testutil")) | ||
api(libs.kotlinx.coroutines.core) | ||
|
||
implementation(libs.androidx.test.core) | ||
implementation(libs.androidx.test.junit) | ||
implementation(libs.auth0.jwt) | ||
implementation(libs.kotlinx.serialization.core) | ||
implementation(libs.kotlinx.serialization.json) | ||
implementation(libs.turbine) | ||
implementation(libs.truth) | ||
|
||
implementation("com.google.firebase:firebase-auth:22.3.1") | ||
implementation("com.google.firebase:firebase-appcheck:18.0.0") | ||
} | ||
|
||
tasks.withType<KotlinCompile>().all { | ||
kotlinOptions { | ||
freeCompilerArgs = listOf("-opt-in=kotlin.RequiresOptIn") | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
firebase-dataconnect/androidTestutil/src/main/AndroidManifest.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> | ||
<application /> | ||
</manifest> |
13 changes: 13 additions & 0 deletions
13
firebase-dataconnect/androidTestutil/src/main/assets/firebase-admin-service-account.key.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"type": "service_account", | ||
"project_id": "prjh5zbv64sv6", | ||
"private_key_id": "abcdef0123456789abcdef0123456789abcdef01", | ||
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCvfyKRUZMyp1FS\nbL2cZIMNA5AbDHBuZciEZFIbG7rx7d12Lnwz/inBSuhJ2qzmSHvWLQfjV0xsPVEH\nCCQdB7owt8GemvcyrzaW/vQ5WmvN7Wpj7Efz7iEguXQfqa09FklGECfrhgnOdsdd\ntoQW19nzETwepXzBvo6C/etTesUHAjBLUeHoh94vDvMTbp+9Dc48pG+uMhSVItjV\nv32lDRemFcewK33SCYWG2+3CqEQHlFf75pnbMTJr0392KLJtXqv6Kgcd61JXB7l8\nw8G4GPm8o9er0l4j5lB36Az1SmAJM68K7lI98PMrCcSsdwgNT3R16J6y+zMJfc5h\nStGdJP5hAgMBAAECggEARGEtl2CpEYoHEi4jfS3esDHsstVYc3N+OzOZmE1oPH65\nlSRMqbeFDncA5lHpn3qrocp+8dJgiSYlDa/a3mLV5cibjRCFc/64LwJdJ4G3UpAI\nrbFxYbatusH34KRsx0oJN97wpwDdjlBSow2MDxiAqAhVm/1QDG+SuLB2QlsqLO3E\ntDHgix+x08b01ui7/QYm83y1qTUTeCq/JlpRcMe4Nqp8RJiVTu+OY9MVJeA7o/ng\nLYnjTI0u1kB346EClTvq2xSb0h5AENtAd61B7H65JtkQWB5uDHL3HrWAbVVldp21\ncH6sO66/ApY4v0KGalgbBZ6VzmVuzVp7Kl+0t+m0/wKBgQDVdmz77vdjsTG7LEqC\nsknEKOTXSJYpA6g4dCouwHGrS4EkNzCXaAOCAdOoPkBF991uNNSqPtaDDMqF5CpA\nvJKzANBn1AuGp9jimITfA82KtEbA3t7yCk6A6+sAJNHsVA5I0+p/wcO0VmVZGIoN\n2pIHOTVbytcfAgHG0CjMv2SbJwKBgQDSd+n/sdTNFcTe8KoRJP2N9UFGip/9GZrV\nn9SUZGHojYrCY8DKI0GtAgR6Lij9D9CJRTPDSOEMuNpyPQQNFa5Sa14ic6dcksNg\nG6cq1BaaqXE7nxzVvgrOBXAxnRudd7rI/JoEsrG+Ca23HkvuCKsydjbNs6GY9hfE\nSfMnrsivNwKBgQDBJDAkG+pXl6Jpuv+IFg1Mobu9Vv4XCioROnpYZuPym5Sz0gPz\nWreh0ElUd07sgAMojkDF8aliVhaA4xugC3+o21m2OFRdeE1zaZD/wI8fq1JBfOa4\nlb7GQ7AUJzyR2tQ57RTGl+mdqHZ3EQ8IzfVG9+phrbzLX6N/4iSobZx4DQKBgEYY\nn/uD+67OOEJT/yA0pKnZ7AKVetFt7K6HS+KcSCuOsI8rb/MiqOX5DQqwQwB9euOt\nA59fr2xwSHjRr364INXcYn6w7CWdz6o7q4JNHrYmBstno8/gOnMBRquPeroIPVJh\nJt63sRDs4klhssI1auckjf4WfJSYKbQ7ONuXj8kjAoGBAILZG9+YNZ9IKLtQzcdf\nbWzgQ2b9CujHdZ5agSGUHVeKSSIInQZAc5jRCKz35T9Xnh50qrixcNA90IvpjbGL\nCNmmvmB+IlIuH/Mzn6wb5fad8d80e1Yz+ueeAyZjMS6NYLwmZ1M52eeikRWdyO/h\nZ3q6UYLR9K+mhUFgV+X7g15T\n-----END PRIVATE KEY-----\n", | ||
"client_email": "firebase-adminsdk-trn2rx6xed@prjh5zbv64sv6.iam.gserviceaccount.com", | ||
"client_id": "123456789012345678901", | ||
"auth_uri": "https://accounts.google.com/o/oauth2/auth", | ||
"token_uri": "https://oauth2.googleapis.com/token", | ||
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", | ||
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-trn2rx6xed%40prjh5zbv64sv6.iam.gserviceaccount.com", | ||
"universe_domain": "googleapis.com" | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.