Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaozhan committed May 9, 2022
2 parents dca333e + 017e3bf commit a5cc5ab
Show file tree
Hide file tree
Showing 48 changed files with 275 additions and 304 deletions.
17 changes: 0 additions & 17 deletions .github/stale.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Dependency Check
name: Dependency

on:
schedule:
Expand All @@ -22,20 +22,8 @@ jobs:
with:
java-version: 11

- name: Run dependency updates task
run: ./gradlew dependencyUpdates -DoutputFormatter=plain

- name: Extract dependencies from report file
id: deps
run: |
export DEPENDENCIES="$(sed -n '/.*milestone versions:/,/^$/p' build/dependencyUpdates/report.txt)"
DEPENDENCIES="${DEPENDENCIES//$'\n'/'%0A'}"
DEPENDENCIES="${DEPENDENCIES//$'\r'/'%0D'}"
echo "OUTPUT:"
echo $DEPENDENCIES
echo "depss=$DEPENDENCIES" >> $GITHUB_ENV
echo "::set-output name=dependencies::$(echo "$DEPENDENCIES")"
shell: bash
- name: Run dependencyUpdates Task
run: ./gradlew dependencyUpdates --parallel

- name: Upload dependencies report
uses: actions/upload-artifact@v2
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ jobs:
echo "${{ secrets.ANDROID_GPG_RELEASE_KEYSTORE }}" > release.keystore.asc
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch release.keystore.asc > android/release.keystore
mkdir android/src/release
echo "${{ secrets.GOOGLE_SERVICES_JSON_ASC }}" > google-services.json.asc
echo "${{ secrets.RELEASE_GOOGLE_SERVICES_JSON_ASC }}" > google-services.json.asc
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch google-services.json.asc > android/src/release/google-services.json
mkdir android/src/debug
echo "${{ secrets.DEBUG_GOOGLE_SERVICES_JSON_ASC }}" > google-services.json.asc
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch google-services.json.asc > android/src/debug/google-services.json
echo "${{ secrets.AG_CONNECT_SERVICES_JSON_ASC }}" > agconnect-services.json.asc
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch agconnect-services.json.asc > android/src/release/agconnect-services.json
echo "${{ secrets.IOS_GPG_FIREBASE_CONFIG }}" > GoogleService-Info.plist.asc
Expand Down Expand Up @@ -96,8 +99,11 @@ jobs:
echo "${{ secrets.ANDROID_GPG_RELEASE_KEYSTORE }}" > release.keystore.asc
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch release.keystore.asc > android/release.keystore
mkdir android/src/release
echo "${{ secrets.GOOGLE_SERVICES_JSON_ASC }}" > google-services.json.asc
echo "${{ secrets.RELEASE_GOOGLE_SERVICES_JSON_ASC }}" > google-services.json.asc
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch google-services.json.asc > android/src/release/google-services.json
mkdir android/src/debug
echo "${{ secrets.DEBUG_GOOGLE_SERVICES_JSON_ASC }}" > google-services.json.asc
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch google-services.json.asc > android/src/debug/google-services.json
echo "${{ secrets.AG_CONNECT_SERVICES_JSON_ASC }}" > agconnect-services.json.asc
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch agconnect-services.json.asc > android/src/release/agconnect-services.json
echo "${{ secrets.IOS_GPG_FIREBASE_CONFIG }}" > GoogleService-Info.plist.asc
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ jobs:
echo "${{ secrets.ANDROID_GPG_RELEASE_KEYSTORE }}" > release.keystore.asc
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch release.keystore.asc > android/release.keystore
mkdir android/src/release
echo "${{ secrets.GOOGLE_SERVICES_JSON_ASC }}" > google-services.json.asc
echo "${{ secrets.RELEASE_GOOGLE_SERVICES_JSON_ASC }}" > google-services.json.asc
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch google-services.json.asc > android/src/release/google-services.json
mkdir android/src/debug
echo "${{ secrets.DEBUG_GOOGLE_SERVICES_JSON_ASC }}" > google-services.json.asc
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch google-services.json.asc > android/src/debug/google-services.json
echo "${{ secrets.AG_CONNECT_SERVICES_JSON_ASC }}" > agconnect-services.json.asc
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch agconnect-services.json.asc > android/src/release/agconnect-services.json
echo "${{ secrets.IOS_GPG_FIREBASE_CONFIG }}" > GoogleService-Info.plist.asc
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ jobs:
echo "${{ secrets.ANDROID_GPG_RELEASE_KEYSTORE }}" > release.keystore.asc
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch release.keystore.asc > android/release.keystore
mkdir android/src/release
echo "${{ secrets.GOOGLE_SERVICES_JSON_ASC }}" > google-services.json.asc
echo "${{ secrets.RELEASE_GOOGLE_SERVICES_JSON_ASC }}" > google-services.json.asc
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch google-services.json.asc > android/src/release/google-services.json
mkdir android/src/debug
echo "${{ secrets.DEBUG_GOOGLE_SERVICES_JSON_ASC }}" > google-services.json.asc
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch google-services.json.asc > android/src/debug/google-services.json
echo "${{ secrets.AG_CONNECT_SERVICES_JSON_ASC }}" > agconnect-services.json.asc
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch agconnect-services.json.asc > android/src/release/agconnect-services.json
Expand Down
87 changes: 39 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ A currency converter application for most of the currencies used in the world.

You can quickly convert and make mathematical operations between currencies.

<a href="https://play.google.com/store/apps/details?id=mustafaozhan.github.com.mycurrencies"><img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" width="250px"></a>
<a href="https://play.google.com/store/apps/details?id=mustafaozhan.github.com.mycurrencies"><img src="https://raw.githubusercontent.com/CurrencyConverterCalculator/CCC/develop/art/play_store.png?raw=true" width="175px"></a>
<a href="https://appgallery.huawei.com/app/C104920917"><img src="https://raw.githubusercontent.com/CurrencyConverterCalculator/CCC/develop/art/appgallery.png?raw=true" width="175px"></a>

<a href="https://github.com/Oztechan/CCC/actions/workflows/main.yml"><img src="https://github.com/CurrencyConverterCalculator/CCC/workflows/CCC%20CI/badge.svg"></a>
<a href="https://www.codacy.com/gh/Oztechan/CCC/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=CurrencyConverterCalculator/CCC&amp;utm_campaign=Badge_Grade"><img src="https://app.codacy.com/project/badge/Grade/2196f4447c32431b80d582a21ad749db"/></a>
Expand All @@ -21,15 +22,39 @@ You can quickly convert and make mathematical operations between currencies.

<a href='https://ko-fi.com/B0B2TZMH' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=2' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>

Main Modules | Completed | State | Tech |
:------------ | :-------------| :-------------| :-------------|
![badge-android](https://img.shields.io/badge/app-android-green) | :white_check_mark:| in production :muscle: | ViewBinding (State/Shared)Flow
![badge-backend](https://img.shields.io/badge/app-backend-blue) | :white_check_mark: | in production :muscle: | Ktor (server/client) Sqldelight
![badge-ios](https://img.shields.io/badge/app-ios-orange) || in progress :bow: | SwiftUI Combine
![badge-web](https://img.shields.io/badge/app-web-yellow) || coming soon :eyes: | :grey_question:
![badge-desktop](https://img.shields.io/badge/app-desktop-red) || coming soon :eyes: | :grey_question:
![badge-client](https://img.shields.io/badge/shared-client-white) | :white_check_mark: | used in FE targets :recycle: | KMP (android/ios)
![badge-common](https://img.shields.io/badge/shared-common-darkgrey) | :white_check_mark: | used in all targets :recycle: | KMP (android/ios/jvm)
## Module Graph

```mermaid
graph TD;
billing-->android
ad-->android
analytics-->android
resources{resources}-->android
resources-->ios
client{client}-->android
client-->ios
config{config}-->client
common{common}-->client
common-->backend
android(android)
ios(ios)
backend(backend)
```

```mermaid
graph TD;
KMP_Library{KMP_Library}
Target(Target)
Library
```

</div>

Expand Down Expand Up @@ -70,53 +95,19 @@ override suspend fun methodXYZ(base: String) = client.get<CurrencyResponseEntity
}
```

## Module Graph

```mermaid
graph TD;
billing-->android
ad-->android
analytics-->android
resources{resources}-->android
resources-->ios
client{client}-->android
client-->ios
config{config}-->client
common{common}-->client
common-->backend
android(android)
ios(ios)
backend(backend)
```

```mermaid
graph TD;
KMP_Library{KMP_Library}
Target(Target)
Library
```

## Android Preview

<img src="https://raw.githubusercontent.com/CurrencyConverterCalculator/CCC/master/art/android/1.png" width="400px"/><img src="https://raw.githubusercontent.com/CurrencyConverterCalculator/CCC/master/art/android/2.png" width="320px"/><img src="https://raw.githubusercontent.com/CurrencyConverterCalculator/CCC/master/art/android/3.png" width="400px"/><img src="https://raw.githubusercontent.com/CurrencyConverterCalculator/CCC/master/art/android/4.png" width="400px"/>
<img src="https://raw.githubusercontent.com/CurrencyConverterCalculator/CCC/develop/art/android/1.png" width="400px"/><img src="https://raw.githubusercontent.com/CurrencyConverterCalculator/CCC/develop/art/android/2.png" width="320px"/><img src="https://raw.githubusercontent.com/CurrencyConverterCalculator/CCC/develop/art/android/3.png" width="400px"/><img src="https://raw.githubusercontent.com/CurrencyConverterCalculator/CCC/develop/art/android/4.png" width="400px"/>

<img src="https://raw.githubusercontent.com/CurrencyConverterCalculator/CCC/master/art/android/5.png" width="400px"/><img src="https://raw.githubusercontent.com/CurrencyConverterCalculator/CCC/master/art/android/6.png" width="400px"/><img src="https://raw.githubusercontent.com/CurrencyConverterCalculator/CCC/master/art/android/7.png" width="400px"/><img src="https://raw.githubusercontent.com/CurrencyConverterCalculator/CCC/master/art/android/6.png" width="400px"/>
<img src="https://raw.githubusercontent.com/CurrencyConverterCalculator/CCC/develop/art/android/5.png" width="400px"/><img src="https://raw.githubusercontent.com/CurrencyConverterCalculator/CCC/develop/art/android/6.png" width="400px"/><img src="https://raw.githubusercontent.com/CurrencyConverterCalculator/CCC/develop/art/android/7.png" width="400px"/><img src="https://raw.githubusercontent.com/CurrencyConverterCalculator/CCC/develop/art/android/6.png" width="400px"/>

## iOS Preview

<img src="https://github.com/CurrencyConverterCalculator/CCC/blob/master/art/ios/dark.gif?raw=true" width="400px"/> <img src="https://github.com/CurrencyConverterCalculator/CCC/blob/master/art/ios/light.gif?raw=true" width="400px"/>
<img src="https://github.com/CurrencyConverterCalculator/CCC/blob/develop/art/ios/dark.gif?raw=true" width="400px"/> <img src="https://github.com/CurrencyConverterCalculator/CCC/blob/develop/art/ios/light.gif?raw=true" width="400px"/>

## Included Currencies

[![currencies.png](https://github.com/CurrencyConverterCalculator/CCC/raw/master/art/currencies.png)](https://github.com/CurrencyConverterCalculator/CCC/raw/master/art/currencies.png)
[![currencies.png](https://github.com/CurrencyConverterCalculator/CCC/raw/develop/art/currencies.png)](https://github.com/CurrencyConverterCalculator/CCC/raw/develop/art/currencies.png)

## License

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ enum class UserProperty(val key: String) {
IS_ROOTED("is_rooted"),
APP_THEME("app_theme"),
IS_AD_FREE("is_ad_free"),
SESSION_COUNT("session_count")
SESSION_COUNT("session_count"),
DEVICE_PLATFORM("device_platform")
}
2 changes: 2 additions & 0 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ android {
}

getByName(BuildType.debug) {
applicationIdSuffix = ".debug"
versionNameSuffix = "-debug"
with(Keys(project, BuildType.DEBUG)) {
resValue(typeString, admobAppId.resourceKey, admobAppId.value)
resValue(typeString, bannerAdIdCalculator.resourceKey, bannerAdIdCalculator.value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import com.github.submob.basemob.adapter.BaseVBRecyclerViewAdapter
import com.oztechan.ccc.analytics.AnalyticsManager
import com.oztechan.ccc.analytics.model.EventParam
import com.oztechan.ccc.analytics.model.FirebaseEvent
import com.oztechan.ccc.android.util.setBackgroundByName
import com.oztechan.ccc.client.model.Currency
import com.oztechan.ccc.client.util.getFormatted
import com.oztechan.ccc.client.util.toStandardDigits
import com.oztechan.ccc.client.viewmodel.calculator.CalculatorEvent
import com.oztechan.ccc.resources.setBackgroundByName
import mustafaozhan.github.com.mycurrencies.databinding.ItemCalculatorBinding

class CalculatorAdapter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ import com.oztechan.ccc.analytics.AnalyticsManager
import com.oztechan.ccc.analytics.model.UserProperty
import com.oztechan.ccc.android.util.copyToClipBoard
import com.oztechan.ccc.android.util.dataState
import com.oztechan.ccc.android.util.getImageResourceByName
import com.oztechan.ccc.android.util.getNavigationResult
import com.oztechan.ccc.android.util.setBackgroundByName
import com.oztechan.ccc.android.util.setBannerAd
import com.oztechan.ccc.android.util.showLoading
import com.oztechan.ccc.android.util.showSnack
import com.oztechan.ccc.client.util.toValidList
import com.oztechan.ccc.client.viewmodel.calculator.CalculatorEffect
import com.oztechan.ccc.client.viewmodel.calculator.CalculatorViewModel
import com.oztechan.ccc.resources.getDrawableIdByFileName
import com.oztechan.ccc.resources.setBackgroundByName
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import mustafaozhan.github.com.mycurrencies.R
Expand Down Expand Up @@ -152,7 +152,7 @@ class CalculatorFragment : BaseVBFragment<FragmentCalculatorBinding>() {
)
CalculatorEffect.OpenBar -> navigate(
R.id.calculatorFragment,
CalculatorFragmentDirections.actionCalculatorFragmentToChangeBaseBottomSheet()
CalculatorFragmentDirections.actionCalculatorFragmentToSelectCurrencyBottomSheet()
)
CalculatorEffect.OpenSettings -> navigate(
R.id.calculatorFragment,
Expand All @@ -162,7 +162,7 @@ class CalculatorFragment : BaseVBFragment<FragmentCalculatorBinding>() {
is CalculatorEffect.ShowRate -> showSnack(
requireView(),
viewEffect.text,
icon = requireContext().getImageResourceByName(viewEffect.name)
icon = getDrawableIdByFileName(viewEffect.name)
)
}
}.launchIn(viewLifecycleOwner.lifecycleScope)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import android.view.ViewGroup
import android.view.animation.AnimationUtils
import androidx.recyclerview.widget.DiffUtil
import com.github.submob.basemob.adapter.BaseVBRecyclerViewAdapter
import com.oztechan.ccc.android.util.setBackgroundByName
import com.oztechan.ccc.client.model.Currency
import com.oztechan.ccc.client.viewmodel.currencies.CurrenciesEvent
import com.oztechan.ccc.resources.setBackgroundByName
import mustafaozhan.github.com.mycurrencies.R
import mustafaozhan.github.com.mycurrencies.databinding.ItemCurrenciesBinding

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ import com.github.submob.basemob.activity.BaseActivity
import com.oztechan.ccc.ad.AdManager
import com.oztechan.ccc.analytics.AnalyticsManager
import com.oztechan.ccc.analytics.model.UserProperty
import com.oztechan.ccc.android.util.getMarketLink
import com.oztechan.ccc.android.util.requestAppReview
import com.oztechan.ccc.android.util.showDialog
import com.oztechan.ccc.android.util.updateAppTheme
import com.oztechan.ccc.android.util.updateBaseContextLocale
import com.oztechan.ccc.client.device
import com.oztechan.ccc.client.model.AppTheme
import com.oztechan.ccc.client.viewmodel.main.MainEffect
import com.oztechan.ccc.client.viewmodel.main.MainViewModel
Expand Down Expand Up @@ -66,7 +68,7 @@ class MainActivity : BaseActivity() {
positiveButton = R.string.update,
cancelable = isCancelable
) {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.app_market_link))))
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(getMarketLink())))
}

private fun checkDestination() = with(getNavigationController()) {
Expand Down Expand Up @@ -97,6 +99,7 @@ class MainActivity : BaseActivity() {
UserProperty.SESSION_COUNT,
mainViewModel.getSessionCount().toString()
)
analyticsManager.setUserProperty(UserProperty.DEVICE_PLATFORM, device.name)
}

override fun onResume() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
package com.oztechan.ccc.android.ui.changebase
package com.oztechan.ccc.android.ui.selectcurrency

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.DiffUtil
import com.github.submob.basemob.adapter.BaseVBRecyclerViewAdapter
import com.oztechan.ccc.android.util.setBackgroundByName
import com.oztechan.ccc.client.model.Currency
import com.oztechan.ccc.client.viewmodel.changebase.ChangeBaseEvent
import mustafaozhan.github.com.mycurrencies.databinding.ItemChangeBaseBinding
import com.oztechan.ccc.client.viewmodel.selectcurrency.SelectCurrencyEvent
import com.oztechan.ccc.resources.setBackgroundByName
import mustafaozhan.github.com.mycurrencies.databinding.ItemSelectCurrencyBinding

class ChangeBaseAdapter(
private val changeBaseEvent: ChangeBaseEvent
class SelectCurrencyAdapter(
private val selectCurrencyEvent: SelectCurrencyEvent
) : BaseVBRecyclerViewAdapter<Currency>(CalculatorDiffer()) {

override fun onCreateViewHolder(
parent: ViewGroup,
viewType: Int
) = CalculatorVBViewHolder(
ItemChangeBaseBinding.inflate(
ItemSelectCurrencyBinding.inflate(
LayoutInflater.from(parent.context),
parent,
false
)
)

inner class CalculatorVBViewHolder(private val itemBinding: ItemChangeBaseBinding) :
inner class CalculatorVBViewHolder(private val itemBinding: ItemSelectCurrencyBinding) :
BaseVBViewHolder<Currency>(itemBinding) {

override fun onItemBind(item: Currency) = with(itemBinding) {
imgIcon.setBackgroundByName(item.name)
txtSettingItem.text = item.getVariablesOneLine()
root.setOnClickListener { changeBaseEvent.onItemClick(item) }
root.setOnClickListener { selectCurrencyEvent.onItemClick(item) }
}
}

Expand Down
Loading

0 comments on commit a5cc5ab

Please sign in to comment.