Skip to content

Commit 264f02b

Browse files
committed
Merge branch 'improve-for-kotlin.1.7.0'
# Conflicts: # scripts/create-new-release-notes.main.kts
2 parents bdae52d + 3188724 commit 264f02b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

scripts/create-new-release-notes.main.kts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
@file:JvmName("ReleaseNotesGenerator")
44
@file:CompilerOptions("-jvm-target", "11")
5-
@file:CompilerOptions("-Xopt-in", "kotlin.RequiresOptIn")
6-
@file:OptIn(kotlin.time.ExperimentalTime::class)
75
@file:Repository("https://repo.maven.apache.org/maven2")
86
@file:Repository("https://jcenter.bintray.com")
97
@file:Repository("https://jitpack.io")
@@ -77,10 +75,10 @@ fun <T> tryTo(
7775

7876
fun toLink(element: Element) = element.attr("href")
7977

80-
// FIXME: Use plain Jsoup.connect()... and remove Pair()
78+
// FIXME: Use plain Jsoup.connect()... and remove Pair creation (to)
8179
// See https://github.com/jhy/jsoup/issues/1686 for the reason.
8280
fun toDocument(link: String) = tryTo("get $link") {
83-
Pair(link, Jsoup.connect(link).get())
81+
link to Jsoup.connect(link).get()
8482
}
8583

8684
fun toReleaseNote(pair: Pair<String, Document>): String {
@@ -128,6 +126,7 @@ fun Document.extractChangelog(id: String) = this
128126
// This is a coroutine version of the code.
129127
// Needs `org.jetbrains.kotlinx:kotlinx-coroutines-core`
130128
// which seems to not work in Kotlin scripts.
129+
// Probably fixed in Kotlin 1.7
131130
/*
132131
fun main() = runBlocking {
133132
val init = async(Dispatchers.IO) {

0 commit comments

Comments
 (0)