This is a kotlin template is based on mwhyte-dev/kotlin-google-cloud-function repository.
You can find the author's article here.
./gradlew runFunction
./gradlew runFunction -PrunFunction.target=dev.mcatta.function.HttpSampleApp -PrunFunction.port=8080
gcloud config set functions/region europe-west1
gcloud functions deploy my-test-function \
--entry-point=dev.mcatta.function.HttpSampleApp \
--source=build/deploy --runtime=java11 --trigger-http \
--allow-unauthenticated
gcloud functions describe my-test-function
curl https://<your-region>-<you-project-name>.cloudfunctions.net/my-test-function
gcloud functions delete my-test-function