Skip to content

Commit

Permalink
Merge pull request #1397 from wordpress-mobile/issue/update-gradle-to…
Browse files Browse the repository at this point in the history
…-5.4.1

Upgrade Gradle to 5.4.1, gradle plugin to 3.5.1 and WellSql to 1.5.0
  • Loading branch information
shiki authored Oct 17, 2019
2 parents 8010d09 + 1ab66b2 commit 8f3a83c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
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

0 comments on commit 8f3a83c

Please sign in to comment.