forked from typesense/typesense-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
122 lines (106 loc) · 3.65 KB
/
build.gradle
File metadata and controls
122 lines (106 loc) · 3.65 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
plugins {
id 'java'
id 'signing'
id 'maven-publish'
id 'io.github.gradle-nexus.publish-plugin' version "${nexusPluginVersion}"
id 'com.github.johnrengelman.shadow' version "${shadowJarPluginVersion}"
}
repositories {
mavenCentral()
}
group = 'org.typesense'
version = '0.2.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8
jar {
manifest {
attributes(
"Main-Class": "org.typesense.api.Client",
"Multi-Release": "true"
)
}
exclude "META-INF/DEPENDENCIES"
}
sourceSets {
integrationTest {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
java.srcDir file('src/integration-test/java')
resources.srcDir file('src/integration-test/resources')
}
}
configurations {
integrationTestImplementation.extendsFrom implementation
integrationTestRuntimeOnly.extendsFrom runtimeOnly
}
java {
withJavadocJar()
withSourcesJar()
}
tasks.register('integrationTest', Test) {
description = 'Runs integration tests (assumes running Docker image or local server)'
group = 'verification'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
outputs.upToDateWhen { false }
shouldRunAfter test
}
check.dependsOn integrationTest
dependencies {
implementation "javax.xml.bind:jaxb-api:${javaxXmlBindVersion}"
implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonCoreVersion}"
implementation "io.swagger.core.v3:swagger-annotations:${swaggerCoreV3Version}"
implementation "org.slf4j:slf4j-api:${slf4jVersion}"
implementation "com.squareup.okhttp3:okhttp:${okhttp3Version}"
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}"
testImplementation "org.hamcrest:hamcrest-all:${hamcrestVersion}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}"
integrationTestImplementation "org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}"
integrationTestImplementation "org.hamcrest:hamcrest-all:${hamcrestVersion}"
integrationTestRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}"
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from(components.java)
pom {
name = 'typesense-java'
description = 'Typesense Java Client'
url = 'https://github.com/typesense/typesense-java'
licenses {
license {
name = 'GNU General Public License v3.0'
url = 'https://www.gnu.org/licenses/gpl-3.0.en.html'
}
}
developers {
developer {
id = 'typesense'
name = 'Typesense'
}
}
scm {
url = 'https://github.com/typesense/typesense-java'
connection = 'scm:git://github.com/typesense/typesense-java.git'
developerConnection = 'scm:git://github.com/typesense/typesense-java.git'
}
}
}
}
}
if (project.hasProperty("signing.keyId")) {
signing {
sign publishing.publications.mavenJava
}
}