-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
121 lines (108 loc) · 3.53 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
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
id 'signing'
}
def grpcVersion = '1.59.1'
def jsonVersion = '20190722'
def releaseVersion = System.getenv('JAVA_SDK_VERSION')
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
version = releaseVersion
archivesBaseName = "strongdm-sdk"
group = 'io.github.strongdm'
// for more info on sourceset annotations:
// https://docs.gradle.org/current/userguide/building_java_projects.html#sec:compile
sourceSets {
main {
java {
srcDirs = ['com']
}
}
}
repositories {
maven { // The google mirror is less flaky than mavenCentral()
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
mavenCentral()
mavenLocal()
}
// for more info on dependency annotations:
// https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_dependency_management_overview
dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
implementation "io.grpc:grpc-stub:${grpcVersion}"
implementation "io.grpc:grpc-netty:${grpcVersion}"
// locking this version down due to a cve
implementation "io.netty:netty-codec-http2:4.1.105.Final"
implementation "org.json:json:${jsonVersion}"
compileOnly "javax.annotation:javax.annotation-api:1.2"
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'strongdm-sdk-java'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'strongdm-sdk-java'
description = 'strongDM SDK'
url = 'https://github.com/strongdm/strongdm-sdk-java'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'strongdm'
name = 'strongDM Engineering'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com:strongdm/strongdm-sdk-java.git'
developerConnection = 'scm:git:ssh://github.com:strongdm/strongdm-sdk-java.git'
url = 'https://github.com/strongdm/strongdm-sdk-java'
}
}
}
}
repositories {
maven {
url = "https://github.com/strongdm/strongdm-sdk-java"
}
}
}
signing {
sign publishing.publications.mavenJava
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
exclude '/strongdm/api/plumbing/**'
}
nexusPublishing {
repositories {
sonatype { //only for users registered in Sonatype after 24 Feb 2021
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_USERNAME")
password = System.getenv("OSSRH_PASSWORD")
}
}
}