SourceSets - Groovy -> Kotlin DSL
问题 sourceSets { main { java.srcDirs = ['src/main/kotlin', 'src/main/java'] res.srcDirs = [ 'src/main/res/layouts/activity', 'src/main/res/layouts/fragment', 'src/main/res/layouts/dialog', 'src/main/res/layouts/items', 'src/main/res/layouts/views', 'src/main/res/layouts', 'src/main/res' ] } } Here for java.srcDirs we convert it in kotlin DSL like java.sourceSets { getByName("main").java.srcDirs("src/main/kotlin") } But I don't know how to change sub folders within 'layout' res folder code in DSL