Skip to content

Commit 9f83855

Browse files
authored
Merge pull request #18 from vidhithakrar/version_upgrade_solutions_and_rx
Upgrade version of kotlin plugins and coroutine dependencies to 1.5.0 for solutions
2 parents 419805f + 707ea6f commit 9f83855

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
2-
id 'org.jetbrains.kotlin.jvm' version '1.4.20'
3-
id 'org.jetbrains.kotlin.plugin.serialization' version '1.4.20'
2+
id 'org.jetbrains.kotlin.jvm' version '1.5.0'
3+
id 'org.jetbrains.kotlin.plugin.serialization' version '1.5.0'
44
}
55

66
group 'intro-coroutines'
@@ -15,7 +15,7 @@ dependencies {
1515
implementation "org.jetbrains.kotlin:kotlin-reflect"
1616
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.1")
1717

18-
def coroutines_version = '1.4.2'
18+
def coroutines_version = '1.5.0'
1919
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
2020
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-swing:$coroutines_version"
2121
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$coroutines_version"

src/contributors/ContributorsUI.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ fun JPanel.addWideSeparator() {
145145

146146
fun setDefaultFontSize(size: Float) {
147147
for (key in UIManager.getLookAndFeelDefaults().keys.toTypedArray()) {
148-
if (key.toString().toLowerCase().contains("font")) {
148+
if (key.toString().lowercase().contains("font")) {
149149
val font = UIManager.getDefaults().getFont(key) ?: continue
150150
val newFont = font.deriveFont(size)
151151
UIManager.put(key, newFont)

src/tasks/Aggregation.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ TODO: Write aggregation code.
1616
*/
1717
fun List<User>.aggregate(): List<User> =
1818
groupBy { it.login }
19-
.map { (login, group) -> User(login, group.sumBy { it.contributions }) }
19+
.map { (login, group) -> User(login, group.sumOf { it.contributions }) }
2020
.sortedByDescending { it.contributions }

src/tasks/Request5NotCancellable.kt

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import contributors.*
44
import kotlinx.coroutines.*
55
import kotlin.coroutines.coroutineContext
66

7+
@OptIn(DelicateCoroutinesApi::class)
78
suspend fun loadContributorsNotCancellable(service: GitHubService, req: RequestData): List<User> {
89
val repos = service
910
.getOrgRepos(req.org)

0 commit comments

Comments
 (0)