Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ogolberg committed Nov 16, 2023
1 parent a870094 commit 34de1ec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/kotlin-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ tasks.withType<KotlinCompile> {
jvmTarget = "11"
languageVersion = "1.6"
apiVersion = "1.6"
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

package com.toasttab.expediter.issue

import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
Expand All @@ -34,9 +35,13 @@ class IssueReport(
}

fun fromJson(string: String) = JSON.decodeFromString<IssueReport>(string)

@OptIn(ExperimentalSerializationApi::class)
fun fromJson(stream: InputStream) = JSON.decodeFromStream<IssueReport>(stream)
}

fun toJson() = JSON.encodeToString(this)

@OptIn(ExperimentalSerializationApi::class)
fun toJson(stream: OutputStream) = JSON.encodeToStream(this, stream)
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class ExpediterPlugin : Plugin<Project> {

ignore = extension.ignoreSpec.buildIgnore()

@Suppress("DEPRECATION")
ignoreFile = (extension.ignoreSpec.file ?: extension.ignoreFile)?.let { project.file(it) }

report = project.layout.buildDirectory.file("expediter.json").get().asFile
Expand Down

0 comments on commit 34de1ec

Please sign in to comment.