Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dkandalov committed Apr 20, 2020
1 parent a865543 commit eddfaf2
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,15 @@ repositories {
mavenCentral()
}

fun sourceRoots(block: SourceSetContainer.() -> Unit) = sourceSets.apply(block)
val SourceSet.kotlin: SourceDirectorySet
get() = (this as HasConvention).convention.getPlugin<KotlinSourceSet>().kotlin
var SourceDirectorySet.sourceDirs: Iterable<File>
get() = srcDirs
set(value) { setSrcDirs(value) }

sourceRoots {
getByName("main") {
sourceSets {
main {
kotlin.srcDirs("./src")
resources.srcDirs("./resources")
}
getByName("test") {
test {
kotlin.srcDirs("./test")
}
}
Expand All @@ -38,7 +34,7 @@ tasks.withType<KotlinJvmCompile> {
languageVersion = "1.3"
// Compiler flag to allow building against pre-released versions of Kotlin
// because IJ EAP can be built using pre-released Kotlin but it's still worth doing to check API compatability
freeCompilerArgs += listOf("-Xskip-metadata-version-check")
freeCompilerArgs = freeCompilerArgs + listOf("-Xskip-metadata-version-check")
}
}

Expand Down

0 comments on commit eddfaf2

Please sign in to comment.