forked from minima-global/Minima
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
104 lines (80 loc) · 2.62 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
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* User Manual available at https://docs.gradle.org/6.5/userguide/tutorial_java_projects.html
*/
plugins {
// Apply the java plugin to add support for Java
id 'java'
// Apply the application plugin to add support for building a CLI application.
id 'application'
// test coverage
id 'jacoco'
// eclipse classpath generation: ./gradlew cleanEclipse eclipse
id 'eclipse'
// shadowJar plugin to build fat jar
id 'com.github.johnrengelman.shadow' version '6.1.0'
id 'com.palantir.docker' version '0.28.0'
}
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
dependencies {
// This dependency is used by the application.
//implementation 'com.google.guava:guava:29.0-jre'
// Use JUnit test framework
testImplementation 'junit:junit:4.13'
//implementation 'org.mozilla:rhino:1.7R4'
implementation 'com.jcraft:jsch:0.1.55'
// implementation group: 'com.h2database', name: 'h2', version: '1.4.200'
//implementation group: 'mysql', name: 'mysql-connector-java', version: '8.0.25'
implementation 'com.h2database:h2:1.4.200'
implementation 'org.bouncycastle:bcpkix-jdk15on:1.69'
// implementation 'org.bouncycastle:bcpprov-jdk15on:1.69'
//implementation 'org.bouncycastle:bcputil-jdk15on:1.69'
}
sourceSets {
main {
java {
srcDirs = ['src']
}
resources {
srcDirs = ['resources']
}
}
test {
java {
srcDirs = ['test']
}
}
}
// reproducible builds
tasks.withType(AbstractArchiveTask) {
preserveFileTimestamps = false
reproducibleFileOrder = true
}
compileJava {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
//options.compilerArgs << '-something'
}
application {
// Define the main class for the application.
mainClassName = 'org.minima.Minima'
//mainClass.set("org.minima.Start") // new syntax for gradle 6.7+, plugins not compatible yet
}
jar {
manifest {
attributes 'Main-Class': 'org.minima.Minima'
}
}
docker {
name 'minima:latest'
files tasks.shadowJar, "$rootDir/scripts/installDapps.sh", "$rootDir/dapps/"
copySpec.from("$buildDir/lib/minima-all.jar",).into(".")
//"./scripts/installDapps.sh", "./dapps/block.minidapp", "./dapps/wallet.minidapp", "dapps/terminal.minidapp", "dapps/emh.minidapp"
}