-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
108 lines (92 loc) · 3.1 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
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
import java.text.SimpleDateFormat
def read_versions() {
def props = new Properties()
props.load(new FileInputStream("${System.getenv("REPO_HOME")}/versions.properties"))
return props
}
def papeeriaVersion(String defaultVersion) {
def versions = read_versions()
if (project.hasProperty("ver")) {
return project["ver"]
}
if (versions["papeeria"] != null && !String.valueOf(versions["papeeria"]).isAllWhitespace()) {
return versions["papeeria"]
}
return defaultVersion
}
def grpc_version = read_versions()["grpc"]
def protobuf_version = read_versions()["protobuf"]
def this_version = papeeriaVersion(new SimpleDateFormat("yyyy.MM.dd").format(new Date()))
buildscript {
ext.kotlin_version = "1.5.21"
repositories {
mavenCentral()
maven {
name "papeeria-maven"
url "gcs://papeeria-maven-repo/maven2"
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:2.0.0"
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.+'
}
}
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'kotlin'
apply plugin: 'com.google.cloud.tools.jib'
repositories {
mavenLocal()
mavenCentral()
google()
}
configurations {
libprotoImplementation
}
dependencies {
compile "com.bardsoftware.papeeria.backend:cosmas-proto:$this_version"
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
//compile "io.grpc:grpc-netty:$grpc_version"
compile "io.prometheus:simpleclient_common:latest.release"
compile "io.prometheus:simpleclient:latest.release"
compile "io.prometheus:simpleclient_hotspot:latest.release"
compile "io.prometheus:simpleclient_httpserver:latest.release"
compile "com.xenomachina:kotlin-argparser:latest.release"
compile 'com.google.cloud:google-cloud-storage:1.113.14'
compile 'com.google.guava:guava:latest.release'
compile 'ch.qos.logback:logback-classic:latest.release'
compile 'ch.qos.logback:logback-core:latest.release'
//compile group: 'io.netty', name: 'netty-tcnative-boringssl-static', version: '2.0.+'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.8.+'
testCompile "io.grpc:grpc-testing:$grpc_version"
testCompile 'com.google.cloud:google-cloud-nio:latest.release'
}
dependencyLocking {
lockAllConfigurations()
}
sourceCompatibility = 1.8
mainClassName = 'com.bardsoftware.papeeria.backend.cosmas.CosmasServerKt'
test {
testLogging {
exceptionFormat = 'full'
showStandardStreams = true
}
}
jib {
from {
image = 'gcr.io/distroless/java:debug'
}
extraDirectories {
permissions = [
'/var/log/cosmas': '777',
'/var/log/cosmas/cosmas.log': '666'
]
}
}
group 'com.bardsoftware.papeeria.backend'
version new SimpleDateFormat("yyyy.MM.dd").format(new Date())