@@ -64,7 +64,7 @@ internal fun CompletableFuture<Unit>.complete() = complete(Unit)
64
64
* @param name: The name of the extras key being used to store the future (see [extrasLazyProperty])
65
65
*/
66
66
internal inline fun <Receiver , reified T > futureExtension (
67
- name : String? = null, noinline block : suspend Receiver .() -> T
67
+ name : String? = null, noinline block : suspend Receiver .() -> T ,
68
68
): ExtrasLazyProperty <Receiver , Future <T >> where Receiver : HasMutableExtras , Receiver : HasProject {
69
69
return extrasLazyProperty<Receiver , Future <T >>(name) {
70
70
project.future { block() }
@@ -97,7 +97,7 @@ internal fun <T> CompletableFuture(): CompletableFuture<T> {
97
97
98
98
private class FutureImpl <T >(
99
99
private val deferred : Completable <T > = Completable (),
100
- private val lifecycle : KotlinPluginLifecycle ? = null
100
+ private val lifecycle : KotlinPluginLifecycle ? = null ,
101
101
) : CompletableFuture<T>, Serializable {
102
102
fun completeWith (result : Result <T >) = deferred.completeWith(result)
103
103
@@ -111,7 +111,7 @@ private class FutureImpl<T>(
111
111
112
112
override fun getOrThrow (): T {
113
113
return if (deferred.isCompleted) deferred.getCompleted() else throw IllegalLifecycleException (
114
- " Future was not completed yet" + if (lifecycle != null ) " (stage ' ${ lifecycle.stage} ') ( ${lifecycle.project.displayName} ) "
114
+ " Future was not completed yet" + if (lifecycle != null ) " ' $ lifecycle' "
115
115
else " "
116
116
)
117
117
}
@@ -128,7 +128,7 @@ private class FutureImpl<T>(
128
128
}
129
129
130
130
private class LenientFutureImpl <T >(
131
- private val future : Future <T >
131
+ private val future : Future <T >,
132
132
) : LenientFuture<T>, Serializable {
133
133
override suspend fun await (): T {
134
134
return future.await()
@@ -181,7 +181,7 @@ private class LazyFutureImpl<T>(private val future: Lazy<Future<T>>) : Future<T>
181
181
* Simple, Single Threaded, replacement for kotlinx.coroutines.CompletableDeferred.
182
182
*/
183
183
private class Completable <T >(
184
- private var value : Result <T >? = null
184
+ private var value : Result <T >? = null ,
185
185
) {
186
186
constructor (value: T ) : this (Result .success(value))
187
187
0 commit comments