Skip to content
Open
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
67 changes: 67 additions & 0 deletions HW2-Tic-Tac-Toe/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.2'
classpath 'com.google.guava:guava:23.5-jre'
classpath 'org.mockito:mockito-all:2.0.2-beta'
}
}

repositories {
mavenCentral()
}

ext.junit4Version = '4.12'
ext.junitVintageVersion = '4.12.2'
ext.junitPlatformVersion = '1.0.2'
ext.junitJupiterVersion = '5.0.2'
ext.log4jVersion = '2.9.0'

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.junit.platform.gradle.plugin'

jar {
baseName = 'junit5-gradle-consumer'
version = '1.0.0-SNAPSHOT'
}

compileTestJava {
sourceCompatibility = 1.9
targetCompatibility = 1.9
options.compilerArgs += '-parameters'
}

dependencies {
// JUnit Jupiter API and TestEngine implementation
testCompile("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")

// If you also want to support JUnit 3 and JUnit 4 tests
testCompile("junit:junit:${junit4Version}")
testRuntime("org.junit.vintage:junit-vintage-engine:${junitVintageVersion}")

// To avoid compiler warnings about @API annotations in JUnit code
testCompileOnly('org.apiguardian:apiguardian-api:1.0.0')

// To use Log4J's LogManager
testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}")
testRuntime("org.apache.logging.log4j:log4j-jul:${log4jVersion}")

// Only needed to run tests in an (IntelliJ) IDE(A) that bundles an older version
testRuntime("org.junit.platform:junit-platform-launcher:${junitPlatformVersion}")

testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
compile group: 'org.jetbrains', name: 'annotations', version: '15.0'

compile group: 'com.google.guava', name: 'guava', version: '23.5-jre'
testCompile group: 'org.mockito', name: 'mockito-all', version: '2.0.2-beta'
}

task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '4.6'
}
Binary file added HW2-Tic-Tac-Toe/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions HW2-Tic-Tac-Toe/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
172 changes: 172 additions & 0 deletions HW2-Tic-Tac-Toe/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 84 additions & 0 deletions HW2-Tic-Tac-Toe/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions HW2-Tic-Tac-Toe/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rootProject.name = 'Tic-Tac-Toe'

28 changes: 28 additions & 0 deletions HW2-Tic-Tac-Toe/src/main/java/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import handlers.SceneManager;
import javafx.application.Application;
import javafx.stage.Stage;
import org.jetbrains.annotations.NotNull;

/**
* Main class of application. Starts a tic-tac-toe application.
*/
public class Main extends Application {

/**
* The main entry point of tic-tac-toe application.
*/
@Override
public void start(@NotNull final Stage primaryStage) {
primaryStage.setMinWidth(300);
primaryStage.setMinHeight(400);
primaryStage.setTitle("Tic-tac-toe");

SceneManager.initialize(primaryStage);
SceneManager.changeScene(SceneManager.SceneEnum.MAIN_MENU);
primaryStage.show();
}

public static void main(final String[] args) {
launch(args);
}
}
Loading