-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
67 lines (54 loc) · 1.71 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
/*
* This build file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java Library project to get you started.
* For more details take a look at the Java Libraries chapter in the Gradle
* user guide available at https://docs.gradle.org/3.5/userguide/java_library_plugin.html
*/
apply plugin: 'java'
apply plugin: 'application'
mainClassName = 'onion.api.Main'
// In this section you declare where to find the dependencies of your project
repositories {
jcenter()
mavenCentral()
}
dependencies {
compile 'org.ini4j:ini4j:0.5.4'
compile 'commons-cli:commons-cli:1.3.1'
compile 'junit:junit:4.12'
compile 'org.bouncycastle:bcprov-jdk15on:1.55'
compile files('mockups/lib/VoidPhone.jar')
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
}
sourceSets {
main {
java { srcDirs = ['src/main'] }
}
test {
java { srcDirs = ['src/test'] }
}
}
//The following is taken from:
//https://stackoverflow.com/questions/18421857/is-it-possible-to-specify-multiple-main-classes-using-gradle-application-plugi
//To use run: gradle installDist
def createScript(project, mainClass, name) {
project.tasks.create(name: name, type: CreateStartScripts) {
description "Task to generate launcher script for " + name
outputDir = new File(project.buildDir, 'scripts')
mainClassName = mainClass
applicationName = name
classpath = startScripts.classpath
}
project.tasks[name].dependsOn(project.jar)
project.applicationDistribution.with {
into("bin") {
from(project.tasks[name])
fileMode = 0755
}
}
}
startScripts.enabled = false
run.enabled = false
createScript(project, 'onion.api.Main', 'onion-api')