Init repo
This commit is contained in:
30
app/build.gradle
Executable file
30
app/build.gradle
Executable file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 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/6.8.1/userguide/building_java_projects.html
|
||||
*/
|
||||
|
||||
plugins {
|
||||
// Apply the application plugin to add support for building a CLI application in Java.
|
||||
id 'application'
|
||||
}
|
||||
|
||||
repositories {
|
||||
// Use JCenter for resolving dependencies.
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Use JUnit test framework.
|
||||
testImplementation 'junit:junit:4.13'
|
||||
|
||||
// This dependency is used by the application.
|
||||
implementation 'com.google.guava:guava:29.0-jre'
|
||||
}
|
||||
|
||||
application {
|
||||
// Define the main class for the application.
|
||||
mainClass = 'com.bartlomiejpluta.samplegame.App'
|
||||
}
|
||||
14
app/src/main/java/com/bartlomiejpluta/samplegame/App.java
Executable file
14
app/src/main/java/com/bartlomiejpluta/samplegame/App.java
Executable file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* This Java source file was generated by the Gradle 'init' task.
|
||||
*/
|
||||
package com.bartlomiejpluta.samplegame;
|
||||
|
||||
public class App {
|
||||
public String getGreeting() {
|
||||
return "Hello World!";
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(new App().getGreeting());
|
||||
}
|
||||
}
|
||||
14
app/src/test/java/com/bartlomiejpluta/samplegame/AppTest.java
Executable file
14
app/src/test/java/com/bartlomiejpluta/samplegame/AppTest.java
Executable file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* This Java source file was generated by the Gradle 'init' task.
|
||||
*/
|
||||
package com.bartlomiejpluta.samplegame;
|
||||
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class AppTest {
|
||||
@Test public void testAppHasAGreeting() {
|
||||
App classUnderTest = new App();
|
||||
assertNotNull("app should have a greeting", classUnderTest.getGreeting());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user