-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.old
128 lines (101 loc) · 2.6 KB
/
build.gradle.old
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
/* needed for apply plugin: 'org.springframework.boot' */
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.6.RELEASE")
}
}
group 'io.veredictum'
version '0.1.0'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
//apply plugin: 'gradle-one-jar'
/* these variables set after java plugin is applied */
sourceCompatibility = 1.8
targetCompatibility = 1.8
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.github.rholder:gradle-one-jar:1.0.4'
}
}
/*
sourceSets {
main {
java {
srcDir 'src/main/java'
}
}
test {
java {
srcDir 'src/test/java'
}
}
}
*/
repositories {
mavenCentral()
}
dependencies {
compile (
"org.springframework.boot:spring-boot-starter-web",
"org.springframework.kafka:spring-kafka:1.2.2.RELEASE",
"org.web3j:core:2.3.0"
)
testCompile (
'org.springframework.boot:spring-boot-starter-test',
'org.springframework.kafka:spring-kafka-test:1.2.2.RELEASE',
'org.junit.jupiter:junit-jupiter-engine:5.0.0-RC2'
)
}
/*
jar {
manifest.attributes(
"Main-Class": "io.veredictum.registrar.Application",
"Class-Path": "org/springframework/boot/spring-boot/1.5.1.RELEASE/1.5.1.RELEASE.jar"
)
}
jar {
doFirst {
manifest {
if (!configurations.compile.isEmpty()) {
attributes(
'Class-Path': configurations.compile.collect{it.toURI().toString()}.join(' '),
'Main-Class': 'com.example.Main')
}
}
}
}
task buildOneJar(type: OneJar) {
mainClass = 'home.ramboze.dev.veredictum.registrar-api.io.veredictum.registrar'
}
*/
/* Solidity Build Section */
task deleteSolCompiled(type: Delete) {
delete 'solCompiled'
}
task compileSol {
doLast {
mkdir 'solCompiled'
exec {
executable 'solc'
args 'src/main/sol/ContentAssetRegistrar.sol', '--bin', '--abi', '--optimize', '-o', 'solCompiled'
}
}
}
task generateSolWrapper {
doLast{
exec {
executable 'web3j'
args 'solidity', 'generate', 'solCompiled/ContentAssetRegistrar.bin', 'solCompiled/ContentAssetRegistrar.abi', '-o', 'src/main/java', '-p', 'io.veredictum.generated'
}
}
}
generateSolWrapper.dependsOn compileSol
compileSol.dependsOn deleteSolCompiled