-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
113 lines (103 loc) · 3.2 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
plugins {
id "com.google.protobuf" version "0.8.14"
}
group 'org.vitrivr'
version '1.0.0'
apply plugin: 'com.google.protobuf'
apply plugin: 'idea'
apply plugin: 'java'
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 = 'adampro-proto'
version = System.getenv().getOrDefault("MAVEN_PUBLICATION_VERSION", version.toString())
pom {
name = 'ADAMpro gRPC Driver'
description = 'The gRPC and ProtoBuf definitions (driver) for the ADAMpro database.'
url = 'https://github.com/vitrivr/adampro-protobuf/'
licenses {
license {
name = 'MIT License'
}
}
developers {
developer {
name = 'vitrivr-team'
email = 'info@vitrivr.org'
organization = 'vitrivr'
organizationUrl = 'https://vitrivr.org'
}
}
scm {
connection = 'scm:git:https://github.com/vitrivr/adampro-protobuf.git'
url = 'https://github.com/vitrivr/adampro-protobuf'
}
}
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"
}
}
}
protobuf {
generatedFilesBaseDir = "$projectDir/build/generated/source/proto"
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.33.1'
}
}
protoc {
artifact = 'com.google.protobuf:protoc:3.14.0'
}
generateProtoTasks {
all()*.plugins { grpc {
outputSubDir = 'java'
}}
}
}
dependencies {
/////// gRPC & Protobuf
compile group: 'javax.annotation', name: 'javax.annotation-api', version: '1.2'
compile group: 'com.google.protobuf', name: 'protobuf-java', version: '3.14.0'
compile group: 'io.grpc', name: 'grpc-all', version: '1.33.1'
}