Introduce JLink and move classes to correct package
This commit is contained in:
parent
eacfcd0547
commit
4c49f939ee
2
.idea/.name
generated
2
.idea/.name
generated
@ -1 +1 @@
|
||||
UltimateTicTacToe
|
||||
ultimate-tictactoe
|
2
.idea/runConfigurations/Run.xml
generated
2
.idea/runConfigurations/Run.xml
generated
@ -1,7 +1,7 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Run" type="Application" factoryName="Application">
|
||||
<option name="MAIN_CLASS_NAME" value="de.icaotix.ultimatetictactoe.Main" />
|
||||
<module name="UltimateTicTacToe.main" />
|
||||
<module name="ultimate-tictactoe.main" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="de.icaotix.ultimatetictactoe.*" />
|
||||
|
11
build.gradle
11
build.gradle
@ -1,5 +1,6 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'org.beryx.jlink' version '2.24.4'
|
||||
}
|
||||
|
||||
group 'de.icaotix.ultimatetictactoe'
|
||||
@ -14,6 +15,16 @@ dependencies {
|
||||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
|
||||
}
|
||||
|
||||
jlink {
|
||||
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
|
||||
launcher{
|
||||
name = 'Ultimate TicTacToe'
|
||||
jvmArgs = ['-Dlog4j.configurationFile=./log4j2.xml']
|
||||
noConsole = true
|
||||
}
|
||||
mainClass = "de.icaotix.ultimatetictactoe.Main"
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
@ -1,2 +1,2 @@
|
||||
rootProject.name = 'UltimateTicTacToe'
|
||||
rootProject.name = 'ultimate-tictactoe'
|
||||
|
||||
|
@ -1,20 +1,17 @@
|
||||
package ultimatetictactoe;
|
||||
package de.icaotix.ultimatetictactoe;
|
||||
|
||||
import ultimatetictactoe.view.UltimateTicTacToeView;
|
||||
import ultimatetictactoe.viewmodel.UltimateTicTacToePanelViewModel;
|
||||
import de.icaotix.ultimatetictactoe.view.UltimateTicTacToeView;
|
||||
import de.icaotix.ultimatetictactoe.viewmodel.UltimateTicTacToePanelViewModel;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
final UltimateTicTacToePanelViewModel ultimateTicTacToePanelViewModel = new UltimateTicTacToePanelViewModel();
|
||||
new UltimateTicTacToeView(ultimateTicTacToePanelViewModel);
|
||||
ultimateTicTacToePanelViewModel.prepareNextMove();
|
||||
});
|
||||
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package ultimatetictactoe.model;
|
||||
package de.icaotix.ultimatetictactoe.model;
|
||||
|
||||
public enum CellState {
|
||||
X("X"),
|
@ -1,4 +1,4 @@
|
||||
package ultimatetictactoe.model;
|
||||
package de.icaotix.ultimatetictactoe.model;
|
||||
|
||||
public enum GameState {
|
||||
X_WON("X won"),
|
@ -0,0 +1,6 @@
|
||||
package de.icaotix.ultimatetictactoe.model;
|
||||
|
||||
public enum Player {
|
||||
X,
|
||||
O
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package ultimatetictactoe.model;
|
||||
package de.icaotix.ultimatetictactoe.model;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
@ -1,4 +1,4 @@
|
||||
package ultimatetictactoe.model;
|
||||
package de.icaotix.ultimatetictactoe.model;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
@ -1,6 +1,6 @@
|
||||
package ultimatetictactoe.view;
|
||||
package de.icaotix.ultimatetictactoe.view;
|
||||
|
||||
import ultimatetictactoe.viewmodel.TicTacToePanelViewModel;
|
||||
import de.icaotix.ultimatetictactoe.viewmodel.TicTacToePanelViewModel;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
@ -1,8 +1,8 @@
|
||||
package ultimatetictactoe.view;
|
||||
package de.icaotix.ultimatetictactoe.view;
|
||||
|
||||
import ultimatetictactoe.model.Player;
|
||||
import ultimatetictactoe.viewmodel.TicTacToePanelViewModel;
|
||||
import ultimatetictactoe.viewmodel.UltimateTicTacToePanelViewModel;
|
||||
import de.icaotix.ultimatetictactoe.model.Player;
|
||||
import de.icaotix.ultimatetictactoe.viewmodel.TicTacToePanelViewModel;
|
||||
import de.icaotix.ultimatetictactoe.viewmodel.UltimateTicTacToePanelViewModel;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
@ -1,4 +1,4 @@
|
||||
package ultimatetictactoe.viewmodel;
|
||||
package de.icaotix.ultimatetictactoe.viewmodel;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiConsumer;
|
@ -1,9 +1,10 @@
|
||||
package ultimatetictactoe.viewmodel;
|
||||
package de.icaotix.ultimatetictactoe.viewmodel;
|
||||
|
||||
import ultimatetictactoe.model.GameState;
|
||||
import ultimatetictactoe.model.Player;
|
||||
import ultimatetictactoe.model.TicTacToeGame;
|
||||
import ultimatetictactoe.model.UltimateTicTacToe;
|
||||
|
||||
import de.icaotix.ultimatetictactoe.model.GameState;
|
||||
import de.icaotix.ultimatetictactoe.model.Player;
|
||||
import de.icaotix.ultimatetictactoe.model.TicTacToeGame;
|
||||
import de.icaotix.ultimatetictactoe.model.UltimateTicTacToe;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
3
src/main/java/module-info.java
Normal file
3
src/main/java/module-info.java
Normal file
@ -0,0 +1,3 @@
|
||||
module ultimate.tictactoe.main {
|
||||
requires java.desktop;
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
package ultimatetictactoe.model;
|
||||
|
||||
public enum Player {
|
||||
X,
|
||||
O
|
||||
}
|
Loading…
Reference in New Issue
Block a user