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
120 lines (105 loc) · 3.41 KB
/
build.gradle
File metadata and controls
120 lines (105 loc) · 3.41 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
plugins {
id 'java-library'
id 'signing'
id 'maven-publish'
id('io.github.gradle-nexus.publish-plugin') version '1.1.0'
}
repositories {
mavenCentral()
}
group = 'org.typesense'
version = '0.0.8'
sourceCompatibility = 1.8
targetCompatibility = 1.8
jar {
manifest {
attributes "Main-Class": "org.typesense.api.Client"
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
} {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
}
}
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:2.3.1"
implementation "org.apache.logging.log4j:log4j-api:2.19.0"
implementation "org.apache.logging.log4j:log4j-core:2.19.0"
implementation "io.swagger.core.v3:swagger-annotations:2.0.0"
implementation "com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.14.1"
implementation "com.squareup.okhttp3:okhttp:4.9.1"
testImplementation "junit:junit:4.12"
testImplementation "org.hamcrest:hamcrest-all:1.3"
integrationTestImplementation "junit:junit:4.12"
integrationTestImplementation "org.hamcrest:hamcrest-all:1.3"
}
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
}
}