Implement Gradle Kotlin DSL build

This commit is contained in:
Ilya Chernikov
2017-08-02 12:26:50 +02:00
parent f5d6e41993
commit 61dfb75e0e
93 changed files with 3737 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
import org.gradle.api.tasks.compile.JavaCompile
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.io.File
buildscript {
repositories {
mavenLocal()
jcenter()
}
dependencies {
classpath("com.github.jengelman.gradle.plugins:shadow:1.2.3")
classpath(ideaSdkDeps("asm-all"))
}
}
apply {
plugin("kotlin")
plugin("com.github.johnrengelman.shadow")
}
configure<JavaPluginConvention> {
sourceSets.getByName("main")?.apply {
val srcs = listOf(File(rootDir, "core/reflection.jvm/src"))
java.setSrcDirs(srcs)
}
sourceSets.getByName("test").apply {
java.setSrcDirs(emptyList<File>())
}
}
dependencies {
val compile by configurations
compile(project(":core:builtins"))
compile(project(":core"))
compile(protobufLite())
}
tasks.withType<JavaCompile> {
dependsOn(protobufLiteTask)
}
tasks.withType<KotlinCompile> {
dependsOn(protobufLiteTask)
}