Skip to content

Commit

Permalink
0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ALEGATOR1209 authored Jun 5, 2021
2 parents 5694f10 + 8c06b96 commit 572651e
Show file tree
Hide file tree
Showing 209 changed files with 4,750 additions and 631 deletions.
6 changes: 2 additions & 4 deletions .github/hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ fi;
echo "Running ktlint over these files:"
echo "$CHANGED_FILES"

./gradlew --quiet ktlintCheck -PinternalKtlintGitFilter="$CHANGED_FILES"
./gradlew --quiet ktlintFormat -PinternalKtlintGitFilter="$CHANGED_FILES"
git add $CHANGED_FILES

echo "Completed ktlint run."

echo "Completed ktlint hook."
######## KTLINT-GRADLE HOOK END ########
28 changes: 22 additions & 6 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Android CI

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

jobs:
build:
Expand All @@ -18,4 +14,24 @@ jobs:
with:
java-version: 1.8
- name: Build with Gradle
run: ./gradlew build
run: ./gradlew assembleDebug
- name: Upload APK
uses: actions/upload-artifact@v2
with:
name: app-debug.apk
path: app/build/outputs/apk/debug/app-debug.apk

test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Run tests
run: ./gradlew -Pci --console=plain test
- name: Publish Test Report
uses: mikepenz/action-junit-report@v2
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
27 changes: 25 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
# Lemon changelog

## Unversioned:
- Put changes here;
## Version history
* [0.1.0](#010)
* [0.0.4](#004)
* [0.0.3](#003)
* [0.0.2](#002)

## 0.1.0
- MVP release

## 0.0.4
- Feature: HomeScreen;
- Feature: Cards;
- Feature: Transactions;
- Feature: Registration;

## 0.0.3:
- Feature: Profile;
- User can change username, login or password;
- Logout and autologin added.

## 0.0.2:
- Feature: Login;
- User use cases;
- basic DI;
- basic app architecture.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# lemon-android
![build](https://github.com/AlmostGreatBand/lemon-android/actions/workflows/android.yml/badge.svg)
# Lemon🍋 Android

The actual code is on the `dev` branch, waiting for transaction-cache feature and will be merged here in the near future
Android client for Lemon App.

android-client🍋
| VERSIONS |
| ------------------------------- |
| __[Changelog](CHANGELOG.md)__ |
| __[Release plan](RELEASES.md)__ |

# Team:
- [Zhenya Zasko](https://github.com/NeProgramist)
- [Oleh Kovalyshyn](https://github.com/ALEGATOR1209)
- [Victoria Romanova](https://github.com/V1ckeyR)
2 changes: 1 addition & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This document describes main features that must be implemented in each version

Newest version: 0.0.0
Newest version: 0.0.3

## 0.1.0

Expand Down
80 changes: 37 additions & 43 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

def getProp(name) {
return System.getenv(name) ?: rootProject.localprops[name] ?: project[name]
}

def genVersionCode() {
return project.versionMajorApp * 100000 + project.versionMinorApp * 1000 + project.versionPatch.toInteger()
Expand All @@ -15,23 +9,24 @@ def genVersionName() {
return "${project.versionMajorApp}.${project.versionMinorApp}.${project.versionPatch}"
}


android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
buildToolsVersion "30.0.3"

defaultConfig {
applicationId "com.agb.lemon_android"
minSdkVersion 21
minSdkVersion 23
targetSdkVersion 30
versionCode genVersionCode()
versionName genVersionName()

buildConfigField "String", "API_BASE_URL", '"' + getProp('API_BASE_URL') + '"'

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

kotlinOptions {
jvmTarget = '1.8'
}

buildTypes {
release {
minifyEnabled false
Expand All @@ -49,47 +44,46 @@ android {
into "../.git/hooks"
fileMode 0777
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}

}

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.12'

def preference_version = "1.1.1"
implementation "androidx.preference:preference-ktx:$preference_version"

def lifecycle_version = "2.2.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"

def retrofit_version = "2.9.0"
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"

def coroutines_adapter_version = "1.0.0"
implementation "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-experimental-adapter:$coroutines_adapter_version"

def room_version = "2.2.5"
implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-ktx:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"

def recycler_version = "1.1.0"
implementation "androidx.recyclerview:recyclerview:$recycler_version"
implementation "androidx.core:core-ktx:$androidx_core_version"
implementation "androidx.appcompat:appcompat:$androidx_app_compat_version"
implementation "androidx.constraintlayout:constraintlayout:$androidx_constraint_layout_version"
implementation "androidx.legacy:legacy-support-v4:$androidx_legacy_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$androidx_lifecycle_version"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$androidx_lifecycle_version"
implementation "androidx.recyclerview:recyclerview:$androidx_recycler_version"

def material_version = "1.3.0-alpha03"
implementation "com.google.android.material:material:$material_version"

def coroutines_version = "1.4.0-M1"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "io.insert-koin:koin-core:$koin_version"
implementation "io.insert-koin:koin-android:$koin_version"

androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation project(path: ':data')
implementation project(path: ':core')
implementation 'com.squareup.okhttp3:logging-interceptor:3.8.0'
implementation project(path: ':core-ui')
implementation project(path: ':feature-login')
implementation project(path: ':feature-home')
implementation project(path: ':feature-profile')
implementation project(path: ':feature-registration')
implementation project(path: ':feature-cards')
implementation project(path: ':feature-transactions')

testImplementation "junit:junit:$junit_version"
testImplementation "org.mockito:mockito-core:$mockito_version"
testImplementation "org.mockito:mockito-inline:$mockito_inline_version"
testImplementation "androidx.arch.core:core-testing:$androidx_arch_version"
androidTestImplementation "androidx.test.ext:junit:$androidx_junit_version"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidx_espresso_version"
}

This file was deleted.

11 changes: 10 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.agb.lemon_android">

<uses-permission android:name="android.permission.INTERNET"/>

<application
android:name=".di.App"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:theme="@style/LemonTheme"
android:allowBackup="false">
<activity android:name=".ui.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

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

<meta-data
android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />

</application>

</manifest>
Binary file added 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.
37 changes: 37 additions & 0 deletions app/src/main/java/com/agb/lemon_android/di/App.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.agb.lemon_android.di

import android.app.Application
import com.agb.data.di.dataModule
import com.agb.feature_cards.di.cardsModule
import com.agb.feature_home.di.homeModule
import com.agb.feature_login.di.loginModule
import com.agb.feature_profile.di.profileModule
import com.agb.feature_registration.di.registrationModule
import com.agb.feature_transactions.di.transactionsModule
import org.koin.android.ext.koin.androidContext
import org.koin.android.ext.koin.androidLogger
import org.koin.core.context.startKoin
import org.koin.core.logger.Level

class App : Application() {
override fun onCreate() {
super.onCreate()

startKoin {
androidContext(applicationContext)
androidLogger(Level.DEBUG)

// app
modules(appModule)
modules(dataModule)

// features
modules(transactionsModule)
modules(cardsModule)
modules(loginModule)
modules(homeModule)
modules(profileModule)
modules(registrationModule)
}
}
}
9 changes: 9 additions & 0 deletions app/src/main/java/com/agb/lemon_android/di/AppModule.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.agb.lemon_android.di

import com.agb.lemon_android.ui.MainViewModel
import org.koin.androidx.viewmodel.dsl.viewModel
import org.koin.dsl.module

val appModule = module {
viewModel { MainViewModel(get()) }
}
9 changes: 0 additions & 9 deletions app/src/main/java/com/agb/lemon_android/frameworks/App.kt

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 572651e

Please sign in to comment.