forked from lightsail-network/java-stellar-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
84 lines (76 loc) · 2.76 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
buildscript {
ext.okhttpclientVersion= '4.10.0'
}
plugins {
id "io.freefair.lombok" version "6.4.1"
id "com.github.johnrengelman.shadow" version "7.1.2"
id "java"
id "com.github.ben-manes.versions" version "0.42.0"
id "project-report"
id "maven-publish"
id "java-library"
}
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
version = '0.37.2'
group = 'stellar'
jar.enabled = false
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
javadoc.options.encoding = 'UTF-8'
publishing {
publications {
sdkLibrary(MavenPublication) { publication ->
project.shadow.component(publication)
}
}
}
shadowJar {
manifest {
attributes (
"Implementation-Title" : "stellar-sdk",
"Implementation-Version" : project.getVersion()
)
}
duplicatesStrategy DuplicatesStrategy.EXCLUDE
archiveClassifier.set('')
archiveFileName.set('stellar-sdk.jar')
relocate('com.', 'shadow.com.') {
// okhttp hardcodes android platform class loading to this package, shadowing would attempt to rewrite the hardcode
// to be 'shadow.com.android.org.conscrypt' which we don't want to happen.
exclude 'com.android.org.conscrypt'
}
relocate 'net.','shadow.net.'
relocate 'javax.annotation', 'shadow.javax.annotation'
relocate 'org.apache','shadow.org.apache'
relocate 'org.jvnet','shadow.org.jvnet'
relocate 'org.codehaus','shadow.org.codehaus'
relocate 'org.threeten','shadow.org.threeten'
relocate 'org.checkerframework','shadow.org.checkerframework'
relocate 'okhttp3','shadow.okhttp3'
relocate 'okio','shadow.okio'
relocate 'kotlin','shadow.kotlin'
relocate 'org.intellij','shadow.org.intellij'
relocate 'org.jetbrains','shadow.org.jetbrains'
}
repositories {
mavenCentral()
}
dependencies {
implementation "com.squareup.okhttp3:okhttp:${okhttpclientVersion}"
implementation "com.squareup.okhttp3:okhttp-sse:${okhttpclientVersion}"
implementation 'com.moandjiezana.toml:toml4j:0.7.2'
// use the android version because we don't want java 8 stuff
implementation 'com.google.guava:guava:26.0-android'
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'commons-io:commons-io:2.11.0'
implementation 'net.i2p.crypto:eddsa:0.3.0'
implementation 'org.threeten:threetenbp:1.6.0'
testImplementation 'org.mockito:mockito-core:4.6.1'
testImplementation "com.squareup.okhttp3:mockwebserver:${okhttpclientVersion}"
testImplementation 'junit:junit:4.13.2'
testImplementation 'javax.xml.bind:jaxb-api:2.3.1'
testImplementation group: 'org.junit.vintage', name: 'junit-vintage-engine', version: '4.12.1'
}
tasks.named('test') { task ->
useJUnitPlatform()
}