Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
3aa1690
Add Actions linting
polygeist111 Oct 30, 2025
5f96903
Implement pre-commit formatting with Prettier
polygeist111 Oct 30, 2025
428e122
Add Prettier, Super-Linter badges
polygeist111 Oct 30, 2025
e5fa935
Reformat badges
polygeist111 Oct 30, 2025
3737c03
Correct badges
polygeist111 Oct 30, 2025
5124610
Test pre-commit Prettier action
polygeist111 Oct 30, 2025
e16f9ae
Debug Prettier pre-commit (#1)
polygeist111 Oct 30, 2025
a45ebec
Debug Prettier pre-commit (#2)
polygeist111 Oct 30, 2025
ef08187
Debug Prettier pre-commit (#3)
polygeist111 Oct 30, 2025
bcba2cd
Test Prettier pre-commit (#4)
polygeist111 Oct 30, 2025
8b09517
Debug Prettier pre-commit (#5)
polygeist111 Oct 30, 2025
7cdabd9
Debug Prettier pre-commit (#6)
polygeist111 Oct 30, 2025
38db27c
Debug Prettier pre-commit (#7)
polygeist111 Oct 30, 2025
3011ce0
Debug Prettier pre-commit (#8)
polygeist111 Oct 30, 2025
909d253
Debug Prettier pre-commit (#9)
polygeist111 Oct 30, 2025
a49d744
Test Prettier pre-commit (#10)
polygeist111 Oct 30, 2025
537913e
Finish Prettier Config
polygeist111 Oct 30, 2025
6df090b
Format all XML and README files
polygeist111 Oct 30, 2025
5611477
Slight fix + test commit
polygeist111 Oct 30, 2025
d865162
Add commit message input to workflow_dispatch
polygeist111 Oct 30, 2025
e376ff8
Remove prettier XML plugin
polygeist111 Oct 30, 2025
4c790a2
First attempt at coverage report
polygeist111 Nov 6, 2025
b68612d
First APK build workflow
polygeist111 Nov 6, 2025
0460d94
Config changes for usable build
polygeist111 Nov 11, 2025
3249be4
PLEASE REVIEW: Minor changes to address lint build failures
polygeist111 Nov 11, 2025
e4ab6fa
Attempt to understand action failure
polygeist111 Nov 11, 2025
92de44a
(Hopefully) fix coverage reporting
polygeist111 Nov 11, 2025
6548407
Attempt to understand actions failure #2
polygeist111 Nov 11, 2025
541edd3
Attempt to understand actions failure #3
polygeist111 Nov 11, 2025
c2ee7b2
Attempt to understand actions failure #4
polygeist111 Nov 11, 2025
dfc6b99
Update Action names and add build comment for APKs
polygeist111 Nov 11, 2025
ac4829d
Improve Actions Summaries
polygeist111 Nov 11, 2025
ff87ded
Improve Actions Summaries
polygeist111 Nov 11, 2025
cd6ce5f
Add job concurrency and debug coverage workflow
polygeist111 Nov 11, 2025
2ce6e4e
Improve Action Summaries
polygeist111 Nov 11, 2025
d1f91ba
Created Unit testing file specifically to test WifiConnection.kt
procrastinator007 Nov 12, 2025
e624eff
Created Unit testing file specifically to test WifiConnection.kt
procrastinator007 Nov 12, 2025
67360c0
Created Unit testing file specifically to test WifiConnection.kt
procrastinator007 Nov 12, 2025
c28cc89
Remove redundant read override and add tests for InputStreamCounter
taimuradam Nov 13, 2025
597de63
Add ListExtensionTest and rename InputStreamCounterTest methods
taimuradam Nov 13, 2025
d6ad974
Add unit tests for ConversationUtils
taimuradam Nov 13, 2025
d3250d3
Add detailed comments to test classes
taimuradam Nov 13, 2025
922c607
Correct artifact expiration period
polygeist111 Nov 14, 2025
31f7046
Created Unit more testing files for multiple files
procrastinator007 Nov 23, 2025
b8aad94
Added 4 new test files
taimuradam Nov 25, 2025
d716450
Merge branch 'main' into unitTesting-asu2025F
polygeist111 Nov 25, 2025
d3ae065
Created InputStreamCounter.puml
taimuradam Dec 2, 2025
9befe75
Created ListExtension.puml
taimuradam Dec 2, 2025
8817def
Created ConversationUtils.puml
taimuradam Dec 2, 2025
fcfaf28
Created FileEncoder.puml
taimuradam Dec 2, 2025
d4c7f6c
Created Logger.puml
taimuradam Dec 2, 2025
ec12fe0
Created MessageMigrationUtils.puml
taimuradam Dec 2, 2025
da7317e
Created MessageUtils.puml
taimuradam Dec 2, 2025
b67861d
Created Unit more testing files for multiple files
procrastinator007 Feb 2, 2026
5fe521b
Created Unit more testing files for multiple files
procrastinator007 Feb 2, 2026
57a4cdf
Created Unit more testing files for multiple files
procrastinator007 Feb 2, 2026
a1d3c17
Created Unit more testing files for multiple files
procrastinator007 Feb 12, 2026
3be481d
Created Unit more testing files for multiple files
procrastinator007 Feb 12, 2026
b103b1d
Tested DeviceStatusManager, ConversationRepository, MessageRepository
taimuradam Feb 16, 2026
18a89ef
Created UserRepository, SendScreenVM, SettingsScreenVM
taimuradam Feb 16, 2026
7026b2c
Add UML images for viewmodels and repository
taimuradam Feb 16, 2026
4ab5222
Add tests for ContentResolver and ViewModel
taimuradam Feb 16, 2026
2fa97bc
final files of ViewModel Component
procrastinator007 Feb 16, 2026
ef3fde4
final files of ViewModel Component
procrastinator007 Feb 16, 2026
83ff9cf
final files of ViewModel Component
procrastinator007 Feb 16, 2026
70731a0
Organised images and Puml Files according to components
procrastinator007 Feb 16, 2026
1099fd2
Organised images and Puml Files according to components
procrastinator007 Feb 16, 2026
1091cfd
Created tests for messaging/data
taimuradam Feb 26, 2026
d6a6347
Add messaging UML images and relocate diagrams
taimuradam Feb 26, 2026
7d94de2
Add MessageNetworkHandler tests and UML diagrams
taimuradam Feb 26, 2026
58bc3ab
Organised images and Puml Files according to components
procrastinator007 Mar 1, 2026
3cd62ba
Merge remote-tracking branch 'origin/unitTesting-asu2025F' into unitT…
procrastinator007 Mar 1, 2026
742272e
Organised images and Puml Files according to components
procrastinator007 Mar 1, 2026
7ddd663
Add MessageService tests and UML diagrams
taimuradam Mar 1, 2026
99c5068
Add UserDao tests and UML diagram
taimuradam Mar 1, 2026
1d5f904
Add UserEntity tests and UML diagrams
taimuradam Mar 1, 2026
e7c1da2
Add NotificationHelper tests and UML
taimuradam Mar 1, 2026
b006a14
Merge branch 'unitTesting-asu2025F' of https://github.com/grey-box/Pr…
taimuradam Mar 1, 2026
f623db0
Add unit tests and UML diagrams
taimuradam Mar 16, 2026
df9e5ca
final few test files added
procrastinator007 Mar 22, 2026
7433ed1
final touchups before pull
procrastinator007 Mar 29, 2026
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
103 changes: 103 additions & 0 deletions .github/workflows/build_artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: Build APKs
run-name: ${{ github.event.inputs.custom_run_name || github.workflow }}

on:
# run anytime a PR is merged to main or a direct push to main
push:
branches: [main]

# run on any push to a PR branch
pull_request:

# run on demand
workflow_dispatch:
inputs:
custom-run-name:
description: "Custom name for this Actions run"
required: false
type: string

# cancel any previously-started, yet still active runs of this workflow on the same branch
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Notify User to Scroll
run: |
echo "## Scroll to the end of the page for artifacts :arrow_down:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "---" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: "21"
distribution: "temurin"

# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0

- name: Change wrapper permissions
run: chmod +x ./gradlew

- name: Build with Gradle Wrapper
run: ./gradlew build

- name: Upload App Debug APK
uses: actions/upload-artifact@v4
with:
name: app-debug-apk # Optional: Name your artifact
path: app/build/outputs/apk/debug/app-debug.apk # Path to your build output (e.g., JARs, WARs)
retention-days: 1 # Optional: Set a custom retention period in days

- name: Upload App Release APK
uses: actions/upload-artifact@v4
with:
name: app-release-apk # Optional: Name your artifact
path: app/build/outputs/apk/release/app-release-unsigned.apk # Path to your build output (e.g., JARs, WARs)
retention-days: 1 # Optional: Set a custom retention period in days
# NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html).
# If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version.
#
# - name: Setup Gradle
# uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
# with:
# gradle-version: '8.9'
#
# - name: Build with Gradle 8.9
# run: gradle build

dependency-submission:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: "21"
distribution: "temurin"

# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
56 changes: 56 additions & 0 deletions .github/workflows/format_and_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
# template source: https://github.com/bretfisher/super-linter-workflow/blob/main/templates/call-super-linter.yaml
name: Lint Code Base
run-name: ${{ github.event.inputs.custom_run_name || github.workflow }}

on:
# run anytime a PR is merged to main or a direct push to main
push:
branches: [main]

# run on any push to a PR branch
pull_request:

# run on demand
workflow_dispatch:
inputs:
custom-run-name:
description: "Custom name for this Actions run"
required: false
type: string

# cancel any previously-started, yet still active runs of this workflow on the same branch
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

permissions: read-all

# adapted from https://mskelton.medium.com/auto-formatting-code-using-prettier-and-github-actions-ed458f58b7df
jobs:
call-super-linter:
# needs: format
name: Call Super-Linter

permissions:
contents: read # clone the repo to lint
statuses: write # read/write to repo custom statuses

### use Reusable Workflows to call my workflow remotely
### https://docs.github.com/en/actions/learn-github-actions/reusing-workflows
### you can also call workflows from inside the same repo via file path

# FIXME: customize uri to point to your own reusable linter repository
uses: polygeist111/super-linter-workflow/.github/workflows/reusable-super-linter.yaml@main
# TODO: update url to point to gb reusable linter, not thalia's

### Optional settings examples

# with:
### For a DevOps-focused repository. Prevents some code-language linters from running
### defaults to false
# devops-only: false

### A regex to exclude files from linting
### defaults to empty
# filter-regex-exclude:
67 changes: 67 additions & 0 deletions .github/workflows/report_kotlin_coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Measure Test Coverage
run-name: ${{ github.event.inputs.custom_run_name || github.workflow }}

on:
# run anytime a PR is merged to main or a direct push to main
push:
branches: [main]

# run on any push to a PR branch
pull_request:

# run on demand
workflow_dispatch:
inputs:
custom-run-name:
description: "Custom name for this Actions run"
required: false
type: string

# cancel any previously-started, yet still active runs of this workflow on the same branch
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Define Coverage Minimums
run: |
echo "min-coverage-overall=80" >> $GITHUB_ENV
echo "min-coverage-changed-files=80" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "21"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
- name: Generate kover coverage report
run: ./gradlew koverXmlReport
- name: Add coverage report to PR
id: kover
uses: mi-kas/kover-report@v1
with:
path: |
${{ github.workspace }}/app/build/reports/kover/report.xml
title: Code Coverage
update-comment: true
min-coverage-overall: ${{ env.min-coverage-overall }}
min-coverage-changed-files: ${{ env.min-coverage-changed-files }}
coverage-counter-type: LINE
- name: Add short summary to workflow run
run: |
echo "| Type | Coverage | Passing |" >> $GITHUB_STEP_SUMMARY
echo "|---|---|---|" >> $GITHUB_STEP_SUMMARY
echo "| Overall Coverage | ${{ steps.kover.outputs.coverage-overall }}% | ${{ steps.kover.outputs.coverage-overall >= env.min-coverage-overall && ':white_check_mark:' || ':x:' }} |" >> $GITHUB_STEP_SUMMARY
echo "| Changed File Coverage | ${{ steps.kover.outputs.coverage-changed-files }}% | ${{ steps.kover.outputs.coverage-changed-files >= env.min-coverage-changed-files && ':white_check_mark:' || ':x:' }} |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "(Changed File Coverage is currently bugged, disregard)" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "---" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,5 @@ kotlin-ide/
.idea/
.aider*
.env
.idea/misc.xml
.vscode/
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run lint-staged
2 changes: 1 addition & 1 deletion .idea/compiler.xml

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

4 changes: 3 additions & 1 deletion .idea/misc.xml

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

3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build
coverage
node_modules
5 changes: 5 additions & 0 deletions CI_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The CI pipeline behaves as follows:

1. run Prettier on web-related filetypes, as well as XML
a. Do not use prettier-plugin-kotlin, it is not maintained and errors regularly
2. On push, run super-linter. For all possible cases, run autofix (this covers Kotlin)
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
# Project Mesh
-------------------

---

Grey-box.ca
New version by wil-mesh-rmit

Project Mesh runs locally on an android device. Build the project then either export the APK and send to the device, or use ADB to install. The app only works on physical devices, and not the android simulator.
Project Mesh runs locally on an android device. Build the project then either export the APK and send to the device, or use ADB to install. The app only works on physical devices, and not the android simulator.

<div align="center">

![Super-Linter](https://github.com/polygeist111/project-mesh/actions/workflows/format_and_lint.yml/badge.svg)
![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)

</div>

# Deployment Instructions
The Android app runs independently of an internet connection. The APK needs to be installed in each phone, then the phones are able to connect to each other from within the app.

The Android app runs independently of an internet connection. The APK needs to be installed in each phone, then the phones are able to connect to each other from within the app.

1. Open the app
2. When prompted, allow location and nearby devices permissions
3. Wait for a QR code to appear on screen
4. On each phone, use the ‘Scan QR code’ button to scan the codes of adjacent devices
5. Messages are able to be sent to connected devices with the ‘Send’ button and ‘Message’ text box


Credential info: N/A

GitHub URL: https://github.com/grey-box/Project-Mesh
Expand Down
23 changes: 22 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id("kotlin-kapt")
id("com.google.devtools.ksp") version "1.9.0-1.0.13"
kotlin("plugin.serialization") version "1.9.0"
id("org.jetbrains.kotlinx.kover") version "0.9.3"
}

android {
Expand Down Expand Up @@ -84,7 +85,21 @@ dependencies {
implementation(libs.androidx.activity)
implementation(libs.androidx.navigation.compose)
implementation(libs.androidx.lifecycle.viewmodel.android)

testImplementation(libs.junit)

// ===============================
// Unit testing (JVM) deps added
// ===============================
testImplementation("junit:junit:4.13.2")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.8.1")
testImplementation("io.mockk:mockk:1.13.12")
testImplementation("org.robolectric:robolectric:4.12.2")
testImplementation("androidx.test:core:1.6.1")
testImplementation("app.cash.turbine:turbine:1.1.0")



androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(platform(libs.androidx.compose.bom))
Expand Down Expand Up @@ -137,6 +152,12 @@ dependencies {
// optional - Test helpers
testImplementation("androidx.room:room-testing:$room_version")

// Unit test libs (local JVM tests in app/src/test)
testImplementation("io.mockk:mockk:1.13.12")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.8.1")
testImplementation("org.robolectric:robolectric:4.12.2")
testImplementation("androidx.test:core:1.6.1")
Comment on lines +155 to +159
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These test dependencies are duplicates of those already declared around line 94. To improve maintainability and avoid potential version conflicts, please remove this redundant block.


// optional - Paging 3 Integration
implementation("androidx.room:room-paging:$room_version")

Expand All @@ -145,4 +166,4 @@ dependencies {

// For JSON serialisation
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
}
}
Loading
Loading