-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.gradle
173 lines (150 loc) · 4.82 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
167
168
169
170
171
172
173
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java Library project to get you started.
* For more details take a look at the Java Libraries chapter in the Gradle
* user guide available at https://docs.gradle.org/4.6/userguide/java_library_plugin.html
*/
buildscript {
ext {
projectVersion = '0.4' //version for nebulas-0.X.jar
grpcVersion = '1.11.0'
protobufVersion = '3.5.1-1'
protobufGradlePluginVersion = '0.8.5'
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
// ASSUMES GRADLE 2.12 OR HIGHER. Use plugin version 0.7.5 with earlier
// gradle versions
classpath "com.google.protobuf:protobuf-gradle-plugin:${protobufGradlePluginVersion}"
classpath "com.bmuschko:gradle-nexus-plugin:2.3.1"
}
}
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java-library'
id 'io.codearte.nexus-staging' version '0.11.0'
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'com.google.protobuf'
apply plugin: 'com.bmuschko.nexus'
archivesBaseName = 'nebulas'
group = "io.nebulas"
version = "0.4" //version for javadoc,source,tests. such as nebulas-0.x-javadoc.jar
modifyPom {
project {
name 'neb.java'
description 'The nebulasj library is a Java implementation of the Nebulas protocol, which allows it to maintain a wallet and send/receive transactions without needing a local copy of go-nebulas.'
url 'https://nebulas.io'
inceptionYear '2018'
scm {
url 'https://nebulas.io'
connection 'scm:https://github.com/nebulasio/nebulasj.git'
developerConnection 'scm:git@github.com:nebulasio/nebulasj.git'
}
licenses {
license {
name 'GNU LESSER GENERAL PUBLIC LICENSE'
url 'http://fsf.org'
distribution 'repo'
}
}
developers {
developer {
id 'qywang2012'
name 'Larry Wang'
email 'larry@nebulas.io'
}
developer {
id 'ideaalloc'
name 'Bill Lv'
email 'bill@nebulas.io'
}
}
}
}
extraArchive {
sources = true
tests = true
javadoc = true
}
nexus {
sign = true
repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
}
nexusStaging {
packageGroup = "io.nebulas"
}
//sourceSets {
// main {
// proto {
// // In addition to the default 'src/main/proto'
// srcDir 'src/main/proto'
// // In addition to the default '**/*.proto' (use with caution).
// include '**/*.proto'
// }
// java {
// }
// }
//}
jar {
baseName = 'nebulas'
version = "${projectVersion}"
}
dependencies {
// This dependency is exported to consumers, that is to say found on their compile classpath.
api 'org.apache.commons:commons-math3:3.6.1'
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:23.0'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
implementation 'junit:junit:4.12'
}
dependencies {
// https://mvnrepository.com/artifact/com.madgag.spongycastle/core
compile group: 'com.madgag.spongycastle', name: 'core', version: '1.58.0.0'
// https://mvnrepository.com/artifact/com.google.code.gson/gson
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.2'
// https://mvnrepository.com/artifact/com.lambdaworks/scrypt
compile group: 'com.lambdaworks', name: 'scrypt', version: '1.4.0'
}
dependencies {
compile "io.grpc:grpc-netty:${grpcVersion}"
compile "io.grpc:grpc-protobuf:${grpcVersion}"
compile "io.grpc:grpc-stub:${grpcVersion}"
}
dependencies {
compile group: 'com.squareup.okhttp3' , name: 'okhttp' , version: '3.9.1'
compile group: 'org.projectlombok', name: 'lombok', version: '1.16.20'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
}
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:${protobufVersion}"
}
generatedFilesBaseDir = "src/main/proto/generated"
clean {
delete generatedFilesBaseDir
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
}
}
generateProtoTasks {
all()*.plugins {
grpc {}
}
}
}