Examples of using the Kgen code generator to generate Google Cloud client libraries in Kotlin.
To run the samples in this repository you must have a Google Cloud project that you can use. To get started:
- Create a project, if you don't already have one
- Enable billing for your project
- Enable the APIs that the examples use:
- Create a new service account with a JSON keyfile
- Define an environment variable so the example application uses your service account credentials:
$ export GOOGLE_APPLICATION_CREDENTIALS=<path to your service account JSON file> $ export PROJECT=<name_of_your_gcp_project>
- Run via gradle:
$ ./gradlew run --args language
To switch between examples modify the flag passed to the --args
parameter.