This repository has been archived by the owner on Feb 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle
119 lines (102 loc) · 2.99 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
plugins {
id "java-library"
id "maven-publish"
id "signing"
}
group = "io.snyk.code.sdk"
archivesBaseName = "snyk-code-client"
version = "2.3.5"
repositories {
mavenLocal()
mavenCentral()
}
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
java {
withJavadocJar()
withSourcesJar()
}
sourceSets {
integTest {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}
configurations {
integTestImplementation.extendsFrom implementation
integTestRuntimeOnly.extendsFrom runtimeOnly
}
compileIntegTestJava {
sourceCompatibility = 11
targetCompatibility = 11
}
compileTestJava {
sourceCompatibility = 11
targetCompatibility = 11
}
dependencies {
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'org.jetbrains:annotations:22.0.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0'
testImplementation 'junit:junit:4.13.2'
integTestImplementation 'junit:junit:4.13.2'
}
task integTest(type: Test) {
description = "Runs integration tests."
group = "verification"
testClassesDirs = sourceSets.integTest.output.classesDirs
classpath = sourceSets.integTest.runtimeClasspath
shouldRunAfter test
testLogging {
exceptionFormat "full"
showStandardStreams = true
}
outputs.upToDateWhen { false }
}
integTest.dependsOn test
publishing {
repositories {
maven {
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = project.hasProperty("ossrhUsername") ? ossrhUsername : "Unknown user"
password = project.hasProperty("ossrhPassword") ? ossrhPassword : "Unknown password"
}
}
}
publications {
maven(MavenPublication) {
from components.java
pom {
description = "Snyk Code Public API package in Java"
url = "https://github.com/snyk/code-sdk-java"
name = "Snyk Code API Client"
developers {
developer {
id = "road-runner"
name = "Team Road Runner"
email = "[email protected]"
}
}
licenses {
license {
name = "MIT License"
url = "https://spdx.org/licenses/MIT.html"
}
}
scm {
connection = "scm:git:[email protected]:snyk/code-sdk-java.git"
developerConnection = "scm:git:[email protected]:snyk/code-sdk-java.git"
url = "https://github.com/snyk/code-sdk-java"
}
}
}
}
}
signing {
sign publishing.publications.maven
}
tasks.withType(Sign) {
onlyIf { project.hasProperty("release") }
}