Package-level declarations

Functions

Link copied to clipboard
fun HasDependencyDeclarations.addDependency(configuredDependency: ConfiguredDependency, newDeclaration: DependencyDeclaration, existingMarkerDeclaration: DependencyDeclaration? = null)
Link copied to clipboard
Link copied to clipboard

Creates a new DependencyDeclaration which can be added to a build file, potentially using a similar existing declaration as a template.

Link copied to clipboard

Attempts to determine the most idiomatic way of invoking the receiver configuration name. Typically, this will just be a function with a matching name. However, if a configuration is non-standard (e.g. internalReleaseImplementation) and the build file is using the Kotlin Gradle DSL, then the configuration must be invoked as a String extension function instead (e.g. "internalReleaseImplementation"(libs.myDependency)).

Link copied to clipboard

Finds the existing dependency declaration (if there are any) which is the closest match to the desired new dependency.

Link copied to clipboard

Creates a new ExternalDependencyDeclaration from the void, without copying the style of any other dependency declarations.

Creates a new ModuleDependencyDeclaration from the void, without copying the style of any other dependency declarations.

Link copied to clipboard
private suspend fun HasDependencyDeclarations.getConfigInvocation(isKotlin: Boolean, configurationName: ConfigurationName): String
Link copied to clipboard
private suspend fun HasDependencyDeclarations.getStatementWithSurroundingText(accessorText: String, isTestFixtures: Boolean, isKotlin: Boolean, configInvocation: String): Pair<String, String>
Link copied to clipboard

Precompiled configuration names are names which are added by a pre-compiled plugin. These names can be used as functions in Kotlin scripts. examples:

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
private suspend fun ConfigurationName.shouldUseQuotes(invokesConfigurationNames: InvokesConfigurationNames): Boolean

Returns true if the build file is Kotlin, and one of:

Link copied to clipboard
Link copied to clipboard