Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4ad1eb0
feat: update ci pipeline to trigger based on file changes in android/ios
xleonx0x Mar 22, 2026
7566550
feat(android): setup basic android codebase
xleonx0x Mar 22, 2026
e310ffd
chore: added separate jobs for lint, build, tests
xleonx0x Mar 22, 2026
dd01548
Chore: added basic colors
Apr 17, 2026
ff73fee
refactor: refactored the project structure
PPigeon98 Apr 23, 2026
4d0e173
refactor: added a tests folder
PPigeon98 Apr 24, 2026
2e08344
feat(android): added graphql queries and schema
xleonx0x Apr 25, 2026
315736a
feat(android): added graphql client
xleonx0x Apr 25, 2026
80e0d1b
feat(android): added buildings model and repository
xleonx0x Apr 25, 2026
819472f
feat(android): added simple building screen and view model
xleonx0x Apr 25, 2026
8ad7b34
feat(android): added main UI entry
xleonx0x Apr 25, 2026
a61d9c2
chore(android): added gradle dependencies
xleonx0x Apr 25, 2026
bd16479
chore(android): removed Koin library, to now use manual dependency in…
xleonx0x Apr 27, 2026
7d50b60
Merge branch 'main' of github.com:devsoc-unsw/freerooms-mobile into a…
xleonx0x Apr 27, 2026
708d2a7
chore(android): ran formatter and fixed linting
xleonx0x Apr 27, 2026
403c990
chore(android): fix ci
xleonx0x Apr 27, 2026
9adb4e3
chore(android): fix test by mocking apollo exception
xleonx0x Apr 27, 2026
f66a4ce
feat: created proper icons for the app
PPigeon98 Apr 28, 2026
82a8dbf
chore: remove random .idea folder
xleonx0x Apr 28, 2026
eb919f1
refactor(android): split into multi-module app
xleonx0x Apr 30, 2026
54b7e79
chore(android): run formatter
xleonx0x Apr 30, 2026
9bc3c8f
feat(android): add git hooks for android codebase
xleonx0x Apr 30, 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
61 changes: 61 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Android CI

on:
pull_request:
branches: [ main ]
paths:
- 'android/**'
- '.github/workflows/android.yml'

jobs:
Lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: android
steps:
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Run Linter and Formatter
run: ./gradlew detekt && ./gradlew ktfmtCheck
Build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: android
steps:
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build Apk
run: ./gradlew assembleDebug
Tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: android
steps:
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Run Tests
run: ./gradlew test
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml → .github/workflows/ios.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: CI
name: iOS CI

on:
pull_request:
branches: [ main ]
paths:
- 'ios/**'
- '.github/workflows/ios.yml'

env:
DEVELOPER_DIR: /Applications/Xcode_26.3.app/Contents/Developer
Expand Down
49 changes: 49 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Log/OS Files
*.log

# Android Studio generated files and folders
captures/
.externalNativeBuild/
.cxx/
*.aab
*.apk
output-metadata.json

# IntelliJ
*.iml
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml

# Keystore files
*.jks
*.keystore

# Google Services (e.g. APIs or Firebase)
google-services.json

# Android Profiling
*.hprof
3 changes: 3 additions & 0 deletions android/.idea/.gitignore

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

1 change: 1 addition & 0 deletions android/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
68 changes: 68 additions & 0 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.compose)
id("dev.detekt") version ("2.0.0-alpha.2")
}

detekt {
buildUponDefaultConfig = true
Comment thread
xleonx0x marked this conversation as resolved.
}

android {
namespace = "com.devsoc.freerooms"
compileSdk = 36

defaultConfig {
applicationId = "com.devsoc.freerooms"
minSdk = 29
targetSdk = 36
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

buildFeatures {
compose = true
}
}

dependencies {
implementation(project(":core:ui"))
implementation(project(":core:network"))
implementation(project(":feature:buildings"))
implementation(project(":feature:rooms"))

implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.activity.compose)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.graphics)
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.lifecycle.viewmodel.compose)

implementation(platform(libs.okhttp.bom))
implementation(libs.okhttp)
implementation(libs.okhttp.logging)

detektPlugins(libs.detekt.compose.rules)

debugImplementation(libs.androidx.compose.ui.tooling)
debugImplementation(libs.androidx.compose.ui.test.manifest)
}
21 changes: 21 additions & 0 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
29 changes: 29 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
android:name=".MainApplication"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Freerooms">
<activity
android:name=".MainActivity"
android:exported="true"
android:theme="@style/Theme.Freerooms">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
Binary file added android/app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions android/app/src/main/java/com/devsoc/freerooms/AppContainer.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.devsoc.freerooms

import android.util.Log
import com.apollographql.apollo.ApolloClient
import com.apollographql.apollo.network.okHttpClient
import com.devsoc.freerooms.core.network.LiveGraphQLClient
import com.devsoc.freerooms.core.network.NetworkConstants
import com.devsoc.freerooms.feature.buildings.data.LiveBuildingRepository
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor

class AppContainer {

private val okHttpClient = OkHttpClient.Builder()
.addInterceptor(HttpLoggingInterceptor { message ->
Log.d("OkHttp", message)
}.apply {
level = HttpLoggingInterceptor.Level.BODY
})
.build()

private val apolloClient = ApolloClient.Builder()
.serverUrl(NetworkConstants.SERVER_URL)
.okHttpClient(okHttpClient)
.build()

private val graphQLClient = LiveGraphQLClient(apolloClient)

val buildingRepository = LiveBuildingRepository(graphQLClient)
}
26 changes: 26 additions & 0 deletions android/app/src/main/java/com/devsoc/freerooms/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.devsoc.freerooms

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
import com.devsoc.freerooms.core.ui.FreeroomsTheme
import com.devsoc.freerooms.feature.buildings.ui.BuildingScreen

class MainActivity : ComponentActivity() {

private val buildingViewModel by viewModels<com.devsoc.freerooms.feature.buildings.data.BuildingViewModel> {
MainApplication.BuildingViewModelFactory
}

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContent {
FreeroomsTheme {
BuildingScreen(viewModel = buildingViewModel)
}
}
}
}
21 changes: 21 additions & 0 deletions android/app/src/main/java/com/devsoc/freerooms/MainApplication.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.devsoc.freerooms

import android.app.Application
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.viewmodel.initializer
import androidx.lifecycle.viewmodel.viewModelFactory
import com.devsoc.freerooms.feature.buildings.data.BuildingViewModel

class MainApplication : Application() {
val appContainer = AppContainer()

companion object {
val BuildingViewModelFactory = viewModelFactory {
initializer {
val application = (this[ViewModelProvider.AndroidViewModelFactory.APPLICATION_KEY] as MainApplication)
val repository = application.appContainer.buildingRepository
BuildingViewModel(repository = repository)
}
}
}
}
50 changes: 50 additions & 0 deletions android/app/src/main/res/drawable/freerooms_logo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="147dp"
android:height="236dp"
android:viewportWidth="147"
android:viewportHeight="236">
<path
android:pathData="M91,0L0,52L14,60L105,8L91,0Z"
android:fillColor="#F1915B"/>
<path
android:pathData="M91,32L84,36L140,68L147,64L105,40L91,32Z"
android:fillColor="#F1915B"/>
<path
android:pathData="M105,8L14,60V236L28,228V220V68L77,40L84,36L91,32L105,40V8Z"
android:fillColor="#B5512F"/>
<path
android:pathData="M14,60L0,52V228L14,236V60Z"
android:fillColor="#94442A"/>
<path
android:pathData="M147,224V64L140,68V228L147,224Z"
android:fillColor="#B5512F"/>
<path
android:pathData="M77,192L140,228V68L84,36L77,40V192ZM91,112V64L98,68L105,72L119,80V120V128L105,120L91,112ZM120.37,156.83C117.79,158.47 114.04,157.21 112,154C109.96,150.79 110.4,146.86 112.99,145.22C113.11,145.14 113.24,145.07 113.36,145.01L116.37,143.29C118.96,141.65 122.7,142.91 124.74,146.12C126.78,149.32 126.34,153.26 123.75,154.9L120.37,156.83Z"
android:fillColor="#D4613C"
android:fillType="evenOdd"/>
<path
android:pathData="M112,154C114.04,157.21 117.79,158.47 120.37,156.83C122.96,155.19 123.4,151.26 121.36,148.05C119.42,144.99 115.92,143.7 113.36,145.01L112.99,145.22C110.4,146.86 109.96,150.79 112,154Z"
android:fillColor="#E39345"/>
<path
android:pathData="M121.36,148.05C123.4,151.26 122.96,155.19 120.37,156.83L123.75,154.9C126.34,153.26 126.78,149.32 124.74,146.12C122.7,142.91 118.96,141.65 116.37,143.29L113.36,145.01C115.92,143.7 119.42,144.99 121.36,148.05Z"
android:fillColor="#F9AA53"/>
<path
android:pathData="M91,64V112L98,108V68L91,64Z"
android:fillColor="#9EAEB6"/>
<path
android:pathData="M98,108L91,112L105,120V112L98,108Z"
android:fillColor="#AFC0C8"/>
<path
android:pathData="M98,68V108L105,112V72L98,68Z"
android:fillColor="#BBD6E3"/>
<path
android:pathData="M98,68V108L105,112V72L98,68Z"
android:fillColor="#B5512F"
android:fillAlpha="0.2"/>
<path
android:pathData="M119,120V80L105,72V112L119,120Z"
android:fillColor="#BBD6E3"/>
<path
android:pathData="M119,128V120L105,112V120L119,128Z"
android:fillColor="#AFC0C8"/>
</vector>
10 changes: 10 additions & 0 deletions android/app/src/main/res/drawable/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#FFFFFF"
android:pathData="M0,0h108v108h-108z" />
</vector>
Loading
Loading