-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
140 lines (127 loc) · 4.21 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
plugins {
id "com.google.protobuf" version "0.8.18"
id "org.jetbrains.kotlin.jvm" version "$version_kotlin"
}
group 'org.vitrivr'
version '0.15.0'
apply plugin: 'com.google.protobuf'
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
repositories {
mavenCentral()
maven { url "https://kotlin.bintray.com/kotlinx" }
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = 'org.vitrivr'
artifactId = 'cottontaildb-proto'
version = System.getenv().getOrDefault("MAVEN_PUBLICATION_VERSION", version.toString())
pom {
name = 'Cottontail DB (Driver)'
description = 'The gRPC and ProtoBuf definitions (driver) for Cottontail DB.'
url = 'https://github.com/vitrivr/cottontaildb-proto/'
licenses {
license {
name = 'MIT License'
}
}
developers {
developer {
id = 'ppanopticon'
name = 'Ralph Gasser'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:https://github.com/vitrivr/cottontaildb-proto.git'
url = 'https://github.com/vitrivr/cottontaildb-proto'
}
}
from components.java
}
}
repositories {
maven {
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
name = "OSSRH"
url = (publishing.publications.mavenJava.version.endsWith('SNAPSHOT')) ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}
sourceSets {
main {
proto {
srcDirs += "$projectDir/src/main/protobuf"
}
java {
srcDirs += "$projectDir/build/generated/source/proto/main/java"
}
kotlin {
srcDirs += "$projectDir/build/generated/source/proto/main/kotlin"
}
}
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
protobuf {
generatedFilesBaseDir = "$projectDir/build/generated/source/proto"
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:$version_grpc"
}
grpckt {
artifact = "io.grpc:protoc-gen-grpc-kotlin:$version_grpc_kotlin:jdk8@jar"
}
}
protoc {
artifact = "com.google.protobuf:protoc:$version_protobuf"
}
generateProtoTasks {
all()*.plugins {
grpc {
outputSubDir = 'java'
}
grpckt {
outputSubDir = 'kotlin'
}
}
}
}
dependencies {
/////// gRPC & Protobuf
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: version_protobuf
implementation group: 'io.grpc', name: 'grpc-netty', version: version_grpc
implementation group: 'io.grpc', name: 'grpc-protobuf', version: version_grpc
implementation group: 'io.grpc', name: 'grpc-stub', version: version_grpc
implementation group: 'io.grpc', name: 'grpc-kotlin-stub', version: version_grpc_kotlin
compileOnly group: 'org.apache.tomcat', name: 'tomcat-annotations-api', version: version_annotations
/////// Kotlin references
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: version_kotlin
implementation group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: version_kotlinx_coroutines
}