-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle
140 lines (120 loc) · 3.59 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
plugins {
id 'signing'
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
id 'jacoco'
}
apply plugin: 'java'
apply plugin: 'maven-publish'
sourceCompatibility = 1.8
targetCompatibility = 1.8
group 'com.transloadit.sdk'
def config = new ConfigSlurper().parse(new File("${projectDir}/src/main/resources/java-sdk-version/version.properties").toURI().toURL())
version = config.versionNumber
description = "A Java Integration of the Transloadit's (https://transloadit.com) file uploading and encoding service."
allprojects {
repositories {
mavenCentral()
}
}
dependencies {
implementation 'org.jetbrains:annotations:23.0.0'
implementation 'io.tus.java.client:tus-java-client:0.4.5'
implementation 'joda-time:joda-time:2.12.2'
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
implementation 'org.json:json:20231013'
implementation 'commons-codec:commons-codec:1.15'
implementation 'io.socket:socket.io-client:2.1.0'
implementation 'com.launchdarkly:okhttp-eventsource:4.1.1'
testImplementation 'org.mock-server:mockserver-junit-jupiter-no-dependencies:5.15.0'
testImplementation 'org.mockito:mockito-core:4.8.0'
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
finalizedBy jacocoTestReport
}
tasks.register('sourcesJar', Jar) {
dependsOn classes
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
tasks.register('javadocJar', Jar) {
dependsOn javadoc
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
artifacts {
archives sourcesJar, javadocJar
}
def pomConfig = {
name 'transloadit'
url 'https://github.com/transloadit/java-sdk'
licenses {
license {
name 'The MIT License (MIT)'
url 'http://opensource.org/licenses/MIT'
}
}
developers {
developer {
id 'cdr_chakotay'
name 'Florian Kuenzig'
email '[email protected]'
organization 'Transloadit II GmbH'
organizationUrl 'transloadit.com'
}
developer {
id 'Transloadit'
name 'Transloadit'
email '[email protected]'
}
}
scm {
url 'https://github.com/transloadit/java-sdk'
connection 'https://github.com/transloadit/java-sdk'
developerConnection 'https://github.com/transloadit/java-sdk'
}
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
html.required = true
}
}
check.dependsOn jacocoTestReport
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
groupId project.getGroup()
artifactId 'transloadit'
version project.getVersion()
artifact sourcesJar
artifact javadocJar
pom.withXml {
def root = asNode()
root.appendNode('description', project.getDescription())
root.children().last() + pomConfig
}
}
}
}
signing{
def signingKeyId = System.getenv("SIGNING_KEY_ID")
def signingPassword = System.getenv("SIGNING_KEY_PASSWORD")
def signingKey = System.getenv("SIGNING_KEY_AMORED")
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign publishing.publications.mavenJava
}
nexusPublishing {
repositories {
sonatype {
username = System.getenv("SONATYPE_USER")
password = System.getenv("SONATYPE_KEY")
}
}
}