-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
102 lines (85 loc) · 2.74 KB
/
build.gradle
File metadata and controls
102 lines (85 loc) · 2.74 KB
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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
group = 'com.captchasonic'
version = '1.0.5'
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
withJavadocJar()
}
repositories {
mavenCentral()
}
// Proto stubs vendored in src/main/java/com/captchasonic/v1/
// Generated from proto/captchasonic/v1/sonic.proto — self-contained, no external paths.
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
}
}
dependencies {
// gRPC transport (includes netty)
implementation 'io.grpc:grpc-netty-shaded:1.74.0'
// gRPC stubs and protobuf
implementation 'io.grpc:grpc-stub:1.74.0'
implementation 'io.grpc:grpc-protobuf:1.74.0'
// Protobuf runtime
implementation 'com.google.protobuf:protobuf-java:4.35.0'
// Guava (required by grpc-stub for ListenableFuture)
implementation 'com.google.guava:guava:33.4.0-jre'
// javax.annotation (required for @Generated annotation in older protoc outputs)
compileOnly 'javax.annotation:javax.annotation-api:1.3.2'
}
signing {
def signingKey = System.getenv("SIGNING_KEY")
def signingPassword = System.getenv("SIGNING_PASSWORD")
if (signingKey) {
// CI mode — key passed via env var (GitHub Actions)
useInMemoryPgpKeys(signingKey, signingPassword)
} else {
// Local mode — key stays in GPG keychain (safer)
useGpgCmd()
}
sign publishing.publications
}
javadoc {
failOnError = false
options.addStringOption('Xdoclint:none', '-quiet')
}
publishing {
publications {
maven(MavenPublication) {
artifactId = 'captchasonic'
from components.java
pom {
name = 'CaptchaSonic Java SDK'
description = 'Official Java gRPC client for the CaptchaSonic CAPTCHA solving API'
url = 'https://captchasonic.com'
licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'captchasonic'
name = 'CaptchaSonic'
email = 'support@captchasonic.com'
}
}
scm {
connection = 'scm:git:git://github.com/Captcha-Sonic/captchasonic-java.git'
developerConnection = 'scm:git:ssh://github.com/Captcha-Sonic/captchasonic-java.git'
url = 'https://github.com/Captcha-Sonic/captchasonic-java'
}
}
}
}
}