Skip to content

Commit

Permalink
Merge pull request #18 from vidhithakrar/version_upgrade_solutions_an…
Browse files Browse the repository at this point in the history
…d_rx

Upgrade version of kotlin plugins and coroutine dependencies to 1.5.0 for solutions
  • Loading branch information
svtk authored Jul 15, 2021
2 parents 419805f + 707ea6f commit 9f83855
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.4.20'
id 'org.jetbrains.kotlin.plugin.serialization' version '1.4.20'
id 'org.jetbrains.kotlin.jvm' version '1.5.0'
id 'org.jetbrains.kotlin.plugin.serialization' version '1.5.0'
}

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

def coroutines_version = '1.4.2'
def coroutines_version = '1.5.0'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-swing:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$coroutines_version"
Expand Down
2 changes: 1 addition & 1 deletion src/contributors/ContributorsUI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ fun JPanel.addWideSeparator() {

fun setDefaultFontSize(size: Float) {
for (key in UIManager.getLookAndFeelDefaults().keys.toTypedArray()) {
if (key.toString().toLowerCase().contains("font")) {
if (key.toString().lowercase().contains("font")) {
val font = UIManager.getDefaults().getFont(key) ?: continue
val newFont = font.deriveFont(size)
UIManager.put(key, newFont)
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/Aggregation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ TODO: Write aggregation code.
*/
fun List<User>.aggregate(): List<User> =
groupBy { it.login }
.map { (login, group) -> User(login, group.sumBy { it.contributions }) }
.map { (login, group) -> User(login, group.sumOf { it.contributions }) }
.sortedByDescending { it.contributions }
1 change: 1 addition & 0 deletions src/tasks/Request5NotCancellable.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import contributors.*
import kotlinx.coroutines.*
import kotlin.coroutines.coroutineContext

@OptIn(DelicateCoroutinesApi::class)
suspend fun loadContributorsNotCancellable(service: GitHubService, req: RequestData): List<User> {
val repos = service
.getOrgRepos(req.org)
Expand Down

0 comments on commit 9f83855

Please sign in to comment.