-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathbuild.gradle.kts
130 lines (111 loc) · 3.86 KB
/
build.gradle.kts
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
plugins {
id("org.springframework.boot") version "2.7.18"
java
jacoco
`maven-publish`
war
}
apply(plugin = "io.spring.dependency-management")
repositories {
mavenLocal()
maven {
url = uri("https://repo.maven.apache.org/maven2/")
}
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-test")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-mail")
implementation("org.springframework.boot:spring-boot-devtools")
implementation("org.springframework:spring-jdbc")
implementation("org.springframework:spring-orm")
implementation("org.springframework:spring-tx")
implementation("com.h2database:h2")
implementation("org.apache.commons:commons-dbcp2")
implementation("org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final")
implementation("org.hibernate:hibernate-core")
implementation("org.hibernate:hibernate-entitymanager")
implementation("org.springframework.security:spring-security-cas")
implementation("org.jasig.cas.client:cas-client-core:3.6.4")
implementation("org.jasig.cas.client:cas-client-support-saml:3.6.4")
implementation("org.thymeleaf.extras:thymeleaf-extras-springsecurity5:3.0.5.RELEASE")
implementation("org.springframework:spring-test")
implementation("org.springframework.security:spring-security-test")
implementation("org.webjars:webjars-locator-core")
implementation("org.webjars:bootstrap:4.4.1")
implementation("org.webjars:jquery:3.4.1")
implementation("org.webjars:angularjs:1.5.8")
implementation("org.webjars.bower:angular-ui-grid:4.0.6")
implementation("org.webjars:font-awesome:4.7.0")
implementation("org.webjars:html5shiv:3.7.3")
implementation("org.webjars:respond:1.4.2")
implementation("org.webjars.bower:angular-mocks:1.5.8")
testImplementation("org.webjars:jasmine:2.2.0")
}
group = "edu.hawaii.its"
version = "1.1"
description = "casdemo"
java.sourceCompatibility = JavaVersion.VERSION_1_8
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}
tasks.withType<JavaCompile>() {
options.encoding = "UTF-8"
}
tasks.jar {
enabled = true
// Remove 'plain' postfix from file name.
archiveClassifier.set("")
}
tasks.war {
enabled = true
// Remove 'plain' postfix from file name.
archiveClassifier.set("")
}
tasks.test {
useJUnitPlatform()
finalizedBy(tasks.jacocoTestReport)
}
tasks.jacocoTestReport {
dependsOn(tasks.test)
classDirectories.setFrom(
sourceSets.main.get().output.asFileTree.matching {
exclude("**/configuration/SpringBootWebApplication.class")
}
)
}
var profiles = "localhost" // Default profile, override as needed.
tasks.named<org.springframework.boot.gradle.tasks.run.BootRun>("bootRun") {
args("--spring.profiles.active=$profiles")
}
tasks.register("hints") {
doLast {
printHints()
}
}
tasks.help {
doLast {
printHints()
}
}
/**
* Print some commonly used commands as hints.
*/
fun printHints() {
println("\nHere are some common app tasks for this project:")
// First, build the shared libraries:
println(" $ ./gradlew publishToMavenLocal")
// To run a specific test method:
println(" $ ./gradlew test --tests StringsTest.trunctate")
// To run an app the test profile:
println(" $ ./gradlew bootRun --args='--spring.profiles.active=test'")
// Build the war.
println(" $ ./gradlew war")
// To run Jacoco test coverage reports:
println(" $ ./gradlew jacocoTestReport")
}