Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apply google java format #4

Merged
merged 1 commit into from
Sep 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions app/src/main/java/org/astraea/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
package org.astraea;

public class App {
public String getGreeting() {
return "Hello World!";
}
public String getGreeting() {
return "Hello World!";
}

public static void main(String[] args) {
System.out.println(new App().getGreeting());
}
public static void main(String[] args) {
System.out.println(new App().getGreeting());
}
}
12 changes: 7 additions & 5 deletions app/src/test/java/org/astraea/AppTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
*/
package org.astraea;

import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;

import org.junit.jupiter.api.Test;

class AppTest {
@Test void appHasAGreeting() {
App classUnderTest = new App();
assertNotNull(classUnderTest.getGreeting(), "app should have a greeting");
}
@Test
void appHasAGreeting() {
App classUnderTest = new App();
assertNotNull(classUnderTest.getGreeting(), "app should have a greeting");
}
}
20 changes: 20 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java application project to get you started.
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
* User Manual available at https://docs.gradle.org/7.2/userguide/building_java_projects.html
*/

plugins {
id "com.diffplug.spotless" version "5.14.3"
}

spotless {
java {
importOrder()
removeUnusedImports()
target '**/java/**/*.java'
googleJavaFormat()
}
}