[Gradle][Minor] Add documentation on 'runSafe' to provide guidance on when to use it
KTIJ-24976
This commit is contained in:
committed by
Space Team
parent
777955b4e2
commit
1573f0250a
+5
@@ -39,6 +39,11 @@ interface KotlinCompilerArgumentsProducer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface ContributeCompilerArgumentsContext<T : CommonToolArguments> {
|
interface ContributeCompilerArgumentsContext<T : CommonToolArguments> {
|
||||||
|
/**
|
||||||
|
* This method shall be used for any [action] used to build arguments, that could potentially throw an exception
|
||||||
|
* (like resolving dependencies). There are some scenarios (like IDE import), where we want to be lenient
|
||||||
|
* and provide arguments on a 'best effort bases'.
|
||||||
|
*/
|
||||||
fun <T> runSafe(action: () -> T): T?
|
fun <T> runSafe(action: () -> T): T?
|
||||||
fun primitive(contribution: (args: T) -> Unit)
|
fun primitive(contribution: (args: T) -> Unit)
|
||||||
fun pluginClasspath(contribution: (args: T) -> Unit)
|
fun pluginClasspath(contribution: (args: T) -> Unit)
|
||||||
|
|||||||
Reference in New Issue
Block a user