Running a function with Gradle & Kotlin (build.gradle.kts)
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
調査の方向性
ドキュメントの Gradle の例から始め、提供されている build.gradle.kts 設定と比較します。Kotlin DSL 形式と、runFunction.target がない場合のフォールバックを含めるようにドキュメントを更新し、その後、例が記載された Kotlin および Gradle のバージョンと互換性があることを確認します。
索引モデルが issue の本文から書いたものです。
説明
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]`
- 主要言語
- Java
- スター
- 154
- フォーク
- 63
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
GoogleCloudPlatform/functions-framework-java のほかの issue
-
enhancement P2
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
-
enhancement
GoogleCloudPlatform/functions-framework-java#375 · コメント 1 件 · リアクション 1 件 · 担当者 1 名 ·
-
enhancement P2
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
GoogleCloudPlatform/functions-framework-java#372 · コメント 1 件 ·
-
enhancement P3
GoogleCloudPlatform/functions-framework-java#261 · 担当者 1 名 ·
-
How to run `google/fhir-data-pipes/pipelines/batch` uber JAR in Google Cloud Functions locally? オープンP3 question
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
GoogleCloudPlatform/functions-framework-java#254 · コメント 1 件 ·
GoogleCloudPlatform/functions-framework-java の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
elastic/gradle-plugins#157 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
cryptomator/hub#497 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
johanhaleby/occurrent#1120 ·