Skip to content

Commit

Permalink
Merge pull request #113 from joelkanyi/develop
Browse files Browse the repository at this point in the history
Minor changes and fixes
  • Loading branch information
joelkanyi committed Jun 4, 2024
2 parents 5520fbf + b2bb659 commit 4e785dc
Show file tree
Hide file tree
Showing 137 changed files with 2,116 additions and 1,668 deletions.
29 changes: 29 additions & 0 deletions .github/config/configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"categories": [
{
"title": "## 🚀 Features",
"labels": [
"feature"
]
},
{
"title": "## 🐛 Fixes",
"labels": [
"fix"
]
},
{
"title": "## 🧪 Tests",
"labels": [
"test"
]
},
{
"title": "## 💬 Other",
"labels": [
"other",
"dependencies"
]
}
]
}
22 changes: 15 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,35 @@ name: Build

on:
push:
branches: [ develop ]
branches: [ develop, main ]
pull_request:
branches: [ main, develop ]

concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true

jobs:

build:
name: 🔨 Build
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3

- name: Set up JDK 17
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 17
java-version: '17'
distribution: 'adopt'
cache: gradle

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

- name: Build with gradle
run: ./gradlew build --stacktrace
- name: Build app
run: ./gradlew assemble --stacktrace
144 changes: 144 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
name: Release

on:
push:
tags:
- '*'

defaults:
run:
shell: bash

jobs:
release_desktop:
name: Release Desktop App
strategy:
fail-fast: false
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
cache: gradle

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

- name: Checkout Gradle Build Cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
!~/.gradle/wrapper/dists/**/gradle*.zip
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
gradle-${{ runner.os }}-
- name: Build app
run: ./gradlew :desktop:assemble --stacktrace

- name: Build Release App
run: |
./gradlew packageUberJarForCurrentOS
./gradlew package
- name: Archive Artifacts
uses: actions/upload-artifact@v2
with:
name: distributable-${{ matrix.os }}
if-no-files-found: ignore
path: |
desktop/build/**/*.deb
desktop/build/**/*.msi
desktop/build/**/*.dmg
desktop/build/compose/jars/*.jar
- name: Release
uses: softprops/action-gh-release@91409e712cf565ce9eff10c87a8d1b11b81757ae
with:
prerelease: ${{ contains(github.event.inputs.version, '-rc') || contains(github.event.inputs.version, '-b') || contains(github.event.inputs.version, '-a') }}
files: |
desktop/build/**/*.deb
desktop/build/**/*.msi
desktop/build/**/*.dmg
desktop/build/compose/jars/*.jar
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}

release_android:
name: Release Android App
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
cache: gradle

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

- name: Build app
run: ./gradlew :android:assembleRelease --stacktrace

- name: Archive Artifacts
uses: actions/upload-artifact@v2
with:
name: android-app
if-no-files-found: ignore
path: android/build/outputs/apk/release/*.apk

- name: Release
uses: softprops/action-gh-release@91409e712cf565ce9eff10c87a8d1b11b81757ae
with:
prerelease: ${{ contains(github.event.inputs.version, '-rc') || contains(github.event.inputs.version, '-b') || contains(github.event.inputs.version, '-a') }}
files: |
android/build/outputs/apk/release/*.apk
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}

changelog:
name: Changelog
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v1
with:
configuration: ".github/config/configuration.json"
commitMode: true
ignorePreReleases: ${{ !contains(github.ref, '-') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Release
uses: softprops/action-gh-release@91409e712cf565ce9eff10c87a8d1b11b81757ae
with:
body: ${{steps.github_release.outputs.changelog}}
prerelease: ${{ contains(github.event.inputs.version, '-rc') || contains(github.event.inputs.version, '-b') || contains(github.event.inputs.version, '-a') }}
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
106 changes: 99 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,103 @@
*.iml
# Gradle
.gradle
build/

captures

/local.properties
.idea

# IntelliJ .idea folder
.idea/workspace.xml
.idea/misc.xml
.idea/libraries
.idea/caches
.idea/navEditor.xml
.idea/tasks.xml
.idea/modules.xml
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/deploymentTargetDropDown.xml
.idea/androidTestResultsUserPreferences.xml
.idea/appInsightsSettings.xml
.idea/artifacts
gradle.xml
*.iml
.fleet

# General
.DS_Store
/build
*/build
/captures
.externalNativeBuild
.cxx
local.properties

# Do not commit plain-text release keys
app-release.jks
play-account.p12
play-account.json

# Do not commit firebase config
google-services.json

# VS Code config
org.eclipse.buildship.core.prefs
.classpath
.project
bin/

# Docs
site/
.cache/

# Ignore baseline profile files in samples
sample/**/generated

##########################################################################################
# Imported from https://github.com/github/gitignore/blob/main/Swift.gitignore
##########################################################################################

# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
xcuserdata/

## Obj-C/Swift specific
*.hmap

## App packaging
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm

.build/

# fastlane
#
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

report.xml
Preview.html
screenshots/**/*.png
test_output

*.env*

.kotlin
6 changes: 0 additions & 6 deletions .scripts/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ else
exit 1
fi

./gradlew app:ktlintCheck --daemon
STATUS=$?

# return 1 exit code if running checks
[ $STATUS -ne 0 ] && exit 1
exit 0

# Branch
branch="$(git rev-parse --abbrev-ref HEAD)"
Expand Down
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<p align="center"><img src="art/app_logo.png" alt="MealTime" height="150px"></p>

# FocusBloom
FocusBloom is a Kotlin Multiplatform app that helps users enhance their productivity and time management skills through focused work intervals and short breaks.

Expand All @@ -12,7 +10,6 @@ FocusBloom is a Kotlin Multiplatform app that helps users enhance their producti
![](https://img.shields.io/badge/Android-black.svg?style=for-the-badge&logo=android) | ![](https://img.shields.io/badge/iOS-black.svg?style=for-the-badge&logo=apple) | ![](https://img.shields.io/badge/Desktop-black.svg?style=for-the-badge&logo=windows) | ![](https://img.shields.io/badge/Web-black.svg?style=for-the-badge&logo=google-chrome)
:----: | :----: | :----: | :----:
✅ | ✅ | ✅ | Planned
<a href='https://play.google.com/store/apps/details?id=com.joelkanyi.focusbloom.android'><img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png' height='80px'/></a>

## Screenshots
### Android
Expand All @@ -29,6 +26,18 @@ FocusBloom is a Kotlin Multiplatform app that helps users enhance their producti
## Architecture
The app is shared between Android, iOS and Desktop. The shared code is written in Kotlin and the UI is built with Compose Multiplatform. Shared code, written in Kotlin, is compiled to JVM bytecode for Android and Desktop with Kotlin/JVM and to native binaries for iOS with Kotlin/Native.
### Modules

```mermaid
%%{
init: {
'theme': 'neutral'
}
}%%
graph LR
:desktop --> :shared
:android --> :shared
```
- shared:
- contains all the shared code between the platforms
- android:
Expand All @@ -51,8 +60,6 @@ The app is shared between Android, iOS and Desktop. The shared code is written i
- [Compose Components Resources](https://mvnrepository.com/artifact/org.jetbrains.compose.components/components-resources) - Resources For Compose Multiplatform.
- [Material3 Window Size Multiplatform](https://github.com/chrisbanes/material3-windowsizeclass-multiplatform) - About Material 3 Window Size Class for Compose Multiplatform.
- [Spotless](https://github.com/diffplug/spotless) - A code formatter that helps keep the codebase clean.
- [Detekt](https://github.com/detekt/detekt) - Static code analysis for Kotlin.
- [Ktlint](https://github.com/pinterest/ktlint) - A static code analysis tool and formatter for Kotlin.
- [Github Actions](https://docs.github.com/en/actions) - A CI/CD tool that helps automate workflows.
- [Renovate](https://docs.renovatebot.com/) - An open-source software tool designed to help automate the process of updating dependencies in software projects.

Expand Down Expand Up @@ -85,4 +92,4 @@ Copyright 2023 JoelKanyi
See the License for the specific language governing permissions and
limitations under the License.
```


Loading

0 comments on commit 4e785dc

Please sign in to comment.