Skip to content

Commit 3c9bb7d

Browse files
committed
Initial commit with Gradle 4.6, JUnit 5.2, and dummy class test example
0 parents  commit 3c9bb7d

File tree

9 files changed

+331
-0
lines changed

9 files changed

+331
-0
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Gradle
2+
.gradle
3+
build/
4+
5+
# Ignore Gradle GUI config
6+
gradle-app.setting
7+

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Java Bootstrap (base / project skeleton)
2+
3+
## Introduction
4+
5+
This is a repository intended to serve as a starting point if you want to bootstrap a project in Java 8 with JUnit 5.2 and Gradle 4.6.
6+
7+
## How To Start
8+
9+
1. Install Java 8
10+
2. Clone this repository `git clone https://github.com/CodelyTV/java-bootstrap`.
11+
3. Run the tests with `./gradlew test`
12+
4. Start developing!

build.gradle

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apply plugin: 'java'
2+
3+
repositories {
4+
mavenCentral()
5+
}
6+
7+
dependencies {
8+
testCompile('org.junit.jupiter:junit-jupiter-api:5.2.0')
9+
testRuntime('org.junit.jupiter:junit-jupiter-engine:5.2.0')
10+
}
11+
12+
test {
13+
useJUnitPlatform()
14+
15+
testLogging {
16+
events "passed", "skipped", "failed"
17+
}
18+
19+
reports {
20+
html.enabled = true
21+
}
22+
}
23+
24+
task wrapper(type: Wrapper) {
25+
description = 'Generates gradlew[.bat] scripts'
26+
gradleVersion = '4.6'
27+
}

gradle/wrapper/gradle-wrapper.jar

53.1 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

gradlew

Lines changed: 172 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 84 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package tv.codely.java_bootstrap;
2+
3+
public class Greeter {
4+
5+
public String greet(String name) {
6+
return "Hello " + name;
7+
}
8+
9+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package tv.codely.java_bootstrap;
2+
3+
import static org.junit.jupiter.api.Assertions.assertEquals;
4+
5+
import org.junit.jupiter.api.Test;
6+
7+
public class GreeterShould {
8+
9+
@Test
10+
void greet_with_a_hello_message_to_the_name_it_receives() {
11+
Greeter greeter = new Greeter();
12+
assertEquals("Hello Jhon", greeter.greet("Jhon"));
13+
}
14+
15+
}

0 commit comments

Comments
 (0)