-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.gradle
55 lines (47 loc) · 1.4 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
/* Build the generated code into a jar file. */
apply plugin: 'java'
apply plugin: 'application'
if (project.hasProperty("main")) {
mainClassName="edu.cmu.cs.obsidian.generated_code.$main"
}
// TODO: generate this gradle file so we don't have to pass in main class on command line
archivesBaseName='chaincode'
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
sourceSets {
main {
java {
srcDirs = ["$codeDirectory", '../Obsidian_Runtime/src/main/java/Runtime']
}
}
}
run {
if (project.hasProperty("appArgs")) {
args Eval.me(appArgs)
}
}
dependencies {
compile 'io.grpc:grpc-all:0.13.2'
compile 'commons-cli:commons-cli:1.3.1'
compile 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:1.4.+'
compile 'org.glassfish:javax.json:1.1.0-M1'
compile 'org.json:json:20171018'
compile 'com.google.protobuf:protobuf-java:3.11.4'
}
version = '1.0'
libsDirName = '../../build'
jar {
archiveName = 'chaincode.jar'
manifest {
attributes 'Implementation-Title': 'Generated code',
'Implementation-Version': version,
'Class-Path': configurations.compile.collect { it.getName() } .join(' ') + " .",
'Main-Class': "edu.cmu.cs.obsidian.generated_code.$main"
}
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}