-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
52 lines (44 loc) · 1.63 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
plugins {
id 'org.springframework.boot' version '2.2.6.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
}
group 'org.example'
version '1.0-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
}
dependencies {
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
runtimeOnly 'com.h2database:h2'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.security:spring-security-test'
compile("org.springframework.boot:spring-boot-starter-web")
compile group: 'org.modelmapper', name: 'modelmapper', version: '2.3.8'
testCompile("org.assertj:assertj-core:3.11.1")
}
test {
useJUnitPlatform()
}
task generateTestingValues() {
doLast {
File dataSql = file("src/main/resources/data.sql")
dataSql.write("")
//user_quiz
for (int i = 1; i <= 100; i++) {
dataSql.append("insert into user_quiz(id, email, password) values ('${i}', '${i}@com.pl', 'abcde');\n");
}
//quiz
for (int i = 0; i < 100; i++) {
int user_quiz_id = 1 + i % 10;
dataSql.append("insert into quiz(id, text, title, user_quiz_id)" +
" values ('${i + 1}', 'ala ma kota a kot ma wpierdol', 'kot', '${user_quiz_id}');\n")
}
}
}