-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
116 lines (97 loc) · 3.11 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
apply plugin: 'java-library'
apply plugin: 'com.novoda.bintray-release'
repositories {
jcenter()
mavenCentral()
}
buildscript {
repositories {
maven {
url uri("$rootDir/repo")
}
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.novoda:bintray-release:0.9.1'
}
}
// Change this before generating jars.
version = 'v2.8.1'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//implementation 'org.jetbrains:annotations:17.0.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.9'
implementation 'com.fasterxml.jackson.core:jackson-core:2.9.9'
implementation 'com.squareup.retrofit2:retrofit:2.6.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'org.apache.commons:commons-math3:3.6.1'
implementation 'org.json:json:20160212'
//implementation 'org.nanohttpd:nanohttpd:2.3.1'
implementation 'com.google.guava:guava:26.0-jre'
implementation 'com.fasterxml.jackson.core:jackson-core:2.9.9'
implementation 'com.madgag.spongycastle:core:1.58.0.0'
implementation 'com.madgag.spongycastle:prov:1.58.0.0'
implementation 'io.jsonwebtoken:jjwt-api:0.11.0'
implementation 'io.jsonwebtoken:jjwt-impl:0.11.0'
implementation 'io.jsonwebtoken:jjwt-jackson:0.11.0'
implementation 'org.slf4j:slf4j-api:1.7.30'
implementation 'org.elastos.did:didsdk:2.2.4'
testImplementation 'org.junit.jupiter:junit-jupiter:5.6.0'
testImplementation 'ch.qos.logback:logback-classic:1.2.3'
testRuntime 'org.junit.jupiter:junit-jupiter-engine:5.6.0'
testRuntime 'org.junit.vintage:junit-vintage-engine:5.6.0'
testRuntimeOnly 'ch.qos.logback:logback-classic:1.2.3'
}
jar {
manifest {
attributes('Implementation-Title': project.name,
'Implementation-Version': project.version)
}
}
// Generate java API docs
task createjavadoc(type: Javadoc) {
source = sourceSets.main.java.srcDirs
destinationDir = file("build/docs/javadoc")
classpath = sourceSets.main.runtimeClasspath
failOnError false
options {
encoding "UTF-8"
charSet 'UTF-8'
links "http://docs.oracle.com/javase/8/docs/api"
locale "en_US"
}
}
javadoc.dependsOn(build)
test {
useJUnitPlatform()
testLogging {
outputs.upToDateWhen {false}
showStandardStreams = true
}
}
// Generate java source .jar file
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
// Generate java API docs .jar file
task javadocJar(type: Jar, dependsOn: createjavadoc) {
classifier = 'javadoc'
from createjavadoc.destinationDir
}
task jars {
dependsOn sourcesJar
dependsOn javadocJar
}
publish {
userOrg = 'elastos'
groupId = 'org.elastos'
artifactId = 'hive'
publishVersion = version
desc = 'Elastos Hive SDK'
repoName = 'Elastos.NET.Hive.Java.SDK'
website = 'https://github.com/elastos/Elastos.NET.Hive.Java.SDK'
}