Skip to content

Commit

Permalink
Merge branch 'master' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
coderPaddyS authored Jan 3, 2025
2 parents a1c53a6 + 788b6dd commit 233c492
Show file tree
Hide file tree
Showing 19 changed files with 168 additions and 103 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Continuous Integration
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: "recursive"

- name: Set up JDK environment
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: 17

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Run local unit tests
run: bash ./gradlew test --stacktrace

build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: "recursive"

- name: Set up JDK environment
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: 17

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Build the app
run: bash ./gradlew build --stacktrace
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

<a name="v1.2.2"></a>
## [Battleship (Privacy Friendly) v1.2.2](https://github.com/SecUSo/privacy-friendly-battleship/releases/tag/v1.2.2) - 19 Feb 2024

## What's Changed
* Add ci workflow and code cleanup by [@udenr](https://github.com/udenr) in https://github.com/SecUSo/privacy-friendly-battleship/pull/24
* Update dependencies by [@udenr](https://github.com/udenr) in https://github.com/SecUSo/privacy-friendly-battleship/pull/25

## New Contributors
* [@udenr](https://github.com/udenr) made their first contribution in https://github.com/SecUSo/privacy-friendly-battleship/pull/24

**Full Changelog**: https://github.com/SecUSo/privacy-friendly-battleship/compare/v1.2.1...v1.2.2

[Changes][v1.2.2]


<a name="v1.2.1"></a>
## [Privacy Friendly Battleship (v1.2.1)](https://github.com/SecUSo/privacy-friendly-battleship/releases/tag/v1.2.1) - 24 Oct 2023

Expand All @@ -24,7 +39,8 @@
[Changes][v1.2]


[v1.2.2]: https://github.com/SecUSo/privacy-friendly-battleship/compare/v1.2.1...v1.2.2
[v1.2.1]: https://github.com/SecUSo/privacy-friendly-battleship/compare/v1.2...v1.2.1
[v1.2]: https://github.com/SecUSo/privacy-friendly-battleship/tree/v1.2

<!-- Generated by https://github.com/rhysd/changelog-from-release v3.7.1 -->
<!-- Generated by https://github.com/rhysd/changelog-from-release v3.7.2 -->
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
## Privacy Friendly Battleship

This application contains the functionality of the Battleship board game. It includes a mode for playing against a computer opponent as well as a mode for playing against another player.
Privacy Friendly Battleship belongs to the group of Privacy Friendly Apps developed by the Technische Universität Darmstadt.
Privacy Friendly Battleship belongs to the group of Privacy Friendly Apps developed by the Karlsruhe Institute of Technology.

## Motivation

Expand Down Expand Up @@ -46,7 +46,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

The icons used in the nagivation drawer are licensed under the [CC BY 2.5] (http://creativecommons.org/licenses/by/2.5/). In addition to them the app uses icons from [Google Design Material Icons](https://design.google.com/icons/index.html) licensed under Apache License Version 2.0. All other images (the logo of Privacy Friendly Apps, the SECUSO logo and the header in the navigation drawer) copyright [Technische Universtität Darmstadt] (www.tu-darmstadt.de) (2017).
The icons used in the nagivation drawer are licensed under the [CC BY 2.5] (http://creativecommons.org/licenses/by/2.5/). In addition to them the app uses icons from [Google Design Material Icons](https://design.google.com/icons/index.html) licensed under Apache License Version 2.0. All other images (the logo of Privacy Friendly Apps, the SECUSO logo and the header in the navigation drawer) copyright [SECUSO](www.secuso.org) (2019).

## Contributors

Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
}

This file was deleted.

27 changes: 14 additions & 13 deletions app/src/main/res/layout-land/content_main.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/main_content"
<LinearLayout android:id="@+id/main_content"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
Expand Down Expand Up @@ -35,30 +34,31 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:rotation="90"/>
android:rotation="90" />

<ImageView
android:id="@+id/mode_arrow_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:src="@drawable/ic_keyboard_arrow_left_black_24dp"
app:srcCompat="@drawable/ic_keyboard_arrow_left_black_24dp"
android:layout_alignParentTop="true"
android:padding="@dimen/activity_vertical_margin"
android:layout_centerHorizontal="true"
android:onClick="onClick"
android:rotation="90"/>
android:rotation="90" />

<ImageView
android:id="@+id/mode_arrow_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_keyboard_arrow_right_black_24dp"
app:srcCompat="@drawable/ic_keyboard_arrow_right_black_24dp"
android:layout_alignParentBottom="true"
android:padding="@dimen/activity_vertical_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_centerHorizontal="true"
android:onClick="onClick"
android:rotation="90"/>
android:rotation="90" />
</RelativeLayout>

<RelativeLayout
Expand All @@ -81,30 +81,31 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:rotation="90"/>
android:rotation="90" />

<ImageView
android:id="@+id/size_arrow_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:src="@drawable/ic_keyboard_arrow_left_black_24dp"
app:srcCompat="@drawable/ic_keyboard_arrow_left_black_24dp"
android:layout_alignParentTop="true"
android:padding="@dimen/activity_vertical_margin"
android:layout_centerHorizontal="true"
android:onClick="onClick"
android:rotation="90" />

<ImageView
android:id="@+id/size_arrow_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_keyboard_arrow_right_black_24dp"
app:srcCompat="@drawable/ic_keyboard_arrow_right_black_24dp"
android:layout_alignParentBottom="true"
android:padding="@dimen/activity_vertical_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_centerHorizontal="true"
android:onClick="onClick"
android:rotation="90"/>
android:rotation="90" />
</RelativeLayout>

<LinearLayout
Expand All @@ -122,7 +123,7 @@
android:background="@drawable/button_normal"
android:text="@string/main_button_quick_start"
android:id="@+id/quick_start_button"
android:onClick="onClick"/>
android:onClick="onClick" />

<Button
android:layout_marginBottom="@dimen/activity_vertical_margin"
Expand All @@ -132,7 +133,7 @@
android:background="@drawable/button_fullwidth"
android:text="@string/custom_game"
android:id="@+id/action_settings"
android:onClick="onClick"/>
android:onClick="onClick" />

</LinearLayout>

Expand Down
31 changes: 16 additions & 15 deletions app/src/main/res/layout-land/content_place_ship.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">

<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/placement_gridview"
Expand All @@ -10,7 +11,7 @@
android:verticalSpacing="1px"
android:horizontalSpacing="1px"
android:stretchMode="columnWidth"
android:layout_weight="1"/>
android:layout_weight="1" />

<LinearLayout
android:id="@+id/game_linear_layout"
Expand All @@ -31,10 +32,10 @@
android:id="@+id/arrow_left"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:src="@drawable/arrow_left_black"
app:srcCompat="@drawable/arrow_left_black"
android:adjustViewBounds="true"
android:onClick="onClickButton"
android:layout_gravity="center_vertical"/>
android:layout_gravity="center_vertical" />

<LinearLayout
android:layout_width="wrap_content"
Expand All @@ -46,30 +47,30 @@
android:id="@+id/arrow_up"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:src="@drawable/arrow_up_black"
app:srcCompat="@drawable/arrow_up_black"
android:adjustViewBounds="true"
android:onClick="onClickButton"
android:layout_weight="1"/>
android:layout_weight="1" />

<ImageView
android:id="@+id/arrow_down"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:src="@drawable/arrow_down_black"
app:srcCompat="@drawable/arrow_down_black"
android:adjustViewBounds="true"
android:onClick="onClickButton"
android:layout_weight="1"/>
android:layout_weight="1" />

</LinearLayout>

<ImageView
android:id="@+id/arrow_right"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:src="@drawable/arrow_right_black"
app:srcCompat="@drawable/arrow_right_black"
android:adjustViewBounds="true"
android:onClick="onClickButton"
android:layout_gravity="center_vertical"/>
android:layout_gravity="center_vertical" />

</LinearLayout>

Expand All @@ -83,11 +84,11 @@
android:id="@+id/rotate_right"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:src="@drawable/arrow_rotate_right_black"
app:srcCompat="@drawable/arrow_rotate_right_black"
android:adjustViewBounds="true"
android:onClick="onClickButton"
android:layout_weight="1"
android:layout_gravity="center_vertical"/>
android:layout_gravity="center_vertical" />

<androidx.legacy.widget.Space
android:layout_width="50dp"
Expand All @@ -97,11 +98,11 @@
android:id="@+id/rotate_left"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:src="@drawable/arrow_rotate_left_black"
app:srcCompat="@drawable/arrow_rotate_left_black"
android:adjustViewBounds="true"
android:onClick="onClickButton"
android:layout_weight="1"
android:layout_gravity="center_vertical"/>
android:layout_gravity="center_vertical" />

</LinearLayout>

Expand All @@ -115,7 +116,7 @@
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:background="@drawable/button_fullwidth"
android:textColor="@color/white"
android:onClick="onClickReady"/>
android:onClick="onClickReady" />

</LinearLayout>

Expand Down
9 changes: 5 additions & 4 deletions app/src/main/res/layout-land/fragment_mode_main.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
Expand All @@ -13,7 +13,8 @@
android:rotation="-90"
tools:context="org.secuso.privacyfriendlybattleship.ui.MainActivity$GameModeFragment">

<TextView android:id="@+id/section_label"
<TextView
android:id="@+id/section_label"
android:text="Label"
android:textStyle="bold"
android:textSize="18sp"
Expand All @@ -27,7 +28,7 @@
android:layout_width="match_parent"
android:adjustViewBounds="true"
android:layout_centerInParent="true"
android:src="@drawable/ic_person_black_24px"
android:layout_height="0dp"/>
app:srcCompat="@drawable/ic_person_black_24px"
android:layout_height="0dp" />

</LinearLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout-land/fragment_size_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
android:layout_height="wrap_content"
android:id="@+id/select_size"
android:layout_weight="1"
android:gravity="center"/>
android:gravity="center" />
</LinearLayout>
Loading

0 comments on commit 233c492

Please sign in to comment.