-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
87 lines (75 loc) · 2.71 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
// This gradle file is used when the sdk java is opened as a sub-module of the cells-android-app repo.
// See the sibling "build-standalone.gradle" file if you are build the SDK Java as a stand alone module.
plugins {
// Build java project
id 'java-library'
// Publish the generated resources as Maven Artifacts
// See: https://docs.gradle.org/5.0/userguide/publishing_overview.html#publishing_overview
id 'maven-publish'
}
java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17
def vendorName = "Abstrium SAS"
def sdkJavaRepoURL = 'https://github.com/pydio/cells-sdk-java.git'
def artifactID = 'cells-sdk-java'
def sdkJavaSpecVersion = '0.4.6'
def sdkJavaVersion = ownVersions['java.sdk']
// Also publish sources and Javadoc
java {
// javadoc is disabled: they are broken after updating to java 17 and gradle 8.1
// withJavadocJar()
withSourcesJar()
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs << '-Xlint:unchecked'
options.deprecation = true
}
// Skip integration tests by default
test {
if (System.properties['test.profile'] != 'integration') {
exclude '**/integration/*'
}
}
publishing {
publications {
CellsSdk(MavenPublication) {
from components.java
groupId 'com.pydio.cells'
artifactId 'cells-sdk-java'
version = sdkJavaVersion
pom.withXml {
def root = asNode()
root.appendNode('description', 'Provide base java libraries to communicate with the Pydio Cells stack')
root.appendNode('name', 'Cells SDK for Java')
root.appendNode('url', 'https://pydio.com')
root.children().last() + rootProject.getBasePom(sdkJavaRepoURL)
}
}
}
}
jar {
manifest {
attributes('Specification-Title': 'Cells SDK for Java',
'Specification-Version': sdkJavaSpecVersion,
'Specification-Vendor': vendorName,
'Implementation-Title': artifactID,
'Implementation-Vendor': vendorName,
'Implementation-Version': sdkJavaVersion)
}
}
dependencies {
implementation libs.swagger.annotations
implementation libs.jsr305
implementation libs.commons.codec
implementation libs.okhttp
implementation libs.google.gson
implementation libs.gson.fire
implementation libs.threetenbp
implementation libs.jackson.databind
implementation libs.logging.interceptor
implementation libs.jakarta.ws.rs.api
// Necessary when developing / building with a JDK 11
implementation libs.javax.annotation.api
// JUnit test framework
testImplementation libs.junit
}