Skip to content

Commit 32848d9

Browse files
authored
Update Dokka (#3051)
* Update Dokka * Suppress Lint declarations from Dokka documentation * Suppress Migration declarations from Dokka documentation
1 parent e9eb0ef commit 32848d9

File tree

4 files changed

+58
-3
lines changed

4 files changed

+58
-3
lines changed

buildSrc/build.gradle.kts

+15-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,20 @@ fun version(target: String): String {
4444

4545
dependencies {
4646
implementation(kotlin("gradle-plugin", version("kotlin")))
47-
implementation("org.jetbrains.dokka:dokka-gradle-plugin:${version("dokka")}")
48-
implementation("org.jetbrains.dokka:dokka-core:${version("dokka")}")
47+
/*
48+
* Dokka is compiled with language level = 1.4, but depends on Kotlin 1.6.0, while
49+
* our version of Gradle bundles Kotlin 1.4.x and can read metadata only up to 1.5.x,
50+
* thus we're excluding stdlib compiled with 1.6.0 from dependencies.
51+
*/
52+
implementation("org.jetbrains.dokka:dokka-gradle-plugin:${version("dokka")}") {
53+
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8")
54+
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk7")
55+
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib")
56+
}
57+
implementation("org.jetbrains.dokka:dokka-core:${version("dokka")}") {
58+
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8")
59+
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk7")
60+
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib")
61+
}
4962
implementation("ru.vyarus:gradle-animalsniffer-plugin:1.5.3") // Android API check
5063
}

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ atomicfu_version=0.17.0
1414
knit_version=0.3.0
1515
html_version=0.7.2
1616
lincheck_version=2.14
17-
dokka_version=1.5.0
17+
dokka_version=1.6.0
1818
byte_buddy_version=1.10.9
1919
reactor_version=3.4.1
2020
reactive_streams_version=1.0.3

kotlinx-coroutines-core/common/src/flow/Migration.kt

+11
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ public fun <T> Flow<T>.concatWith(value: T): Flow<T> = noImpl()
354354
)
355355
public fun <T> Flow<T>.concatWith(other: Flow<T>): Flow<T> = noImpl()
356356

357+
/** @suppress */
357358
@Deprecated(
358359
level = DeprecationLevel.ERROR,
359360
message = "Flow analogue of 'combineLatest' is 'combine'",
@@ -362,6 +363,7 @@ public fun <T> Flow<T>.concatWith(other: Flow<T>): Flow<T> = noImpl()
362363
public fun <T1, T2, R> Flow<T1>.combineLatest(other: Flow<T2>, transform: suspend (T1, T2) -> R): Flow<R> =
363364
combine(this, other, transform)
364365

366+
/** @suppress */
365367
@Deprecated(
366368
level = DeprecationLevel.ERROR,
367369
message = "Flow analogue of 'combineLatest' is 'combine'",
@@ -373,6 +375,7 @@ public fun <T1, T2, T3, R> Flow<T1>.combineLatest(
373375
transform: suspend (T1, T2, T3) -> R
374376
) = combine(this, other, other2, transform)
375377

378+
/** @suppress */
376379
@Deprecated(
377380
level = DeprecationLevel.ERROR,
378381
message = "Flow analogue of 'combineLatest' is 'combine'",
@@ -385,6 +388,7 @@ public fun <T1, T2, T3, T4, R> Flow<T1>.combineLatest(
385388
transform: suspend (T1, T2, T3, T4) -> R
386389
) = combine(this, other, other2, other3, transform)
387390

391+
/** @suppress */
388392
@Deprecated(
389393
level = DeprecationLevel.ERROR,
390394
message = "Flow analogue of 'combineLatest' is 'combine'",
@@ -422,20 +426,23 @@ public fun <T> Flow<T>.delayFlow(timeMillis: Long): Flow<T> = onStart { delay(ti
422426
)
423427
public fun <T> Flow<T>.delayEach(timeMillis: Long): Flow<T> = onEach { delay(timeMillis) }
424428

429+
/** @suppress */
425430
@Deprecated(
426431
level = DeprecationLevel.ERROR,
427432
message = "Flow analogues of 'switchMap' are 'transformLatest', 'flatMapLatest' and 'mapLatest'",
428433
replaceWith = ReplaceWith("this.flatMapLatest(transform)")
429434
)
430435
public fun <T, R> Flow<T>.switchMap(transform: suspend (value: T) -> Flow<R>): Flow<R> = flatMapLatest(transform)
431436

437+
/** @suppress */
432438
@Deprecated(
433439
level = DeprecationLevel.ERROR, // Warning since 1.3.8, was experimental when deprecated, ERROR since 1.5.0
434440
message = "'scanReduce' was renamed to 'runningReduce' to be consistent with Kotlin standard library",
435441
replaceWith = ReplaceWith("runningReduce(operation)")
436442
)
437443
public fun <T> Flow<T>.scanReduce(operation: suspend (accumulator: T, value: T) -> T): Flow<T> = runningReduce(operation)
438444

445+
/** @suppress */
439446
@Deprecated(
440447
level = DeprecationLevel.ERROR,
441448
message = "Flow analogue of 'publish()' is 'shareIn'. \n" +
@@ -446,6 +453,7 @@ public fun <T> Flow<T>.scanReduce(operation: suspend (accumulator: T, value: T)
446453
)
447454
public fun <T> Flow<T>.publish(): Flow<T> = noImpl()
448455

456+
/** @suppress */
449457
@Deprecated(
450458
level = DeprecationLevel.ERROR,
451459
message = "Flow analogue of 'publish(bufferSize)' is 'buffer' followed by 'shareIn'. \n" +
@@ -456,6 +464,7 @@ public fun <T> Flow<T>.publish(): Flow<T> = noImpl()
456464
)
457465
public fun <T> Flow<T>.publish(bufferSize: Int): Flow<T> = noImpl()
458466

467+
/** @suppress */
459468
@Deprecated(
460469
level = DeprecationLevel.ERROR,
461470
message = "Flow analogue of 'replay()' is 'shareIn' with unlimited replay. \n" +
@@ -466,6 +475,7 @@ public fun <T> Flow<T>.publish(bufferSize: Int): Flow<T> = noImpl()
466475
)
467476
public fun <T> Flow<T>.replay(): Flow<T> = noImpl()
468477

478+
/** @suppress */
469479
@Deprecated(
470480
level = DeprecationLevel.ERROR,
471481
message = "Flow analogue of 'replay(bufferSize)' is 'shareIn' with the specified replay parameter. \n" +
@@ -476,6 +486,7 @@ public fun <T> Flow<T>.replay(): Flow<T> = noImpl()
476486
)
477487
public fun <T> Flow<T>.replay(bufferSize: Int): Flow<T> = noImpl()
478488

489+
/** @suppress */
479490
@Deprecated(
480491
level = DeprecationLevel.ERROR,
481492
message = "Flow analogue of 'cache()' is 'shareIn' with unlimited replay and 'started = SharingStared.Lazily' argument'",

kotlinx-coroutines-core/common/src/flow/operators/Lint.kt

+31
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import kotlin.internal.InlineOnly
1313
/**
1414
* Applying [cancellable][Flow.cancellable] to a [SharedFlow] has no effect.
1515
* See the [SharedFlow] documentation on Operator Fusion.
16+
* @suppress
1617
*/
1718
@Deprecated(
1819
level = DeprecationLevel.ERROR,
@@ -24,6 +25,7 @@ public fun <T> SharedFlow<T>.cancellable(): Flow<T> = noImpl()
2425
/**
2526
* Applying [flowOn][Flow.flowOn] to [SharedFlow] has no effect.
2627
* See the [SharedFlow] documentation on Operator Fusion.
28+
* @suppress
2729
*/
2830
@Deprecated(
2931
level = DeprecationLevel.ERROR,
@@ -35,6 +37,7 @@ public fun <T> SharedFlow<T>.flowOn(context: CoroutineContext): Flow<T> = noImpl
3537
/**
3638
* Applying [conflate][Flow.conflate] to [StateFlow] has no effect.
3739
* See the [StateFlow] documentation on Operator Fusion.
40+
* @suppress
3841
*/
3942
@Deprecated(
4043
level = DeprecationLevel.ERROR,
@@ -46,6 +49,7 @@ public fun <T> StateFlow<T>.conflate(): Flow<T> = noImpl()
4649
/**
4750
* Applying [distinctUntilChanged][Flow.distinctUntilChanged] to [StateFlow] has no effect.
4851
* See the [StateFlow] documentation on Operator Fusion.
52+
* @suppress
4953
*/
5054
@Deprecated(
5155
level = DeprecationLevel.ERROR,
@@ -54,6 +58,9 @@ public fun <T> StateFlow<T>.conflate(): Flow<T> = noImpl()
5458
)
5559
public fun <T> StateFlow<T>.distinctUntilChanged(): Flow<T> = noImpl()
5660

61+
/**
62+
* @suppress
63+
*/
5764
@Deprecated(
5865
message = "isActive is resolved into the extension of outer CoroutineScope which is likely to be an error." +
5966
"Use currentCoroutineContext().isActive or cancellable() operator instead " +
@@ -65,6 +72,9 @@ public fun <T> StateFlow<T>.distinctUntilChanged(): Flow<T> = noImpl()
6572
public val FlowCollector<*>.isActive: Boolean
6673
get() = noImpl()
6774

75+
/**
76+
* @suppress
77+
*/
6878
@Deprecated(
6979
message = "cancel() is resolved into the extension of outer CoroutineScope which is likely to be an error." +
7080
"Use currentCoroutineContext().cancel() instead or specify the receiver of cancel() explicitly",
@@ -73,6 +83,9 @@ public val FlowCollector<*>.isActive: Boolean
7383
)
7484
public fun FlowCollector<*>.cancel(cause: CancellationException? = null): Unit = noImpl()
7585

86+
/**
87+
* @suppress
88+
*/
7689
@Deprecated(
7790
message = "coroutineContext is resolved into the property of outer CoroutineScope which is likely to be an error." +
7891
"Use currentCoroutineContext() instead or specify the receiver of coroutineContext explicitly",
@@ -82,6 +95,9 @@ public fun FlowCollector<*>.cancel(cause: CancellationException? = null): Unit =
8295
public val FlowCollector<*>.coroutineContext: CoroutineContext
8396
get() = noImpl()
8497

98+
/**
99+
* @suppress
100+
*/
85101
@Deprecated(
86102
message = "SharedFlow never completes, so this operator typically has not effect, it can only " +
87103
"catch exceptions from 'onSubscribe' operator",
@@ -92,6 +108,9 @@ public val FlowCollector<*>.coroutineContext: CoroutineContext
92108
public inline fun <T> SharedFlow<T>.catch(noinline action: suspend FlowCollector<T>.(cause: Throwable) -> Unit): Flow<T> =
93109
(this as Flow<T>).catch(action)
94110

111+
/**
112+
* @suppress
113+
*/
95114
@Deprecated(
96115
message = "SharedFlow never completes, so this operator has no effect.",
97116
level = DeprecationLevel.WARNING,
@@ -104,6 +123,9 @@ public inline fun <T> SharedFlow<T>.retry(
104123
): Flow<T> =
105124
(this as Flow<T>).retry(retries, predicate)
106125

126+
/**
127+
* @suppress
128+
*/
107129
@Deprecated(
108130
message = "SharedFlow never completes, so this operator has no effect.",
109131
level = DeprecationLevel.WARNING,
@@ -113,6 +135,9 @@ public inline fun <T> SharedFlow<T>.retry(
113135
public inline fun <T> SharedFlow<T>.retryWhen(noinline predicate: suspend FlowCollector<T>.(cause: Throwable, attempt: Long) -> Boolean): Flow<T> =
114136
(this as Flow<T>).retryWhen(predicate)
115137

138+
/**
139+
* @suppress
140+
*/
116141
@Suppress("DeprecatedCallableAddReplaceWith")
117142
@Deprecated(
118143
message = "SharedFlow never completes, so this terminal operation never completes.",
@@ -122,6 +147,9 @@ public inline fun <T> SharedFlow<T>.retryWhen(noinline predicate: suspend FlowCo
122147
public suspend inline fun <T> SharedFlow<T>.toList(): List<T> =
123148
(this as Flow<T>).toList()
124149

150+
/**
151+
* @suppress
152+
*/
125153
@Suppress("DeprecatedCallableAddReplaceWith")
126154
@Deprecated(
127155
message = "SharedFlow never completes, so this terminal operation never completes.",
@@ -131,6 +159,9 @@ public suspend inline fun <T> SharedFlow<T>.toList(): List<T> =
131159
public suspend inline fun <T> SharedFlow<T>.toSet(): Set<T> =
132160
(this as Flow<T>).toSet()
133161

162+
/**
163+
* @suppress
164+
*/
134165
@Suppress("DeprecatedCallableAddReplaceWith")
135166
@Deprecated(
136167
message = "SharedFlow never completes, so this terminal operation never completes.",

0 commit comments

Comments
 (0)