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

Upgrade Gradle to 5.4.1, gradle plugin to 3.5.1 and WellSql to 1.5.0 #1397

Merged
merged 3 commits into from
Oct 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.android.tools.build:gradle:3.5.1'
classpath 'com.automattic.android:fetchstyle:1.1'
}
}
Expand Down Expand Up @@ -70,7 +70,7 @@ subprojects {

ext {
daggerVersion = '2.22.1'
wellSqlVersion = '1.4.0'
wellSqlVersion = '1.5.0'
supportLibraryVersion = '27.1.1'
arch_paging_version = '1.0.1'
arch_lifecycle_version = '1.1.1'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package org.wordpress.android.fluxc.model.list

import java.util.Locale

enum class ListOrder(val value: String) {
ASC("ASC"),
DESC("DESC");
companion object {
fun fromValue(value: String): ListOrder? {
return values().firstOrNull { it.value.toLowerCase() == value.toLowerCase() }
return values().firstOrNull { it.value.toLowerCase(Locale.ROOT) == value.toLowerCase(Locale.ROOT) }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import org.wordpress.android.fluxc.model.list.ListOrder.DESC
import org.wordpress.android.fluxc.model.list.PostListOrderBy.DATE
import org.wordpress.android.fluxc.model.post.PostStatus
import org.wordpress.android.fluxc.store.PostStore.DEFAULT_POST_STATUS_LIST
import java.util.Locale

sealed class PostListDescriptor(
val site: SiteModel,
Expand Down Expand Up @@ -91,7 +92,7 @@ enum class PostListOrderBy(val value: String) {

companion object {
fun fromValue(value: String): PostListOrderBy? {
return values().firstOrNull { it.value.toLowerCase() == value.toLowerCase() }
return values().firstOrNull { it.value.toLowerCase(Locale.ROOT) == value.toLowerCase(Locale.ROOT) }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import org.wordpress.android.fluxc.store.PostStore.PostErrorType
import org.wordpress.android.fluxc.store.PostStore.PostErrorType.UNKNOWN_POST
import org.wordpress.android.fluxc.store.PostStore.RemotePostPayload
import org.wordpress.android.util.DateTimeUtils
import java.util.Locale
import javax.inject.Inject
import javax.inject.Singleton
import kotlin.coroutines.Continuation
Expand Down Expand Up @@ -74,7 +75,7 @@ class PageStore @Inject constructor(
}

suspend fun search(site: SiteModel, searchQuery: String): List<PageModel> = withContext(coroutineContext) {
getPagesFromDb(site).filter { it.title.toLowerCase().contains(searchQuery.toLowerCase()) }
getPagesFromDb(site).filter { it.title.toLowerCase(Locale.ROOT).contains(searchQuery.toLowerCase(Locale.ROOT)) }
}

suspend fun updatePageInDb(page: PageModel): OnPostChanged = suspendCoroutine { cont ->
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Nov 02 13:54:34 EDT 2017
#Mon Sep 30 16:27:52 EDT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip