-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
166 lines (138 loc) · 4.14 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
}
plugins {
id 'java'
id 'scala'
id 'java-library'
id 'idea'
id 'maven-publish'
id 'signing'
id 'com.github.sherter.google-java-format' version '0.9'
id "com.github.johnrengelman.shadow" version "4.0.4"
id 'io.codearte.nexus-staging' version '0.30.0'
}
googleJavaFormat {
toolVersion = '1.7' // Java 8 compatible version
}
apply plugin: 'project-report'
group 'io.tiledb'
version '0.6.0-SNAPSHOT'
repositories {
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
mavenLocal()
}
dependencies {
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
implementation 'com.google.guava:guava:32.1.2-jre'
implementation group: 'io.tiledb', name: 'tiledb-cloud-java', version: '0.4.3'
}
apply plugin: 'java'
apply plugin: 'maven-publish'
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
publishing {
publications {
maven(MavenPublication) {
artifactId = 'openapi-java-client'
from components.java
}
}
}
task execute(type:JavaExec) {
main = System.getProperty('mainClass')
classpath = sourceSets.main.runtimeClasspath
}
import com.github.sherter.googlejavaformatgradleplugin.GoogleJavaFormat
import com.github.sherter.googlejavaformatgradleplugin.VerifyGoogleJavaFormat
task format(type: GoogleJavaFormat) {
source = sourceSets*.allJava
include '**/*.java'
}
task checkFormat(type: VerifyGoogleJavaFormat) {
source = sourceSets*.allJava
include '**/*.java'
ignoreFailures false
}
tasks.shadowJar.configure {
classifier = null
}
tasks.jar.configure {
classifier = 'default'
}
tasks.withType(Javadoc) {
failOnError false
options.addStringOption('Xdoclint:none', '-quiet')
}
sourceSets {
main.java.srcDirs = ['src/main/java']
}
task sourceJar(type: Jar) {
classifier "sources"
from sourceSets.main.allJava
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier "javadoc"
from javadoc.destinationDir
}
artifacts {
archives jar
archives shadowJar
archives sourceJar
archives javadocJar
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
artifact shadowJar
artifact sourceJar
artifact javadocJar
pom {
name = 'TileDB Cloud JDBC'
description = 'The JDBC client for the TileDB Cloud Service'
url = 'https://github.com/TileDB-Inc/TileDB-Cloud-JDBC'
licenses {
license {
name = 'The MIT License (MIT)'
url = 'https://github.com/TileDB-Inc/TileDB-Cloud-JDBC/blob/master/LICENSE'
}
}
scm {
connection = 'scm:git:https://github.com/TileDB-Inc/TileDB-Cloud-Java.git'
developerConnection = 'scm:git:ssh://git@github.com/TileDB-Inc/TileDB-Cloud-Java'
url = 'https://github.com/TileDB-Inc/TileDB-Cloud-Java'
}
developers {
developer {
name = 'TileDB, Inc'
email = 'help@tiledb.io'
organization = 'TileDB, Inc.'
organizationUrl = 'https://tiledb.com/'
}
}
}
}
}
repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username System.getenv('SONATYPE_USERNAME')
password System.getenv('SONATYPE_PASSWORD')
}
}
}
}