Google protobuf has been added to the build
This commit is contained in:
@@ -5,10 +5,12 @@ buildscript {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
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: 'java'
|
||||||
apply plugin: 'kotlin'
|
apply plugin: 'kotlin'
|
||||||
apply plugin: org.jetbrains.kotlin.NativeInteropPlugin
|
apply plugin: org.jetbrains.kotlin.NativeInteropPlugin
|
||||||
@@ -40,7 +42,8 @@ allprojects {
|
|||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
compiler {
|
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/'
|
kotlin.srcDir 'compiler/ir/backend.native/src/'
|
||||||
}
|
}
|
||||||
cli_bc {
|
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() {
|
String[] linkerOpts1() {
|
||||||
def libs = ['-lLLVMX86Disassembler',
|
def libs = ['-lLLVMX86Disassembler',
|
||||||
'-lLLVMX86AsmParser',
|
'-lLLVMX86AsmParser',
|
||||||
@@ -132,6 +141,9 @@ configurations {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
|
compilerCompile "com.google.protobuf:protobuf-java:3.0.0"
|
||||||
|
|
||||||
compilerCompile kotlinCompilerModule
|
compilerCompile kotlinCompilerModule
|
||||||
compilerCompile kotlinNativeInterop['llvm'].configuration
|
compilerCompile kotlinNativeInterop['llvm'].configuration
|
||||||
compilerCompile kotlinNativeInterop['hash'].configuration
|
compilerCompile kotlinNativeInterop['hash'].configuration
|
||||||
@@ -178,3 +190,12 @@ task jars {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protobuf {
|
||||||
|
protoc {
|
||||||
|
artifact = 'com.google.protobuf:protoc:3.0.0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user