-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
125 lines (112 loc) · 3.22 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
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java library project to get you started.
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
* User Manual available at https://docs.gradle.org/7.6/userguide/building_java_projects.html
* This project uses @Incubating APIs which are subject to change.
*/
plugins {
// Apply the java-library plugin for API and implementation separation.
id 'java-library'
id 'maven-publish'
id 'signing'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id "io.github.gradle-nexus.publish-plugin" version "2.0.0"
id 'com.diffplug.spotless' version '7.0.1'
}
repositories {
mavenCentral()
}
def grpcVersion = "1.69.0"
dependencies {
api "com.google.protobuf:protobuf-java:4.29.1"
api "io.grpc:grpc-core:${grpcVersion}"
api "io.grpc:grpc-protobuf:${grpcVersion}"
api "io.grpc:grpc-stub:${grpcVersion}"
compileOnly "org.apache.tomcat:annotations-api:6.0.53" // necessary for Java 9+
runtimeOnly "io.grpc:grpc-netty-shaded:${grpcVersion}"
}
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
shadowJar {
mergeServiceFiles()
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
vendor = JvmVendorSpec.ADOPTIUM
}
withJavadocJar()
withSourcesJar()
}
version = project.findProperty('version')
group = 'de.uni-trier.recap'
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username = System.getenv("OSSRH_ACTOR")
password = System.getenv("OSSRH_TOKEN")
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = "arg-services"
from components.java
pom {
name = "Argumentation Microservices"
description = 'gRPC definitions for microservice-based argumentation machines'
url = 'https://github.com/recap-utr/arg-services'
licenses {
license {
name = 'MIT'
url = 'https://spdx.org/licenses/MIT.html'
}
}
organization {
name = "ReCAP at Trier University"
url = 'https://recap.uni-trier.de'
}
developers {
developer {
id = 'mirkolenz'
name = 'Mirko Lenz'
email = 'mirko@mirkolenz.com'
url = 'https://www.mirkolenz.com'
}
}
scm {
connection = 'scm:git:git://github.com/recap-utr/arg-services-java.git'
developerConnection = 'scm:git:ssh://github.com/recap-utr/arg-services-java.git'
url = 'http://github.com/recap-utr/arg-services-java/'
}
}
}
}
// Currently not used because gradle-semantic-release-plugin only calls the nexus task
repositories {
maven {
name = 'GitHubPackages'
url = uri('https://maven.pkg.github.com/recap-utr/arg-services-java')
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
signing {
// signingKey: gpg --armor --export-secret-keys KEY_ID
def signingKey = System.getenv("SIGNING_KEY")
def signingPassword = System.getenv("SIGNING_PASSWORD")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}
spotless {
groovyGradle {
greclipse()
}
}