-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
110 lines (92 loc) · 3.53 KB
/
build.gradle.kts
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Kotlin application project to get you started.
*/
import com.google.protobuf.gradle.*
import org.gradle.jvm.tasks.Jar
plugins {
// Apply the Kotlin JVM plugin to add support for Kotlin on the JVM.
id("org.jetbrains.kotlin.jvm") version("1.3.21")
id("org.springframework.boot") version("2.1.4.RELEASE")
id("org.jetbrains.kotlin.plugin.spring") version("1.3.21")
id("com.google.protobuf") version("0.8.8")
id("io.spring.dependency-management") version("1.0.7.RELEASE")
// Apply the application plugin to add support for building a CLI application.
idea
application
java
}
group = "jp.co.cyberagent"
java {
sourceCompatibility = JavaVersion.VERSION_1_8
}
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
mavenCentral()
google()
}
dependencies {
val kotlinReflectVersion = "1.3.30"
val coroutinesVersion = "1.2.0"
val springVersion = "2.1.4.RELEASE"
val grpcVersion = "1.19.0"
val grpcSpringVersion = "3.2.1"
val mysqlConnectorVersion = "8.0.15"
val fireBaseVersion = "5.9.0"
val fire = "9.2.0"
implementation("com.google.firebase:firebase-admin:$fireBaseVersion")
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinReflectVersion")
implementation ("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
implementation ("org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion")
implementation("org.springframework.boot:spring-boot-starter-data-jpa:$springVersion")
implementation("org.springframework.boot:spring-boot-starter-web:$springVersion")
implementation("org.springframework.boot:spring-boot-starter-webflux:$springVersion")
implementation("org.springframework.boot:spring-boot-devtools:$springVersion")
testImplementation("org.springframework.boot:spring-boot-starter-test:$springVersion")
implementation("io.github.lognet:grpc-spring-boot-starter:$grpcSpringVersion")
implementation("io.grpc:grpc-netty:$grpcVersion")
implementation("io.grpc:grpc-protobuf:$grpcVersion")
implementation("io.grpc:grpc-stub:$grpcVersion")
implementation("com.google.gms:google-services:3.0.0")
implementation("com.google.firebase:firebase-messaging:$fire")
implementation("com.google.firebase:firebase-core:$fire")
implementation("mysql:mysql-connector-java:$mysqlConnectorVersion")
}
protobuf {
protoc {
// The artifact spec for the Protobuf Compiler
artifact = "com.google.protobuf:protoc:3.7.1"
}
plugins {
// Optional: an artifact spec for a protoc plugin, with "grpc" as
// the identifier, which can be referred to in the "plugins"
// container of the "generateProtoTasks" closure.
id("grpc") {
artifact = "io.grpc:protoc-gen-grpc-java:1.19.0"
}
}
generateProtoTasks {
ofSourceSet("main").forEach {
it.plugins {
// Apply the "grpc" plugin whose spec is defined above, without options.
id("grpc")
}
}
}
}
application {
// Define the main class for the application.
mainClassName = "jp.co.cyberagent.itemae.ApplicationKt"
}
val fatJar = task("fatJar", type = Jar::class) {
from(configurations.compile.get().map { if (it.isDirectory) it else zipTree(it) })
with(tasks["jar"] as CopySpec)
}
tasks {
"build" {
dependsOn(fatJar)
}
}