-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle
92 lines (78 loc) · 2.33 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
plugins {
id "java"
}
project.version = "1.2.0"
project.group = 'com.codingchili.ethereumingest'
sourceCompatibility = 11
targetCompatibility = 11
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
mavenLocal()
maven { url 'https://jitpack.io' }
mavenCentral()
}
// https://stackoverflow.com/a/52615808
def currentOS = org.gradle.internal.os.OperatingSystem.current()
def platform = project.platform
if (!platform) {
if (currentOS.isWindows()) {
platform = 'win'
} else if (currentOS.isLinux()) {
platform = 'linux'
} else if (currentOS.isMacOsX()) {
platform = 'mac'
}
}
dependencies {
compile 'com.github.codingchili.chili-core:elastic:1.1.3'
compile 'com.github.codingchili.chili-core:core:1.1.3'
compile "org.openjfx:javafx-controls:11.0.2:${platform}"
compile "org.openjfx:javafx-fxml:11.0.2:${platform}"
compile "org.openjfx:javafx-graphics:11.0.2:${platform}"
compile "org.openjfx:javafx-base:11.0.2:${platform}"
compile 'org.web3j:core:4.2.0'
}
test {
testLogging {
exceptionFormat "full"
}
reports.html.enabled = false
}
task sourcesJar(type: Jar) {
classifier 'sources'
from sourceSets.main.allSource
}
jar {
archivesBaseName = "ethereum-ingest-${platform}"
zip64 true
from {
(configurations.compile).collect {
it.isDirectory() ? it : zipTree(it)
}
}
manifest {
attributes 'Implementation-Title': 'ethereum-ingest',
'Implementation-Version': version,
'Main-Class': 'com.codingchili.ethereumingest.Service'
}
exclude 'META-INF/*.RSA', 'META-INF/*.DSA', 'META-INF/*.SF'
}
task alljavadoc(type: Javadoc) {
source subprojects.collect { it.sourceSets.main.allJava }
classpath = files(subprojects.collect { it.sourceSets.main.compileClasspath })
destinationDir = file("${buildDir}/docs/javadoc")
}
task archiveJavadoc(type: Zip, dependsOn: alljavadoc) {
baseName = 'javadocs'
from fileTree(file("${buildDir}/docs/javadoc"))
}
task testReport(type: TestReport, dependsOn: 'build') {
destinationDir = file("$buildDir/reports/allTests")
reportOn subprojects*.test
}
task archiveTestReport(type: Zip, dependsOn: testReport) {
baseName = 'testreport'
from fileTree(file("$buildDir/reports/allTests"))
}