Skip to content

Commit

Permalink
moved to Kotlin 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
luca committed Aug 20, 2020
1 parent 1d3530f commit 029a807
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ buildscript {
min_sdk_ver = 19
compile_sdk_ver = 30

kotlin_ver = '1.3.72'
coroutines_ver = '1.3.8'
kotlin_ver = '1.4.0'
coroutines_ver = '1.3.9'
ktx_core_ver = '1.3.1'
ktlint_ver = '0.37.2'
constr_ver = '2.0.0-rc1'
annot_ver = '1.1.0'
retrofit_ver = '2.9.0'
moshi_ver = '1.9.3' // '1.10.0-SNAPSHOT'
moshi_ver = '1.9.3'
okhttp_ver = '4.8.1'
oauth2_ver = '1.2.1'
mdc_ver = '1.2.0'
Expand Down
4 changes: 4 additions & 0 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ android {
jvmTarget = '1.8'
noReflect = true
}

lintOptions {
warningsAsErrors true
}
}

androidExtensions {
Expand Down
4 changes: 4 additions & 0 deletions sampleapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ android {
testOptions {
unitTests.includeAndroidResources = true
}
lintOptions {
warningsAsErrors true
}

packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class ModelsFetchTest {
val fetcher = client?.subredditsClient?.all(limit = LIMIT)
val submissions = fetcher?.fetchNext()

val randomSub = submissions?.random()
val randomSub = submissions?.randomOrNull()

assertNotEquals("Assert that this random submission is not null", null, randomSub)

Expand All @@ -219,6 +219,7 @@ class ModelsFetchTest {

val randomSub = subreddits.random()
val pages = client?.wikisClient?.wikiPages(subreddit = randomSub)

assertNotEquals("Assert that pages in the sub wiki are not null", null, pages)
assertTrue("Assert that pages in the sub wiki are not empty", pages?.isNotEmpty() ?: false)
} catch (ex: Exception) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ class ApiDetailActivity : BaseActivity() {
API_SUBREDDITS -> {
val subIds = getRandomSubredditIds()
val subreddits = client?.subredditsClient?.subreddits(
ids = *subIds.toTypedArray(),
ids = subIds.toTypedArray(),
disableLegacyEncoding = disableLegacyEncoding
)

Expand Down Expand Up @@ -661,7 +661,7 @@ class ApiDetailActivity : BaseActivity() {

private fun getRandomSubredditIds(): List<String> {

val list = listOf(
return listOf(

// centuryclub
// testing private subreddit
Expand Down Expand Up @@ -761,8 +761,6 @@ class ApiDetailActivity : BaseActivity() {
// writingPrompts
"2s3nb"
)

return list
}

private fun getRandomSubmissionIdFromRandomSubreddit(): String {
Expand Down
1 change: 0 additions & 1 deletion sampleapp/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
<string name="bttn_submit_radio_link">Link Post</string>
<string name="bttn_comment">Comment</string>
<string name="bttn_comments">Comments</string>
<string name="bttn_poll_vote">Poll Vote</string>
<string name="bttn_wiki">Wiki</string>
<string name="bttn_wiki_pages">Wiki Pages</string>
<string name="bttn_wiki_revision">Wiki Revision</string>
Expand Down

0 comments on commit 029a807

Please sign in to comment.