-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle-E
140 lines (120 loc) · 4.03 KB
/
build.gradle-E
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
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
mavenCentral()
}
dependencies {
classpath(
"gradle.plugin.com.palantir.gradle.gitversion:gradle-git-version:0.5.3",
"com.github.ben-manes:gradle-versions-plugin:0.13.0",
"gradle.plugin.de.fuerstenau:BuildConfigPlugin:1.1.4",
"net.ltgt.gradle:gradle-apt-plugin:0.21",
)
}
}
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java-library'
id "maven-publish"
id "signing"
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
}
ext["ossrhUsername"] = System.getenv('SONATYPE_USERNAME_CLARIFAI')
ext["ossrhPassword"] = System.getenv('SONATYPE_PASSWORD_CLARIFAI')
ext["sonatypeStagingProfileId"] = System.getenv('SONATYPE_STAGING_PROFILE_ID')
ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID')
ext["signing.password"] = System.getenv('SIGNING_PASSWORD')
ext["signing.secretKeyRingFile"] = System.getenv('SIGNING_SECRET_KEY_RING_FILE')
nexusPublishing {
repositories {
sonatype {
stagingProfileId = sonatypeStagingProfileId
username = ossrhUsername
password = ossrhPassword
}
}
}
group = 'com.clarifai'
version = '9.2.0'
repositories {
mavenCentral()
}
dependencies {
// This dependency is exported to consumers, that is to say found on their compile classpath.
api 'org.apache.commons:commons-math3:3.6.1'
api 'com.google.protobuf:protobuf-java:3.21.6'
api 'com.google.protobuf:protobuf-java-util:3.21.6'
api 'io.grpc:grpc-protobuf:1.51.1'
api 'io.grpc:grpc-stub:1.51.1'
api 'io.grpc:grpc-netty-shaded:1.51.1'
api 'javax.annotation:javax.annotation-api:1.3.2'
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:29.0-jre'
implementation 'com.squareup.okhttp3:okhttp:4.6.0'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
}
jar{
baseName = 'clarifai-grpc'
}
// Huge thanks to Cedric Beust for documenting these arcane and confusing options here:
// http://beust.com/weblog/2015/07/13/the-long-and-arduous-road-to-jcenter-and-maven-bliss/
def clarifai = [
orgName: "Clarifai",
description: "Clarifai Java API Client",
github: "https://github.com/Clarifai/clarifai-java",
]
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadoc(type: Javadoc, overwrite: true) {
source = sourceSets.main.allSource
classpath += configurations.compile + configurations.compileOnly
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
//noinspection GroovyAccessibility
from javadoc.destinationDir
}
artifacts {
archives jar
archives sourcesJar
}
publishing{
publications{
release(MavenPublication){
from components.java
groupId project.group
artifactId 'clarifai-grpc'
version project.version
artifact javadocJar
artifact sourcesJar
pom {
name = 'ClarifaiGrpc'
description = 'Clarifai Java gRPC Client'
url = "https://github.com/Clarifai/clarifai-java-grpc"
inceptionYear = "2021"
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
scm {
url = "https://github.com/Clarifai/clarifai-java-grpc"
connection = "https://github.com/Clarifai/clarifai-java-grpc.git"
}
developers {
developer {
name = "Clarifai, Inc."
}
}
}
}
}
}
signing {
sign publishing.publications
}