To run the function locally, run the following:
make run-local
If you would like to customize how the function is invoked, you can run the Gradle task directly:
./gradlew runFunction -Prun.functionTarget=dev.goobar.CloudFunction -Prun.functionPort=8080
Within the doc/requests
directory are .http
files that can be used within IntelliJ Ultimate to tests requests.
To deploy this project as a Cloud Function requires two things:
- Build a jar
- Run the gcloud deployment command
To build the jar, run the following:
make build-jar
From the root project directory, run the following to deploy the jar as a Cloud Function:
make deploy-function-dev
To build and deploy in a single command run the following:
make deploy-dev
This project is leveraging ktfmt via the Spotless Gradle Plugin.
To run Spotless and check/fix lint errors run the following:
make lint