-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
77 lines (63 loc) · 1.9 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
buildscript {
repositories {
maven {
url 'http://maven.aliyun.com/nexus/content/groups/public/'
}
mavenCentral()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.5'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.31"
}
}
plugins {
id 'idea'
id 'application'
id 'java-library'
id 'org.jetbrains.kotlin.jvm' version '1.3.31'
id 'com.google.protobuf' version '0.8.8'
}
group 'spark-demo-kotlin'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
maven {
url 'http://maven.aliyun.com/nexus/content/groups/public/'
}
mavenCentral()
}
def grpcVersion = '1.21.0'
def scalaVersion = '2.11.11'
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
testCompile group: 'junit', name: 'junit', version: '4.12'
// spark
compile 'mysql:mysql-connector-java:5.1.35'
compile 'org.apache.spark:spark-core_2.11:2.4.3'
compile 'org.apache.spark:spark-sql_2.11:2.4.3'
compile 'org.apache.spark:spark-streaming_2.11:2.4.3'
compile "org.scala-lang:scala-library:${scalaVersion}"
compile "org.scala-lang:scala-reflect:${scalaVersion}"
compile "org.scala-lang:scala-compiler:${scalaVersion}"
compile "com.beust:jcommander:1.71"
compileOnly "javax.annotation:javax.annotation-api:1.2"
implementation "io.grpc:grpc-netty:${grpcVersion}"
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
implementation "io.grpc:grpc-stub:${grpcVersion}"
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
protobuf {
protoc { artifact = 'com.google.protobuf:protoc:3.5.1-1' }
plugins {
grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" }
}
generateProtoTasks {
all()*.plugins { grpc {} }
}
}
mainClassName ='spark.demo.MainKt'