Running a function with Gradle & Kotlin (build.gradle.kts)
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Documentação
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Domínio
- documentation
Direção de pesquisa
Comece pelo exemplo de Gradle na documentação e compare-o com a configuração build.gradle.kts fornecida. Atualize a documentação para incluir a forma Kotlin DSL e o fallback para quando runFunction.target estiver ausente; em seguida, verifique se o exemplo é compatível com as versões de Kotlin e Gradle especificadas.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Thanks for putting all this together! I was trying to get the local invoker working on my local machine, which is setup using kotlin (1.3.72) and gradle (6.4.1) via the build.gradle.kts file.
The Gradle example in the documentation uses a format that doesn't seem compatible with the build.gradle.kts file, so I'm hoping sharing that particular configuration helps people set up their project.
build.gradle.kts
val invoker by configurations.creating
dependencies {
implementation("com.google.cloud.functions:functions-framework-api:1.0.1")
invoker("com.google.cloud.functions.invoker:java-function-invoker:1.0.0-alpha-2-rc5")
}
task<JavaExec>("runFunction") {
main = "com.google.cloud.functions.invoker.runner.Invoker"
classpath(invoker)
inputs.files(configurations.runtimeClasspath, sourceSets["main"].output)
args(
"--target", project.findProperty("runFunction.target") ?: "",
"--port", project.findProperty("runFunction.port") ?: 8080
)
doFirst {
args("--classpath", files(configurations.runtimeClasspath, sourceSets["main"].output).asPath)
}
}
Apart from the particular formatting for the .kts version, I did have to add one thing:
- I had to add the elvis operator
?: ""for ``--target, otherwise you cannot build the project due toIllegal null value provided in this collection: [--target, null, --port, 8080]`
- Linguagem predominante
- Java
- Estrelas
- 155
- Forks
- 64
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de GoogleCloudPlatform/functions-framework-java
-
enhancement P2
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 65/100
-
Incompatible conversion from Pub/Sub emulator to CloudEvent for `CloudEventsFunction`Talvez livre de novo @taeold assumiu há 222 dias e não há nenhum pull request aberto. Abertaenhancement
GoogleCloudPlatform/functions-framework-java#375 · 1 comentário · 1 reação · 1 responsável ·
-
enhancement P2
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 30/100
GoogleCloudPlatform/functions-framework-java#372 · 1 comentário ·
-
Add support for auto-reload in run goal of function-maven-pluginTalvez livre de novo @janell-chen assumiu há 1010 dias e não há nenhum pull request aberto. Abertaenhancement P3
GoogleCloudPlatform/functions-framework-java#261 · 1 responsável ·
-
How to run `google/fhir-data-pipes/pipelines/batch` uber JAR in Google Cloud Functions locally?AbertaP3 question
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
GoogleCloudPlatform/functions-framework-java#254 · 1 comentário ·
Todas as issues de GoogleCloudPlatform/functions-framework-java
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
utopia-rise/godot-jvm#1004 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
resilience4j/resilience4j#2547 ·
Mantenedores costumam responder em até 9 dias
-
Clock.MakeDate continues execution and returns a rolled-over instant after dispatching error on invalid dateTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
mit-cml/appinventor-sources#4155 ·
Mantenedores costumam responder em até 1 dia
-
[Doc] - Creation du READMEAberta
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 62/100
Hira-shi/PW1-DAI-Carrel-Egal-Eyer#28 ·
Mantenedores costumam responder em até 1 dia
-
`GET /v1/event/token/{uuid}` can report a BOM upload as done before policy evaluation and metrics have finishedTalvez já em andamento @Zargath assumiu hoje. Abertadefect in triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
DependencyTrack/dependency-track#7646 ·
Mantenedores costumam responder em até 1 dia