Skip to content

Commit

Permalink
SQLDelight 2.0.1 and Paging MP 3.3.0-alpha02-0.4.0 (#1661)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbanes committed Dec 4, 2023
1 parent 28f02b8 commit 430de02
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 37 deletions.
5 changes: 5 additions & 0 deletions data/db-sqldelight/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ kotlin {
val iosMain by getting {
dependencies {
implementation(libs.sqldelight.native)

// Need to explicitly depend on these, otherwise the build fails.
implementation("co.touchlab:stately-common:2.0.5")
implementation("co.touchlab:stately-isolate:2.0.5")
implementation("co.touchlab:stately-iso-collections:2.0.5")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,37 +38,38 @@ class SqlDelightLibraryShowsDao(
),
transacter = db.library_showsQueries,
context = dispatchers.io,
) { limit: Long, offset: Long ->
db.library_showsQueries.entries(
includeWatched = includeWatched.sqlValue,
includeFollowed = includeFollowed.sqlValue,
filter = searchQuery,
sort = sort.sqlValue,
limit = limit,
offset = offset,
) {
id, title, original_title, trakt_id, tmdb_id, imdb_id, overview, homepage,
trakt_rating, trakt_votes, certification, first_aired, country, network,
network_logo_path, runtime, genres, status, airs_day, airs_time, airs_tz,
// watched show
id_, show_id, last_watched, last_updated,
// show stats
show_id_, episode_count, watched_episode_count,
->
LibraryShow(
show = TiviShow(
queryProvider = { limit: Long, offset: Long ->
db.library_showsQueries.entries(
includeWatched = includeWatched.sqlValue,
includeFollowed = includeFollowed.sqlValue,
filter = searchQuery,
sort = sort.sqlValue,
limit = limit,
offset = offset,
) {
id, title, original_title, trakt_id, tmdb_id, imdb_id, overview, homepage,
trakt_rating, trakt_votes, certification, first_aired, country, network,
network_logo_path, runtime, genres, status, airs_day, airs_time, airs_tz,
),
stats = show_id_?.let {
ShowsWatchStats(show_id_, episode_count!!, watched_episode_count!!)
},
watchedEntry = id_?.let {
WatchedShowEntry(id_, show_id!!, last_watched!!, last_updated!!)
},
)
}
}
// watched show
id_, show_id, last_watched, last_updated,
// show stats
show_id_, episode_count, watched_episode_count,
->
LibraryShow(
show = TiviShow(
id, title, original_title, trakt_id, tmdb_id, imdb_id, overview, homepage,
trakt_rating, trakt_votes, certification, first_aired, country, network,
network_logo_path, runtime, genres, status, airs_day, airs_time, airs_tz,
),
stats = show_id_?.let {
ShowsWatchStats(show_id_, episode_count!!, watched_episode_count!!)
},
watchedEntry = id_?.let {
WatchedShowEntry(id_, show_id!!, last_watched!!, last_updated!!)
},
)
}
},
)
}
}
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ okhttp = "4.12.0"
kermit = "1.2.3" # Pinned back as Store uses Kermit 1.x
ktlint = "1.0.1"
ktor = "2.3.6"
paging-multiplatform = "3.2.0-alpha05-0.2.3"
paging-multiplatform = "3.3.0-alpha02-0.4.0"
spotless = "6.23.2"
sqldelight = "2.1.0-SNAPSHOT"
sqldelight = "2.0.1"
licensee = "1.8.0"

[plugins]
Expand Down
12 changes: 6 additions & 6 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ pluginManagement {
gradlePluginPortal()

// Prerelease versions of Compose Multiplatform
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
// maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")

// Used for snapshots if needed
maven("https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
// maven("https://oss.sonatype.org/content/repositories/snapshots/")
// maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
}

Expand All @@ -36,11 +36,11 @@ dependencyResolutionManagement {
mavenLocal()

// Prerelease versions of Compose Multiplatform
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
// maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")

// Used for snapshots if needed
maven("https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
// maven("https://oss.sonatype.org/content/repositories/snapshots/")
// maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
}

Expand Down

0 comments on commit 430de02

Please sign in to comment.