Skip to content

Commit bdae52d

Browse files
committed
Resolve some TODOs
1 parent bef845b commit bdae52d

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,17 @@
1010
@file:DependsOn("com.rometools:rome:1.16.0")
1111
@file:DependsOn("org.jsoup:jsoup:1.15.1")
1212

13-
// FIXME: Cannot use jsoup in scripts with Kotlin 1.6.x, for now.
14-
// See https://youtrack.jetbrains.com/issue/KT-50378
15-
1613
import com.rometools.rome.io.SyndFeedInput
1714
import com.rometools.rome.io.XmlReader
1815
import org.jsoup.Jsoup
1916
import org.jsoup.nodes.Document
2017
import org.jsoup.nodes.Element
2118
import java.io.File
2219
import java.net.URL
23-
import kotlin.time.DurationUnit
24-
import kotlin.time.toDuration
20+
import kotlin.time.Duration.Companion.seconds
2521

2622
val resultFile = File("release-notes.html")
27-
// TODO: Use Int::seconds when/if switched to Kotlin v1.6.x or higher
28-
val waitTime = 10.toDuration(DurationUnit.SECONDS)
23+
val waitTime = 10.seconds
2924
val feedUrl = URL("https://developer.android.com/feeds/androidx-release-notes.xml")
3025
val writer = resultFile.bufferedWriter()
3126
val reader = tryTo("initialize the feed reader") {

scripts/retry.main.kts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
@file:CompilerOptions("-Xopt-in", "kotlin.RequiresOptIn")
66
@file:OptIn(kotlin.time.ExperimentalTime::class)
77

8-
import kotlin.time.DurationUnit
9-
import kotlin.time.toDuration
8+
import kotlin.time.Duration.Companion.seconds
109

11-
// TODO: Use Int::seconds when/if switched to Kotlin v1.6.x or higher
12-
val waitTime = 10.toDuration(DurationUnit.SECONDS)
10+
val waitTime = 10.seconds
1311

1412
/**
1513
* Try [forAtMost] times to run the block without exception.

0 commit comments

Comments
 (0)