Skip to content

Commit

Permalink
Merge pull request #3 from BME-MIT-IET/build+ci
Browse files Browse the repository at this point in the history
Build keretrendszer + CI beüzemelése
  • Loading branch information
KarsaiArtur authored May 17, 2024
2 parents ff3f964 + 1cf6011 commit fec9c35
Show file tree
Hide file tree
Showing 160 changed files with 166 additions and 203 deletions.
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Maven
**/target
**/pom.xml.tag
**/pom.xml.releaseBackup
**/pom.xml.versionsBackup
**/pom.xml.next
**/release.properties
**/dependency-reduced-pom.xml
**/buildNumber.properties
**/.mvn/timing.properties
**/.mvn/wrapper/maven-wrapper.jar

# VS Code
**/.vscode

# Local History for Visual Studio Code
**/.history

# Built Visual Studio Code Extensions
**/*.vsix

# IntelliJ project files
**/*.iml
**/out
**/gen

**/.idea
3 changes: 0 additions & 3 deletions Program/.idea/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions Program/.idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions Program/.idea/modules.xml

This file was deleted.

124 changes: 0 additions & 124 deletions Program/.idea/uiDesigner.xml

This file was deleted.

6 changes: 0 additions & 6 deletions Program/.idea/vcs.xml

This file was deleted.

Binary file removed Program/Prototype.zip
Binary file not shown.
Binary file removed Program/out/production/testProj/ActionHandler.class
Binary file not shown.
Binary file removed Program/out/production/testProj/Active.class
Binary file not shown.
Binary file removed Program/out/production/testProj/BlankField.class
Binary file not shown.
Binary file removed Program/out/production/testProj/Field.class
Binary file not shown.
Binary file removed Program/out/production/testProj/Fixer.class
Binary file not shown.
Binary file removed Program/out/production/testProj/Fountain.class
Binary file not shown.
Binary file removed Program/out/production/testProj/Game.class
Binary file not shown.
Binary file removed Program/out/production/testProj/GameField.class
Binary file not shown.
Binary file removed Program/out/production/testProj/GameFrame$1.class
Binary file not shown.
Binary file removed Program/out/production/testProj/GameFrame$2.class
Binary file not shown.
Binary file removed Program/out/production/testProj/GameFrame.class
Binary file not shown.
Binary file removed Program/out/production/testProj/HelpFrame.class
Binary file not shown.
Binary file removed Program/out/production/testProj/Main.class
Binary file not shown.
Binary file removed Program/out/production/testProj/MainMenu$1.class
Binary file not shown.
Binary file removed Program/out/production/testProj/MainMenu$2.class
Binary file not shown.
Binary file removed Program/out/production/testProj/MainMenu$3.class
Binary file not shown.
Binary file removed Program/out/production/testProj/MainMenu.class
Binary file not shown.
Binary file removed Program/out/production/testProj/Map.class
Binary file not shown.
Binary file removed Program/out/production/testProj/Pipe.class
Binary file not shown.
Binary file removed Program/out/production/testProj/Player.class
Binary file not shown.
Binary file removed Program/out/production/testProj/Pump.class
Binary file not shown.
Binary file removed Program/out/production/testProj/Saboteur.class
Binary file not shown.
Binary file removed Program/out/production/testProj/SettingsFrame$1.class
Binary file not shown.
Binary file not shown.
Binary file removed Program/out/production/testProj/Steppable.class
Binary file not shown.
Binary file removed Program/out/production/testProj/Tank.class
Binary file not shown.
Binary file removed Program/out/production/testProj/Wait.class
Binary file not shown.
11 changes: 0 additions & 11 deletions Program/testProj.iml

This file was deleted.

19 changes: 19 additions & 0 deletions doc/Build keretrendszer + CI beüzemelése.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Build keretrendszer + CI beüzemelése

## Build keretrendszer

A build keretrendszer beüzemeléséhez a Maven-t választottuk.

A [`pom.xml`](../pom.xml) fájl tartalmazza a projekt függőségeit és a build konfigurációját.

A build parancs: `mvn clean package assembly:single`. Ez létrehozza a `target` mappában a futtatható `.jar` fájlt.

A tesztek az `mvn test` paranccsal futtathatóak.

## CI beüzemelése

A CI beüzemeléséhez a GitHub Actions-t választottuk.

A CI konfigurációja a [`.github/workflows/maven.yml`](../.github/workflows/maven.yml) fájlban található.

A `main` branch-en minden push-ra és pull request-re lefut. A Maven paranccsal buildeli a projektet és futtatja a teszteket.
72 changes: 72 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<version>1.0-SNAPSHOT</version>
<groupId>hu.main</groupId>
<artifactId>hu.main</artifactId>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/res</outputDirectory>
<resources>
<resource>
<directory>res</directory>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<release>11</release>
</configuration>
</plugin>

<!-- JUnit 5 requires Surefire version 2.22.1 or higher -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
</plugins>
</build>
</project>
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
3 changes: 3 additions & 0 deletions src/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: Main

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions Program/src/GameField.java → src/main/java/GameField.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public GameField(int ln){
* @param png png neve
*/
public void SetBackground(int x, int y, String png){
fields[x][y].setIcon( new ImageIcon(png+".png"));
fields[x][y].setDisabledIcon( new ImageIcon(png+".png"));
fields[x][y].setIcon( new ImageIcon("res/"+png+".png"));
fields[x][y].setDisabledIcon( new ImageIcon("res/"+png+".png"));
}
/**
*
Expand Down
30 changes: 15 additions & 15 deletions Program/src/GameFrame.java → src/main/java/GameFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public GameFrame() {
public void initComponents(){
JButton background=new JButton();
background.setEnabled(false);
background.setIcon(new ImageIcon("background.png"));
background.setDisabledIcon(new ImageIcon("background.png"));
background.setIcon(new ImageIcon("res/"+"background.png"));
background.setDisabledIcon(new ImageIcon("res/"+"background.png"));
background.setContentAreaFilled(false);
background.setBorderPainted(false);
background.setOpaque(false);
Expand Down Expand Up @@ -243,10 +243,10 @@ public void actionPerformed(ActionEvent e) {
background.setBounds (0, 0, 1500, 900);
getContentPane().add(jp);

ImageIcon leftImg=new ImageIcon("left.png");
ImageIcon disabledLeftImg=new ImageIcon("leftdisabled.png");
ImageIcon btn=new ImageIcon("button.png");
ImageIcon disabledbtn=new ImageIcon("disabledbutton.png");
ImageIcon leftImg=new ImageIcon("res/"+"left.png");
ImageIcon disabledLeftImg=new ImageIcon("res/"+"leftdisabled.png");
ImageIcon btn=new ImageIcon("res/"+"button.png");
ImageIcon disabledbtn=new ImageIcon("res/"+"disabledbutton.png");
SetButtonStyle(left, leftImg, disabledLeftImg, 0);
SetButtonStyle(right, leftImg, disabledLeftImg, 180);
SetButtonStyle(up, leftImg, disabledLeftImg, 90);
Expand Down Expand Up @@ -294,22 +294,22 @@ public void actionPerformed(ActionEvent e) {
playerBackground.setBorderPainted(false);
playerBackground.setOpaque(false);
playerBackground.setBounds (37, 742, 470, 146);
playerBackground.setIcon(new ImageIcon("bigbutton.png"));
playerBackground.setDisabledIcon(new ImageIcon("bigbutton.png"));
playerBackground.setIcon(new ImageIcon("res/bigbutton.png"));
playerBackground.setDisabledIcon(new ImageIcon("res/bigbutton.png"));
fieldBackground.setEnabled(false);
fieldBackground.setContentAreaFilled(false);
fieldBackground.setBorderPainted(false);
fieldBackground.setOpaque(false);
fieldBackground.setBounds (572, 742, 470, 146);
fieldBackground.setIcon(new ImageIcon("bigbutton.png"));
fieldBackground.setDisabledIcon(new ImageIcon("bigbutton.png"));
fieldBackground.setIcon(new ImageIcon("res/bigbutton.png"));
fieldBackground.setDisabledIcon(new ImageIcon("res/bigbutton.png"));
pointBackground.setEnabled(false);
pointBackground.setContentAreaFilled(false);
pointBackground.setBorderPainted(false);
pointBackground.setOpaque(false);
pointBackground.setBounds (998, 742, 470, 146);
pointBackground.setIcon(new ImageIcon("middlebutton.png"));
pointBackground.setDisabledIcon(new ImageIcon("middlebutton.png"));
pointBackground.setIcon(new ImageIcon("res/middlebutton.png"));
pointBackground.setDisabledIcon(new ImageIcon("res/middlebutton.png"));
}

public void SetButtonStyle(JButton button, ImageIcon img, ImageIcon disabledimg, int angle ){
Expand Down Expand Up @@ -337,8 +337,8 @@ public void DrawPlayer(Player player){
DrawFieldIcon(i, player.GetField());
}

playericon.setIcon(new ImageIcon(player.GetPictureName()));
playericon.setDisabledIcon(new ImageIcon(player.GetPictureName()));
playericon.setIcon(new ImageIcon("res/"+player.GetPictureName()));
playericon.setDisabledIcon(new ImageIcon("res/"+player.GetPictureName()));
}

/**
Expand Down Expand Up @@ -623,7 +623,7 @@ public JButton[] GetFieldIcon(){


public void SetIcon(int layer, String png){
ImageIcon img = new ImageIcon(png+".png");
ImageIcon img = new ImageIcon("res/"+png+".png");
fieldicon[layer].setIcon(img);
fieldicon[layer].setDisabledIcon(img);
}
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit fec9c35

Please sign in to comment.