GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — samples(functions): Add "specify function" tag (#4192) · siglo50/java-docs-samples@771b11d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • functions/helloworld
    • helloworld-gradle
      • build.gradle
    • helloworld
      • pom.xml
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎functions/helloworld/helloworld-gradle/build.gradle‎

Copy file name to clipboardExpand all lines: functions/helloworld/helloworld-gradle/build.gradle
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ configurations {
2424
invoker
2525
}
2626

27+
// [START functions_gradle_add_dependencies]
2728
dependencies {
2829
// Every function needs this dependency to get the Functions Framework API.
2930
compileOnly 'com.google.cloud.functions:functions-framework-api:1.0.1'
3031

3132
// To run function locally using Functions Framework's local invoker
3233
invoker 'com.google.cloud.functions.invoker:java-function-invoker:1.0.0-alpha-2-rc5'
34+
// [END functions_gradle_add_dependencies]
3335
// [END functions_example_pom_dependencies]
3436

3537
// These dependencies are only used by the tests.
@@ -39,8 +41,11 @@ dependencies {
3941
testImplementation 'org.mockito:mockito-core:3.4.0'
4042

4143
// [START functions_example_pom_dependencies]
44+
// [START functions_gradle_add_dependencies]
4245
}
46+
// [END functions_gradle_add_dependencies]
4347

48+
// [START functions_gradle_specify_function]
4449
// Register a "runFunction" task to run the function locally
4550
tasks.register("runFunction", JavaExec) {
4651
main = 'com.google.cloud.functions.invoker.runner.Invoker'
@@ -54,5 +59,6 @@ tasks.register("runFunction", JavaExec) {
5459
args('--classpath', files(configurations.runtimeClasspath, sourceSets.main.output).asPath)
5560
}
5661
}
62+
// [END functions_gradle_specify_function]
5763
// [END functions_build_gradle]
5864
// [END functions_example_pom_dependencies]
Collapse file

‎functions/helloworld/helloworld/pom.xml‎

Copy file name to clipboardExpand all lines: functions/helloworld/helloworld/pom.xml
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,14 @@
4444

4545
<dependencies>
4646
<!-- Required for Function primitives -->
47+
<!-- [START functions_maven_add_dependencies] -->
4748
<dependency>
4849
<groupId>com.google.cloud.functions</groupId>
4950
<artifactId>functions-framework-api</artifactId>
5051
<version>1.0.2</version>
5152
<scope>provided</scope>
5253
</dependency>
54+
<!-- [END functions_maven_add_dependencies] -->
5355
<!-- [END functions_example_pom] -->
5456
<!-- [END functions_example_pom_dependencies] -->
5557

@@ -79,7 +81,9 @@
7981

8082
<build>
8183
<plugins>
84+
<!-- [START functions_maven_specify_function] -->
8285
<plugin>
86+
<!-- [END functions_maven_specify_function] -->
8387
<!--
8488
Google Cloud Functions Framework Maven plugin
8589
@@ -89,13 +93,15 @@
8993
9094
mvn function:run -Drun.functionTarget=your.package.yourFunction
9195
-->
96+
<!-- [START functions_maven_specify_function] -->
9297
<groupId>com.google.cloud.functions</groupId>
9398
<artifactId>function-maven-plugin</artifactId>
9499
<version>0.9.5</version>
95100
<configuration>
96101
<functionTarget>functions.HelloWorld</functionTarget>
97102
</configuration>
98103
</plugin>
104+
<!-- [END functions_maven_specify_function] -->
99105
<!-- [END functions_example_pom_dependencies] -->
100106
<plugin>
101107
<groupId>org.apache.maven.plugins</groupId>

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.