File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 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-
1613import com.rometools.rome.io.SyndFeedInput
1714import com.rometools.rome.io.XmlReader
1815import org.jsoup.Jsoup
1916import org.jsoup.nodes.Document
2017import org.jsoup.nodes.Element
2118import java.io.File
2219import java.net.URL
23- import kotlin.time.DurationUnit
24- import kotlin.time.toDuration
20+ import kotlin.time.Duration.Companion.seconds
2521
2622val 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
2924val feedUrl = URL (" https://developer.android.com/feeds/androidx-release-notes.xml" )
3025val writer = resultFile.bufferedWriter()
3126val reader = tryTo(" initialize the feed reader" ) {
Original file line number Diff line number Diff line change 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.
You can’t perform that action at this time.
0 commit comments