Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.0 #130

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
distribution: 'adopt'

- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@3
uses: gradle/actions/wrapper-validation@v3

- name: Decrypt the keystore for signing
run: |
Expand Down
8 changes: 4 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ android {
applicationId = "dev.arkbuilders.rate"
minSdk = 26
targetSdk = 34
versionCode = 3
versionName = "1.2.0"
versionCode = 6
versionName = "2.0.2"
setProperty("archivesBaseName", "ark-rate")

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -61,8 +61,8 @@ android {

addManifestPlaceholders(
mapOf(
"appIcon" to "@mipmap/ic_launcher_debug",
"appLabel" to "@string/app_name_debug",
"appIcon" to "@mipmap/ic_launcher",
"appLabel" to "@string/app_name",
),
)
}
Expand Down
10 changes: 5 additions & 5 deletions app/google-services.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"project_info": {
"project_number": "414351467383",
"project_id": "ark-builders-test",
"storage_bucket": "ark-builders-test.appspot.com"
"project_number": "659862496072",
"project_id": "ark-rate-test",
"storage_bucket": "ark-rate-test.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:414351467383:android:be354cff9341b81e623772",
"mobilesdk_app_id": "1:659862496072:android:bd9e57c870395c3802897d",
"android_client_info": {
"package_name": "dev.arkbuilders.rate"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyCn2k1dAY8sqK4rjsjOd38fOr54FPOAdyY"
"current_key": "AIzaSyDYJv31n-7JnZB5FQ1o16zatujTXbfbbpk"
}
],
"services": {
Expand Down
130 changes: 63 additions & 67 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,67 +1,63 @@
<?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.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />

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

<application
android:name=".presentation.App"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="${appIcon}"
android:label="${appLabel}"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Exchange"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".presentation.MainActivity"
android:exported="true"
android:theme="@style/Theme.Exchange"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

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

<receiver android:name=".presentation.quick.glancewidget.QuickPairsWidgetReceiver"
android:exported="true">

<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/glance_widget_provider" />
</receiver>

<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="dev.arkbuilders.rate.androidx-startup"
android:exported="false"
tools:node="merge">
<meta-data
android:name="androidx.work.WorkManagerInitializer"
android:value="androidx.startup"
tools:node="remove" />
</provider>

<meta-data
android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />
<meta-data
android:name="firebase_crashlytics_collection_enabled"
android:value="false" />
<meta-data
android:name="google_analytics_automatic_screen_reporting_enabled"
android:value="false" />
</application>

</manifest>
<?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.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>

<application
android:name=".presentation.App"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="${appIcon}"
android:label="${appLabel}"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Exchange"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".presentation.MainActivity"
android:exported="true"
android:theme="@style/Theme.Exchange"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

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

<receiver android:name=".presentation.quick.glancewidget.QuickPairsWidgetReceiver"
android:exported="true">

<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/glance_widget_provider" />
</receiver>

<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="dev.arkbuilders.rate.androidx-startup"
android:exported="false"
tools:node="merge">
<meta-data
android:name="androidx.work.WorkManagerInitializer"
android:value="androidx.startup"
tools:node="remove" />
</provider>

<meta-data
android:name="firebase_crashlytics_collection_enabled"
android:value="false" />
<meta-data
android:name="google_analytics_automatic_screen_reporting_enabled"
android:value="false" />
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Upsert
import dev.arkbuilders.rate.data.db.entity.RoomAsset
import dev.arkbuilders.rate.domain.model.CurrencyCode
import kotlinx.coroutines.flow.Flow

@Dao
Expand All @@ -22,6 +23,9 @@ interface PortfolioDao {
@Query("SELECT * FROM RoomAsset WHERE id = :id")
suspend fun getById(id: Long): RoomAsset?

@Query("SELECT * FROM RoomAsset WHERE code = :code")
suspend fun getAllByCode(code: CurrencyCode): List<RoomAsset>

@Query("SELECT * FROM RoomAsset")
fun allFlow(): Flow<List<RoomAsset>>

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package dev.arkbuilders.rate.data.repo
import dev.arkbuilders.rate.data.db.dao.PortfolioDao
import dev.arkbuilders.rate.data.db.entity.RoomAsset
import dev.arkbuilders.rate.domain.model.Asset
import dev.arkbuilders.rate.domain.model.CurrencyCode
import dev.arkbuilders.rate.domain.repo.PortfolioRepo
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.map
Expand All @@ -23,6 +24,9 @@ class PortfolioRepoImpl @Inject constructor(

override suspend fun getById(id: Long) = dao.getById(id)?.toAsset()

override suspend fun getAllByCode(code: CurrencyCode) =
dao.getAllByCode(code).map { it.toAsset() }

override suspend fun setAsset(asset: Asset) = dao.insert(asset.toRoom())

override suspend fun setAssetsList(list: List<Asset>) = dao.insertList(list.map { it.toRoom() })
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
package dev.arkbuilders.rate.data.worker

import androidx.work.DelegatingWorkerFactory
import dev.arkbuilders.rate.domain.repo.TimestampRepo
import dev.arkbuilders.rate.domain.usecase.HandlePairAlertCheckUseCase
import javax.inject.Inject
import javax.inject.Singleton

@Singleton
class AppWorkerFactory @Inject constructor(
private val handlePairAlertCheckUseCase: HandlePairAlertCheckUseCase,
private val timestampRepo: TimestampRepo,
) : DelegatingWorkerFactory() {
class AppWorkerFactory @Inject constructor() : DelegatingWorkerFactory() {
init {
addFactory(
CurrencyMonitorWorkerFactory(
handlePairAlertCheckUseCase,
timestampRepo,
),
)
addFactory(
QuickPairsWidgetRefreshWorkerFactory(),
)
Expand Down

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/java/dev/arkbuilders/rate/di/AppComponent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import dev.arkbuilders.rate.data.repo.PortfolioRepoImpl
import dev.arkbuilders.rate.data.repo.QuickRepoImpl
import dev.arkbuilders.rate.data.repo.currency.CurrencyRepoImpl
import dev.arkbuilders.rate.data.worker.AppWorkerFactory
import dev.arkbuilders.rate.data.worker.CurrencyMonitorWorker
import dev.arkbuilders.rate.di.module.ApiModule
import dev.arkbuilders.rate.di.module.DBModule
import dev.arkbuilders.rate.di.module.RepoModule
Expand All @@ -17,8 +16,6 @@ import dev.arkbuilders.rate.domain.repo.Prefs
import dev.arkbuilders.rate.domain.usecase.CalcFrequentCurrUseCase
import dev.arkbuilders.rate.domain.usecase.ConvertWithRateUseCase
import dev.arkbuilders.rate.domain.usecase.GetSortedPinnedQuickPairsUseCase
import dev.arkbuilders.rate.presentation.pairalert.AddPairAlertViewModelFactory
import dev.arkbuilders.rate.presentation.pairalert.PairAlertViewModelFactory
import dev.arkbuilders.rate.presentation.portfolio.AddAssetViewModelFactory
import dev.arkbuilders.rate.presentation.portfolio.EditAssetViewModelFactory
import dev.arkbuilders.rate.presentation.portfolio.PortfolioViewModelFactory
Expand All @@ -43,10 +40,6 @@ interface AppComponent {

fun addQuickVMFactory(): AddQuickViewModelFactory.Factory

fun pairAlertVMFactory(): PairAlertViewModelFactory

fun addPairAlertVMFactory(): AddPairAlertViewModelFactory.Factory

fun quickVMFactory(): QuickViewModelFactory.Factory

fun editAssetVMFactory(): EditAssetViewModelFactory.Factory
Expand All @@ -69,8 +62,6 @@ interface AppComponent {

fun convertUseCase(): ConvertWithRateUseCase

fun inject(currencyMonitorWorker: CurrencyMonitorWorker)

fun calcFrequentCurrUseCase(): CalcFrequentCurrUseCase

fun getSortedPinnedQuickPairsUseCase(): GetSortedPinnedQuickPairsUseCase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dev.arkbuilders.rate.domain.repo

import dev.arkbuilders.rate.domain.model.Asset
import dev.arkbuilders.rate.domain.model.CurrencyCode
import kotlinx.coroutines.flow.Flow

interface PortfolioRepo {
Expand All @@ -10,6 +11,8 @@ interface PortfolioRepo {

suspend fun getById(id: Long): Asset?

suspend fun getAllByCode(code: CurrencyCode): List<Asset>

suspend fun setAsset(asset: Asset)

suspend fun setAssetsList(list: List<Asset>)
Expand Down
Loading