Skip to content

Commit 0572aac

Browse files
committed
Merge.
2 parents 1c8e025 + 086c2ce commit 0572aac

File tree

108 files changed

+302
-1914
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+302
-1914
lines changed

functions/concepts/env-vars/pom.xml

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
<groupId>com.google.cloud.functions</groupId>
4444
<artifactId>functions-framework-api</artifactId>
4545
<version>1.0.1</version>
46+
<scope>provided</scope>
4647
</dependency>
4748

4849
<!-- The following dependencies are only required for testing -->
@@ -137,31 +138,6 @@
137138
<trimStackTrace>false</trimStackTrace>
138139
</configuration>
139140
</plugin>
140-
<plugin> <!-- Required for Java 8 (Alpha) functions in the inline editor -->
141-
<groupId>org.apache.maven.plugins</groupId>
142-
<artifactId>maven-compiler-plugin</artifactId>
143-
<executions>
144-
<execution>
145-
<id>compile</id>
146-
<phase>compile</phase>
147-
<goals>
148-
<goal>compile</goal>
149-
</goals>
150-
</execution>
151-
<execution>
152-
<id>testCompile</id>
153-
<phase>test-compile</phase>
154-
<goals>
155-
<goal>testCompile</goal>
156-
</goals>
157-
</execution>
158-
</executions>
159-
<configuration>
160-
<excludes>
161-
<exclude>.google/</exclude>
162-
</excludes>
163-
</configuration>
164-
</plugin>
165141
</plugins>
166142
</build>
167143
</project>

functions/concepts/execution-count/pom.xml

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
<groupId>com.google.cloud.functions</groupId>
4444
<artifactId>functions-framework-api</artifactId>
4545
<version>1.0.1</version>
46+
<scope>provided</scope>
4647
</dependency>
4748

4849
<!-- The following dependencies are only required for testing -->
@@ -132,31 +133,6 @@
132133
<trimStackTrace>false</trimStackTrace>
133134
</configuration>
134135
</plugin>
135-
<plugin> <!-- Required for Java 8 (Alpha) functions in the inline editor -->
136-
<groupId>org.apache.maven.plugins</groupId>
137-
<artifactId>maven-compiler-plugin</artifactId>
138-
<executions>
139-
<execution>
140-
<id>compile</id>
141-
<phase>compile</phase>
142-
<goals>
143-
<goal>compile</goal>
144-
</goals>
145-
</execution>
146-
<execution>
147-
<id>testCompile</id>
148-
<phase>test-compile</phase>
149-
<goals>
150-
<goal>testCompile</goal>
151-
</goals>
152-
</execution>
153-
</executions>
154-
<configuration>
155-
<excludes>
156-
<exclude>.google/</exclude>
157-
</excludes>
158-
</configuration>
159-
</plugin>
160136
</plugins>
161137
</build>
162138
</project>

functions/concepts/execution-count/src/test/java/functions/ExecutionCountTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ public void helloExecutionCount() throws IOException {
5656
writerOut.flush();
5757
assertThat(responseOut.toString()).contains("Instance execution count: 1");
5858
}
59-
}
59+
}

functions/concepts/file-system/pom.xml

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
<groupId>com.google.cloud.functions</groupId>
4444
<artifactId>functions-framework-api</artifactId>
4545
<version>1.0.1</version>
46+
<scope>provided</scope>
4647
</dependency>
4748

4849
<!-- The following dependencies are only required for testing -->
@@ -133,31 +134,6 @@
133134
<trimStackTrace>false</trimStackTrace>
134135
</configuration>
135136
</plugin>
136-
<plugin> <!-- Required for Java 8 (Alpha) functions in the inline editor -->
137-
<groupId>org.apache.maven.plugins</groupId>
138-
<artifactId>maven-compiler-plugin</artifactId>
139-
<executions>
140-
<execution>
141-
<id>compile</id>
142-
<phase>compile</phase>
143-
<goals>
144-
<goal>compile</goal>
145-
</goals>
146-
</execution>
147-
<execution>
148-
<id>testCompile</id>
149-
<phase>test-compile</phase>
150-
<goals>
151-
<goal>testCompile</goal>
152-
</goals>
153-
</execution>
154-
</executions>
155-
<configuration>
156-
<excludes>
157-
<exclude>.google/</exclude>
158-
</excludes>
159-
</configuration>
160-
</plugin>
161137
</plugins>
162138
</build>
163139
</project>

functions/concepts/file-system/src/main/java/functions/FileSystem.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
import com.google.cloud.functions.HttpFunction;
2222
import com.google.cloud.functions.HttpRequest;
2323
import com.google.cloud.functions.HttpResponse;
24-
import java.io.BufferedWriter;
2524
import java.io.File;
2625
import java.io.IOException;
26+
import java.io.PrintWriter;
2727

2828
public class FileSystem implements HttpFunction {
2929

@@ -33,10 +33,10 @@ public void service(HttpRequest request, HttpResponse response)
3333
throws IOException {
3434
File currentDirectory = new File(".");
3535
File[] files = currentDirectory.listFiles();
36-
BufferedWriter writer = response.getWriter();
37-
writer.write("Files: %n");
36+
PrintWriter writer = new PrintWriter(response.getWriter());
37+
writer.println("Files:");
3838
for (File f : files) {
39-
writer.write(String.format("\t%s%n", f.getName()));
39+
writer.printf("\t%s%n", f.getName());
4040
}
4141
}
4242
}

functions/concepts/file-system/src/test/java/functions/FileSystemTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ public void filesTest() throws IOException {
6262
writerOut.flush();
6363
assertThat(responseOut.toString()).contains("Files:");
6464
}
65-
}
65+
}

functions/concepts/lazy-fields/pom.xml

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
<groupId>com.google.cloud.functions</groupId>
4444
<artifactId>functions-framework-api</artifactId>
4545
<version>1.0.1</version>
46+
<scope>provided</scope>
4647
</dependency>
4748

4849
<!-- The following dependencies are only required for testing -->
@@ -132,31 +133,6 @@
132133
<trimStackTrace>false</trimStackTrace>
133134
</configuration>
134135
</plugin>
135-
<plugin> <!-- Required for Java 8 (Alpha) functions in the inline editor -->
136-
<groupId>org.apache.maven.plugins</groupId>
137-
<artifactId>maven-compiler-plugin</artifactId>
138-
<executions>
139-
<execution>
140-
<id>compile</id>
141-
<phase>compile</phase>
142-
<goals>
143-
<goal>compile</goal>
144-
</goals>
145-
</execution>
146-
<execution>
147-
<id>testCompile</id>
148-
<phase>test-compile</phase>
149-
<goals>
150-
<goal>testCompile</goal>
151-
</goals>
152-
</execution>
153-
</executions>
154-
<configuration>
155-
<excludes>
156-
<exclude>.google/</exclude>
157-
</excludes>
158-
</configuration>
159-
</plugin>
160136
</plugins>
161137
</build>
162138
</project>

functions/concepts/lazy-fields/src/test/java/functions/LazyFieldsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ public void lazyTest() throws IOException {
6262
writerOut.flush();
6363
assertThat(responseOut.toString()).contains("Lazy global:");
6464
}
65-
}
65+
}

functions/concepts/pom.xml

Lines changed: 0 additions & 179 deletions
This file was deleted.

0 commit comments

Comments
 (0)