11# gcloud-java
22
3- [ ![ codecov] ( https://codecov.io/gh/SpineEventEngine/gcloud-java/branch/master/graph/badge.svg )] ( https://codecov.io/gh/SpineEventEngine/gcloud-java )
4- [ ![ Build Status] ( https://travis-ci.com/SpineEventEngine/gcloud-java.svg?branch=master )] ( https://travis-ci.com/SpineEventEngine/gcloud-java )
3+ [ ![ codecov] [ codecov-badge ]] [ codecov ] [ ![ Build Status] [ travis-badge ]] [ travis ]
54
5+ [ codecov ] : https://codecov.io/gh/SpineEventEngine/gcloud-java
6+ [ codecov-badge ] : https://codecov.io/gh/SpineEventEngine/gcloud-java/branch/master/graph/badge.svg
7+ [ travis ] : https://travis-ci.com/SpineEventEngine/gcloud-java
8+ [ travis-badge ] : https://travis-ci.com/SpineEventEngine/gcloud-java.svg?branch=master
9+
610Support for Spine-based Java apps running at Google Cloud.
711
812### Artifacts
913
1014Gradle:
1115
12- ``` groovy
16+ ``` kotlin
1317dependencies {
14- implementation (
15-
16- // Datastore Storage support library.
17- "io.spine.gcloud:spine-datastore:1.5.0",
18-
19- // Stackdriver Trace support library.
20- "io.spine.gcloud:spine-stackdriver-trace:1.5.0",
21-
22- // Datastore-related test utilities (if needed).
23- "io.spine.gcloud:testutil-gcloud:1.5.0"
24- )
18+ // Datastore Storage support library.
19+ implementation( " io.spine.gcloud:spine-datastore:1.5.22 " )
20+
21+ // Pub/Sub messaging support library.
22+ implementation( " io.spine.gcloud:spine-pubsub:1.5.22 " )
23+
24+ // Stackdriver Trace support library.
25+ implementation( " io.spine.gcloud:spine-stackdriver-trace:1.5.22 " )
26+
27+ // Datastore-related test utilities (if needed).
28+ implementation( " io.spine.gcloud:testutil-gcloud:1.5.22 " )
2529}
2630```
2731
2832These artifacts should be used as a part of the Spine server application.
2933
30- For the details on setting up the server environment please refer to [ Spine Bootstrap Gradle plugin] ( https://github.com/SpineEventEngine/bootstrap/ )
31- and [ Spine ` core ` modules] ( https://github.com/SpineEventEngine/core-java/ ) documentation.
34+ For the details on setting up the server environment please refer to
35+ [ Spine Bootstrap Gradle plugin] [ bootstrap ] and [ Spine ` core ` modules] [ core-java ] documentation.
36+
37+ [ bootstrap ] : https://github.com/SpineEventEngine/bootstrap/
38+ [ core-java ] : https://github.com/SpineEventEngine/core-java/
3239
3340### Configuring Datastore
3441
@@ -40,8 +47,9 @@ be set. Please notice a special index configuration for your custom `Aggregate`
4047
4148The configuration file is located at ` ./datastore/config/index.yaml ` .
4249
43- Please see the [ Google Cloud Platform documentation] ( https://cloud.google.com/datastore/docs/tools/indexconfig )
44- for the details.
50+ Please see the [ Google Cloud Platform documentation] [ datastore-index ] for the details.
51+
52+ [ datastore-index ] : https://cloud.google.com/datastore/docs/tools/indexconfig
4553
4654##### Custom indexes
4755
@@ -51,9 +59,10 @@ Such an approach is useful to optimize read-side querying. In this case more Dat
5159
5260__ Example:__
5361Assuming you have a Projection type called ` CustomerProjection ` . Its state is declared in
54- the Protobuf type ` my.company.Customer ` . It has Entity Columns ` country ` and
55- ` companySize ` . Once you try to make a query in those Columns, the Datastore will fail with
62+ the Protobuf type ` my.company.Customer ` . It has Entity Columns ` country ` and ` companySize ` .
63+ Once you try to make a query in those Columns, the Datastore will fail with
5664an internal Exception. To prevent this, you should create an index for your ` CustomerProjection ` :
65+
5766``` yaml
5867- kind : my.company.Customer
5968 ancestor : no
@@ -69,11 +78,12 @@ This section describes testing the `gcloud-java` library itself.
6978# #### Preconditions
7079
7180To run the task successfully, you must have `gcloud` tool properly installed and configured :
72- - install gcloud of the last version;
81+ - [ install][gcloud-install] ` gcloud` of the last version;
7382 - login under a Google account when initializing the `gcloud`;
7483 - to run tests you should select `spine-dev` Google Cloud Console project;
7584 - skip Google App Engine setup if not required.
7685
86+ [gcloud-install] : https://cloud.google.com/sdk/docs/downloads-interactive
7787
7888# #### Running the tests
7989
@@ -83,16 +93,20 @@ To start a local emulator and run test against it, run `./gradlew check`.
8393
8494To start an emulator without running tests `./gradlew startDatastore`.
8595
86- To stop the Datastore emulator, just terminate the emulator process (e.g. `kill -9 $(lsof -i:8080)` or just close the terminal window on Windows).
96+ To stop the Datastore emulator, just terminate the emulator process (e.g. `kill -9 $(lsof -i:8080)`
97+ or just close the terminal window on Windows).
8798
8899The launched emulator will run at `localhost:8080` and will not have any persistence.
89100To change the configuration see `./scripts/start-datastore.*` scripts.
90101
91102The datastore is cleaned up after each test.
92- See test classes under `./datastore/src/test/java/...` and `io.spine.server.storage.datastore.TestDatastoreStorageFactory#clear`.
103+ See test classes under `./datastore/src/test/java/...` and
104+ ` io.spine.server.storage.datastore.TestDatastoreStorageFactory#clear` .
93105
94106*Stackdriver-Trace*
95107
96- The test are launched in a scope of Gradle `test` phase. However, they rely upon an Google Cloud credentials file located at `<project root>/stackdriver-trace/src/test/resources/spine-dev.json`.
108+ The test are launched in a scope of Gradle `test` phase. However, they rely on a Google Cloud
109+ credentials file located at `<project root>/stackdriver-trace/src/test/resources/spine-dev.json`.
97110
98- To run the tests, obtain the service account file for your environment and make it available to the test code in the specified location.
111+ To run the tests, obtain the service account file for your environment and make it available
112+ to the test code in the specified location.
0 commit comments