-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* decouple view in HomeView.kt and theme in PoliterAiTheme.kt and remove not used Platform classes from directories. * remove redundant insetsx dependency * Add ktor to retrieve data from internet * encodeURLParameter and fix error on desktop * upgraded compose-plugin, kotlin and ktorVersion to latest version * fix not scrolling and not being able to see the bottom content in landscape mode * make message alignment to center * suppress warning because it is harmful * add firebase * Create compose_ci.yml * added key.properties to ignored entries * add codemagic.yaml * add required oracle distribution for ci/cd * add required corretto distribution for ci/cd, because oracle does not work * add required semeru distribution for ci/cd, because corretto does not work * add required temurin distribution for ci/cd, because other do not work * change the name of the release file for testing * Add versionName and applicationId to libs.versions.toml file * added codemagic.keystore to ignored entries * Add signing debug and release versions * added keystores to ignored entries * Add write key.properties file to CI * Add write codemagic.keystore file to CI * fix mistake in github action * test * added keystores to ignored entries * delete keystores from version control * add write politerai_release.keystore file to github actions * remove codemagic keystore from github actions * fix mistake with environment * add Create keystore folder to github actions * add Write politerai_debug.keystore file to github actions * fix oversight in github actions CI * test * Add icon * test * add screenshots * Increment version to 1.0.1+2 * Change codemagic.yaml workflow * add FeatureGraphic.png * test CI * test CI * release * Add write codemagic.keystore file. * test * change signingConfigs for codemagic * change the name of the AI model * Update README.md
- Loading branch information
Showing
58 changed files
with
740 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Upload to Firebase App Distribution | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
|
||
jobs: | ||
build: | ||
name: Build Politer AI Android mobile application and upload to Firebase App Distribution | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' # Eclipse Temurin https://adoptium.net/ | ||
|
||
- name: Write key.properties file | ||
run: | | ||
echo $KEY_PROPERTIES | base64 -d > key.properties | ||
shell: bash | ||
env: | ||
KEY_PROPERTIES: ${{ secrets.KEY_PROPERTIES }} | ||
|
||
- name: Create keystore folder | ||
run: mkdir -p composeApp/src/androidMain/keystore | ||
|
||
- name: Write politerai_release.keystore file | ||
env: | ||
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }} | ||
run: | | ||
echo $RELEASE_KEYSTORE | base64 --decode > composeApp/src/androidMain/keystore/politerai_release.keystore | ||
- name: Write politerai_debug.keystore file | ||
run: | | ||
echo $DEBUG_KEYSTORE | base64 -d > composeApp/src/androidMain/keystore/politerai_debug.keystore | ||
shell: bash | ||
env: | ||
DEBUG_KEYSTORE: ${{ secrets.DEBUG_KEYSTORE }} | ||
|
||
- name: Write codemagic.keystore file | ||
run: | | ||
echo $CODEMAGIC_KEYSTORE | base64 -d > composeApp/src/androidMain/keystore/codemagic.keystore | ||
shell: bash | ||
env: | ||
CODEMAGIC_KEYSTORE: ${{ secrets.CODEMAGIC_KEYSTORE }} | ||
|
||
- name: Generate Release APK | ||
run: ./gradlew assembleRelease | ||
|
||
- name: upload artifact to Firebase App Distribution | ||
uses: wzieba/Firebase-Distribution-Github-Action@v1 | ||
with: | ||
appId: ${{secrets.FIREBASE_ANDROID_APP_ID}} | ||
token: ${{secrets.FIREBASE_TOKEN}} | ||
groups: testers | ||
releaseNotes: "Politer AI Android Application Build" | ||
file: composeApp/build/outputs/apk/release/composeApp-release.apk | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,70 @@ | ||
[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct-single.svg)](https://stand-with-ukraine.pp.ua) | ||
|
||
# Politer AI | ||
|
||
[![Codemagic build status](https://api.codemagic.io/apps/656e850f56b6e401cb0544dc/android-kmm-workflow/status_badge.svg)](https://codemagic.io/apps/656e850f56b6e401cb0544dc/android-kmm-workflow/latest_build) | ||
|
||
This is a Kotlin Multiplatform project targeting Android, iOS, Desktop. | ||
**Kotlin Multiplatform** is a broad technology that enables cross-platform development with Kotlin. | ||
|
||
## PROJECT SPECIFICATION | ||
|
||
• Programming language: [Kotlin](https://kotlinlang.org/); | ||
|
||
• SDK: [Android](https://developer.android.com/tools); | ||
|
||
• Framework: [Compose Multiplatform](https://www.jetbrains.com/lp/compose-multiplatform/); | ||
|
||
• Interface: [Compose](https://developer.android.com/jetpack/compose); | ||
|
||
• HTTP client: [Ktor](https://ktor.io); | ||
|
||
• Reactive programming: [Coroutines](https://developer.android.com/kotlin/coroutines); | ||
|
||
• Version control system: [Git](https://git-scm.com); | ||
|
||
• Git Hosting Service: [GitHub](https://github.com); | ||
|
||
• CI/CD: [GitHub Actions](https://docs.github.com/en/actions) is used to deliver new Android | ||
Package (APK) to [Firebase App Distribution](https://firebase.google.com/docs/app-distribution) | ||
after every push to the **dev** branch, [Codemagic](https://codemagic.io/start/) is used to deliver | ||
new release app bundle to **Google Play** after every push to **master** branch; | ||
|
||
• App testing platforms: | ||
[Firebase App Distribution](https://appdistribution.firebase.dev/i/353f302e0032e469); | ||
|
||
• App store: | ||
[Google Play](https://play.google.com/store/apps/details?id=com.turskyi.politerai); | ||
|
||
• Operating system: [Android](https://www.android.com/); | ||
|
||
• Architectural pattern: | ||
[Monolith](https://learn.microsoft.com/en-us/dotnet/architecture/modern-web-apps-azure/common-web-application-architectures#all-in-one-applications); | ||
|
||
### Folder structure | ||
|
||
* `/composeApp` is for code that is shared across Compose Multiplatform applications. | ||
It contains several subfolders: | ||
- `commonMain` is for code that’s common for all targets. | ||
- Other folders are for Kotlin code that will be compiled for only the platform indicated in the | ||
folder name. | ||
|
||
* `/iosApp` contains iOS applications. | ||
|
||
**Kotlin Multiplatform** is a broad technology that enables cross-platform development with Kotlin. | ||
**Compose Multiplatform** is a focused library that enables cross-platform UI development with | ||
Jetpack Compose. | ||
|
||
## Credits | ||
• **Code Readability:** code is easily readable with no unnecessary blank lines, no unused variables | ||
or methods, and no commented-out code, all variables, methods, and resource IDs are descriptively | ||
named such that another developer reading the code can easily understand their function. | ||
|
||
This project is based on the | ||
[Get started with Compose Multiplatform — tutorial](https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-multiplatform-getting-started.html) | ||
by [JetBrains](https://github.com/JetBrains). | ||
• Screenshots: | ||
|
||
<!--suppress CheckImageSize --> | ||
<img src="screenshots/PixelTablet2023.png" width="800" alt="screenshot of the home page"> | ||
<img src="screenshots/PixelXL2023.png" width="200" alt="screenshot"> | ||
|
||
## Credits | ||
|
||
This project is based on the | ||
[Get started with Compose Multiplatform — tutorial](https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-multiplatform-getting-started.html) | ||
by [JetBrains](https://github.com/JetBrains). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
workflows: | ||
android-kmm-workflow: | ||
name: Politer AI Android Kotlin multiplatform workflow to publish app bundle to Google Play | ||
max_build_duration: 120 | ||
environment: | ||
android_signing: | ||
- keystore_reference | ||
groups: | ||
- google_play_credentials # <-- (Includes GCLOUD_SERVICE_ACCOUNT_CREDENTIALS - google-services.json here) | ||
vars: | ||
PACKAGE_NAME: "com.turskyi.politerai" | ||
triggering: | ||
events: | ||
- push | ||
branch_patterns: | ||
- pattern: master | ||
include: true | ||
source: true | ||
scripts: | ||
- name: Build Android release | ||
script: | | ||
LATEST_GOOGLE_PLAY_BUILD_NUMBER=$(google-play get-latest-build-number --package-name "$PACKAGE_NAME") | ||
if [ -z $LATEST_GOOGLE_PLAY_BUILD_NUMBER ]; then | ||
# fallback in case no build number was found from Google Play. | ||
# Alternatively, you can `exit 1` to fail the build | ||
# BUILD_NUMBER is a Codemagic built-in variable tracking the number | ||
# of times this workflow has been built | ||
UPDATED_BUILD_NUMBER=$BUILD_NUMBER | ||
else | ||
UPDATED_BUILD_NUMBER=$(($LATEST_GOOGLE_PLAY_BUILD_NUMBER + 1)) | ||
fi | ||
cd $CM_BUILD_DIR/androidApp | ||
./gradlew bundleRelease \ | ||
-PversionCode=$UPDATED_BUILD_NUMBER \ | ||
-PversionName=1.0.$UPDATED_BUILD_NUMBER | ||
artifacts: | ||
- composeApp/build/outputs/**/**/*.aab | ||
publishing: | ||
email: | ||
recipients: | ||
- [email protected] | ||
notify: | ||
success: true | ||
failure: true | ||
google_play: | ||
credentials: $GCLOUD_SERVICE_ACCOUNT_CREDENTIALS | ||
track: production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.