-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
116 lines (99 loc) · 3.53 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
105
106
107
108
109
110
111
112
113
114
115
116
version = "0.0.2-SNAPSHOT"
buildscript {
ext {
springBootVersion = '1.4.1.RELEASE'
querydslVersion = '4.1.3'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
apply plugin: 'groovy'
apply plugin: 'application'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:Camden.RELEASE"
}
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-cache')
compile('org.springframework.boot:spring-boot-starter-cloud-connectors')
compile('org.springframework.cloud:spring-cloud-starter-security')
compile('org.springframework.cloud:spring-cloud-starter')
compile('org.springframework.cloud:spring-cloud-task-starter')
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-data-rest')
compile('org.springframework.boot:spring-boot-starter-security')
compile('org.springframework.boot:spring-boot-starter-validation')
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-websocket')
compile "com.querydsl:querydsl-apt:$querydslVersion:jpa"
compile "com.querydsl:querydsl-jpa:$querydslVersion"
compile('com.h2database:h2')
compile('io.jsonwebtoken:jjwt:0.7.0')
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.1.7'
// https://mvnrepository.com/artifact/com.squareup.jnagmp/jnagmp
compile group: 'com.squareup.jnagmp', name: 'jnagmp', version: '2.0.0'
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('org.spockframework:spock-spring')
testCompile('org.springframework.security:spring-security-test')
testCompile('cglib:cglib:2.2')
}
ext['spock.version'] = '1.1-groovy-2.4-rc-2'
mainClassName = 'ch.ge.ve.protopoc.ProtocolPocApplication'
jar {
baseName = 'chvote-protocol-poc'
version = project.version
}
task createSimulationScripts(type: CreateStartScripts) {
outputDir = file('build/simulation')
mainClassName = 'ch.ge.ve.protopoc.service.simulation.Simulation'
applicationName = 'chvote-protocol-simulation'
classpath = files(jar.archiveName)
classpath += project.configurations.runtime
}
task simulation(type:JavaExec, dependsOn: classes, group: 'simulation') {
def mySecLevel = System.getProperty('secLevel', '1')
def myElectionType = System.getProperty('electionType', 'SIMPLE_SAMPLE')
def myVotersCount = System.getProperty('votersCount', '100')
main = 'ch.ge.ve.protopoc.service.simulation.Simulation'
classpath = sourceSets.main.runtimeClasspath
args = ["$mySecLevel", "$myElectionType", "$myVotersCount"]
println "using args: $args"
}
distributions {
main {
baseName = 'chvote-protocol-poc'
}
simulation {
baseName = 'chvote-protocol-simulation'
contents {
into('lib') {
from jar
from(project.configurations.runtime)
}
into('bin') {
from createSimulationScripts
}
}
}
}
idea {
module {
sourceDirs += file('/generated')
}
}