forked from iotaledger/ict
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
67 lines (53 loc) · 1.85 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
plugins {
id 'java'
id 'idea' // for 'gradle idea' to generate intellij configuration
}
group 'org.iota'
version '0.5-SNAPSHOT'
sourceCompatibility = 1.7
repositories {
maven { url "https://jitpack.io" }
mavenCentral()
}
dependencies {
compile "com.sparkjava:spark-core:2.7.2"
compile 'org.json:json:20171018'
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.1'
// used until pull request for iotaledger/iota.curl.java is merged
compile 'com.github.mikrohash:iota.curl.java:master'
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.1'
// to prevent warning: https://www.slf4j.org/codes.html#StaticLoggerBinder
compile group: 'org.slf4j', name: 'slf4j-nop', version: '1.7.25'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'pl.pragmatists', name: 'JUnitParams', version: '1.1.1'
testCompile "org.mockito:mockito-core:2.+"
}
task fatJar(type: Jar) {
manifest {
attributes 'Main-Class': 'org.iota.ict.Main'
}
baseName = 'ict'
destinationDir = file("$rootDir/")
from("./") { include 'web/**' }
from { configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) } }
exclude 'META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat'
with jar
}
task runDocGen(type:Exec) {
// gen_classes.py cannot be included in this repository because of license issues.
workingDir("$rootDir/docs")
commandLine 'python', 'gen.py'
}
task validateRelease() {
dependsOn(runDocGen)
doFirst {
println "=== RELEASING VERSION " + version + " ==="
assert !version.contains("SNAPSHOT")
assert 'git status --porcelain -uno'.execute().text.length() == 0
}
}
task release {
dependsOn(validateRelease)
dependsOn(test)
finalizedBy(fatJar)
}