Advertisement
PaleoCrafter

Untitled

Jul 18th, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.51 KB | None | 0 0
  1. for (set in sourceSets) {
  2.     def taskName = "source${set.name.capitalize()}Kotlin"
  3.     def dir = new File(project.getBuildDir(), "sources/${set.name}/kotlin")
  4.     task(taskName, type: TaskSourceCopy) {
  5.         source = set.getKotlin()
  6.         output = dir
  7.     }
  8.     def compileTask = tasks[set.getCompileTaskName("kotlin")]
  9.     compileTask.source = dir
  10.     compileTask.dependsOn taskName
  11.     def dirPath = dir.toPath()
  12.     compileKotlin.include {
  13.         return it.file.toPath().startsWith(dirPath)
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement