Google protobuf has been added to the build

This commit is contained in:
Alexander Gorshenev
2016-11-05 22:47:18 +03:00
parent d4c3d6dabd
commit 62f8b31cf0
+22 -1
View File
@@ -5,10 +5,12 @@ buildscript {
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.0"
}
}
apply plugin: "com.google.protobuf"
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: org.jetbrains.kotlin.NativeInteropPlugin
@@ -40,7 +42,8 @@ allprojects {
sourceSets {
compiler {
java.srcDir 'compiler/ir/backend.native/src/'
proto.srcDir 'compiler/ir/backend.native/src/'
java.srcDirs 'compiler/ir/backend.native/src/', 'build/generated/source/proto/compiler/java/'
kotlin.srcDir 'compiler/ir/backend.native/src/'
}
cli_bc {
@@ -53,6 +56,12 @@ sourceSets {
}
}
// The protobuf plugin specifies this dependency for java by itself,
// but not for Kotlin.
compileCompilerKotlin {
dependsOn('generateCompilerProto')
}
String[] linkerOpts1() {
def libs = ['-lLLVMX86Disassembler',
'-lLLVMX86AsmParser',
@@ -132,6 +141,9 @@ configurations {
}
dependencies {
compilerCompile "com.google.protobuf:protobuf-java:3.0.0"
compilerCompile kotlinCompilerModule
compilerCompile kotlinNativeInterop['llvm'].configuration
compilerCompile kotlinNativeInterop['hash'].configuration
@@ -178,3 +190,12 @@ task jars {
}
}
}
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.0.0'
}
}