-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
647 additions
and
377 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
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,2 +1,2 @@ | ||
# Fixes | ||
- Crash fix because of proguard obfuscation #36 [**Android**] | ||
- Offline cache using SQLDelight #40 |
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
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
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,4 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
</manifest> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<application> | ||
<provider | ||
android:name="androidx.startup.InitializationProvider" | ||
android:authorities="${applicationId}.androidx-startup" | ||
android:exported="false" | ||
tools:node="merge"> | ||
|
||
<meta-data | ||
android:name="me.sujanpoudel.playdeals.common.ApplicationContextInitializer" | ||
android:value="androidx.startup" /> | ||
</provider> | ||
|
||
</application> | ||
</manifest> |
14 changes: 14 additions & 0 deletions
14
shared/src/androidMain/kotlin/me/sujanpoudel/playdeals/common/context.kt
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,14 @@ | ||
package me.sujanpoudel.playdeals.common | ||
|
||
import android.content.Context | ||
import androidx.startup.Initializer | ||
|
||
internal lateinit var applicationContext: Context | ||
|
||
internal class ApplicationContextInitializer : Initializer<Context> { | ||
override fun create(context: Context): Context = context.also { | ||
applicationContext = it | ||
} | ||
|
||
override fun dependencies(): List<Class<out Initializer<*>>> = emptyList() | ||
} |
14 changes: 14 additions & 0 deletions
14
...roidMain/kotlin/me/sujanpoudel/playdeals/common/domain/persistent/db/sqlDriver.android.kt
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,14 @@ | ||
package me.sujanpoudel.playdeals.common.domain.persistent.db | ||
|
||
import app.cash.sqldelight.async.coroutines.synchronous | ||
import app.cash.sqldelight.db.SqlDriver | ||
import app.cash.sqldelight.driver.android.AndroidSqliteDriver | ||
import me.sujanpoudel.playdeals.common.Constants | ||
import me.sujanpoudel.playdeals.common.SqliteDatabase | ||
import me.sujanpoudel.playdeals.common.applicationContext | ||
|
||
actual fun createSqlDriver(): SqlDriver = AndroidSqliteDriver( | ||
schema = SqliteDatabase.Schema.synchronous(), | ||
context = applicationContext, | ||
name = Constants.DATABASE_NAME, | ||
) |
Oops, something went wrong.