McProjectBuilder

class McProjectBuilder<P : PlatformPluginBuilder<*>>(    var path: ProjectPath.StringProjectPath,     var projectDir: File,     var buildFile: File,     val platformPlugin: P,     val codeGeneratorBindings: List<CodeGeneratorBinding>,     val projectProvider: ProjectProvider,     val projectCache: ProjectCache,     val projectDependencies: ProjectDependencies = ProjectDependencies(mutableMapOf()),     val externalDependencies: ExternalDependencies = ExternalDependencies(mutableMapOf()),     var hasKapt: Boolean = false,     var hasTestFixturesPlugin: Boolean = false,     var anvilGradlePlugin: AnvilGradlePlugin? = null,     var javaSourceVersion: JavaVersion = VERSION_14)

Constructors

Link copied to clipboard
fun <P : PlatformPluginBuilder<*>> McProjectBuilder(    path: ProjectPath.StringProjectPath,     projectDir: File,     buildFile: File,     platformPlugin: P,     codeGeneratorBindings: List<CodeGeneratorBinding>,     projectProvider: ProjectProvider,     projectCache: ProjectCache,     projectDependencies: ProjectDependencies = ProjectDependencies(mutableMapOf()),     externalDependencies: ExternalDependencies = ExternalDependencies(mutableMapOf()),     hasKapt: Boolean = false,     hasTestFixturesPlugin: Boolean = false,     anvilGradlePlugin: AnvilGradlePlugin? = null,     javaSourceVersion: JavaVersion = VERSION_14)

Functions

Link copied to clipboard
fun addDependency(    configurationName: ConfigurationName,     project: McProject,     asTestFixture: Boolean = false)
Link copied to clipboard
fun addExternalDependency(    configurationName: ConfigurationName,     coordinates: String,     isTestFixture: Boolean = false)
Link copied to clipboard
fun addJavaSource(    java: String,     sourceSetName: SourceSetName = SourceSetName.MAIN,     directory: String? = null,     fileName: String? = null,     sourceDirName: String = "java"): File
Link copied to clipboard
private fun addJvmSource(    directory: String?,     packageName: String,     sourceSetName: SourceSetName,     fileSimpleName: String,     content: String,     sourceDirName: String): File
Link copied to clipboard
fun addKotlinSource(    kotlin: String,     sourceSetName: SourceSetName = SourceSetName.MAIN,     directory: String? = null,     fileName: String? = null,     sourceDirName: String = "java"): File
Link copied to clipboard
fun <T : AndroidPlatformPluginBuilder<*>> McProjectBuilder<T>.addLayoutFile(    name: String,     content: String,     sourceSetName: SourceSetName = SourceSetName.MAIN)
Link copied to clipboard
fun <T : AndroidPlatformPluginBuilder<*>> McProjectBuilder<T>.addManifest(content: String, sourceSetName: SourceSetName = SourceSetName.MAIN)
Link copied to clipboard
fun <T : AndroidPlatformPluginBuilder<*>> McProjectBuilder<T>.addResourceFile(    name: String,     content: String,     sourceSetName: SourceSetName = SourceSetName.MAIN)
Link copied to clipboard
fun addSource(    name: String,     kotlin: String,     sourceSetName: SourceSetName = SourceSetName.MAIN)
Link copied to clipboard
fun addSourceSet(    name: SourceSetName,     jvmFiles: Set<File> = emptySet(),     resourceFiles: Set<File> = emptySet(),     layoutFiles: Set<File> = emptySet(),     upstreamNames: List<SourceSetName> = emptyList(),     downstreamNames: List<SourceSetName> = emptyList()): SourceSetBuilder
Link copied to clipboard
private fun String.fixFileSeparators(): String

Replace Windows file separators with Unix ones, just for string comparison in tests

Link copied to clipboard
operator fun File.invoke(text: () -> String)
Link copied to clipboard
private fun ConfigurationName.maybeAddToSourceSetsAndConfigurations()
Link copied to clipboard
fun requireSourceSetExists(name: SourceSetName)

Properties

Link copied to clipboard
var anvilGradlePlugin: AnvilGradlePlugin? = null
Link copied to clipboard
var buildFile: File
Link copied to clipboard
val codeGeneratorBindings: List<CodeGeneratorBinding>
Link copied to clipboard
val externalDependencies: ExternalDependencies
Link copied to clipboard
val externalDependency: RealExternalDependencyFactory
Link copied to clipboard
var hasKapt: Boolean = false
Link copied to clipboard
var hasTestFixturesPlugin: Boolean = false
Link copied to clipboard
var javaSourceVersion: JavaVersion
Link copied to clipboard
var path: ProjectPath.StringProjectPath
Link copied to clipboard
val platformPlugin: P
Link copied to clipboard
val projectCache: ProjectCache
Link copied to clipboard
val projectDependencies: ProjectDependencies
Link copied to clipboard
var projectDir: File
Link copied to clipboard
val projectProvider: ProjectProvider

Extensions

Link copied to clipboard
fun McProjectBuilder<*>.maybeAddSourceSet(    name: SourceSetName,     jvmFiles: Set<File> = emptySet(),     resourceFiles: Set<File> = emptySet(),     layoutFiles: Set<File> = emptySet(),     upstreamNames: List<SourceSetName> = emptyList(),     downstreamNames: List<SourceSetName> = emptyList()): SourceSetBuilder
Link copied to clipboard
internal fun McProjectBuilder<*>.populateSourceSets()

Sources

Link copied to clipboard