Skip to content

Commit

Permalink
Updated gradle config and dummy gradle project
Browse files Browse the repository at this point in the history
  • Loading branch information
goastler committed Dec 14, 2018
1 parent 8c269cb commit 91aeda2
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 50 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -27,3 +27,5 @@ hs_err_pid*

# gradle
.gradle/
build/
gradle/
36 changes: 4 additions & 32 deletions build.gradle.kts
@@ -1,45 +1,17 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* user guide available at https://docs.gradle.org/5.0/userguide/tutorial_java_projects.html
*/

plugins {
// Apply the java plugin to add support for Java
java

// Apply the application plugin to add support for building an application
application
}

repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
mavenCentral()
jcenter()
}

dependencies {
// This dependency is found on compile classpath of this component and consumers.
implementation("com.google.guava:guava:26.0-jre")

// Use JUnit test framework
testImplementation("junit:junit:4.12")
testImplementation("junit:junit:4.12")
}

application {
// Define the main class for the application
mainClassName = "demo.App"
}

sourceSets {
main {
java {
setSrcDirs(listOf("src"))
}
resources {
setSrcDirs(listOf("resources"))
}
}
mainClassName = "App"
}
2 changes: 1 addition & 1 deletion gradlew
Expand Up @@ -28,7 +28,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m"'
DEFAULT_JVM_OPTS=""

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down
2 changes: 1 addition & 1 deletion gradlew.bat
Expand Up @@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m"
set DEFAULT_JVM_OPTS=

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down
10 changes: 1 addition & 9 deletions settings.gradle.kts
@@ -1,10 +1,2 @@
/*
* This file was generated by the Gradle 'init' task.
*
* The settings file is used to specify which projects to include in your build.
*
* Detailed information about configuring a multi-project build in Gradle can be found
* in the user guide at https://docs.gradle.org/5.0/userguide/multi_project_builds.html
*/
rootProject.name = "uea-tsc"

rootProject.name = "demo"
7 changes: 0 additions & 7 deletions src/main/Main.java

This file was deleted.

10 changes: 10 additions & 0 deletions src/main/java/App.java
@@ -0,0 +1,10 @@
public class App {
public String getGreeting() {

return "abc";
}

public static void main(String[] args) {
System.out.println(new App().getGreeting());
}
}
16 changes: 16 additions & 0 deletions src/test/java/AppTest.java
@@ -0,0 +1,16 @@
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());
System.out.println("hello");
}

@Test public void testAppHasAGreeting2() {
App classUnderTest = new App();
assertNotNull("app should have a greeting", classUnderTest.getGreeting());
System.out.println("goodbye");
}
}

0 comments on commit 91aeda2

Please sign in to comment.