Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
Upgrade Google formatter (#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
chanseokoh committed Sep 13, 2021
1 parent 9215abb commit b11124b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ out
/.settings
/.classpath
/.project
bin/
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ release {
/* RELEASING */

/* FORMATTING */
googleJavaFormat {
toolVersion = '1.7'
}

check.dependsOn verifyGoogleJavaFormat
// to auto-format run ./gradlew googleJavaFormat

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ public static <S, R> R convert(S source, Function<S, R> converter) {
public static <S, R> List<R> convert(List<S> source, Function<S, R> converter) {
return (source == null)
? null
: source
.stream()
: source.stream()
.filter(Objects::nonNull)
.map(converter)
.filter(Objects::nonNull)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ public void testProjectAsService_multiModuleBuilds() throws IOException {

private Set<String> getAssembleDependencies(Project project, String taskName) {
Task task = project.getTasks().findByPath(taskName);
return task.getDependsOn()
.stream()
return task.getDependsOn().stream()
.filter(t -> t instanceof Task)
.map(t -> (Task) t)
.filter(t -> t.getName().equals(BasePlugin.ASSEMBLE_TASK_NAME))
Expand Down

0 comments on commit b11124b

Please sign in to comment.