-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
147 lines (124 loc) · 3.9 KB
/
Copy pathbuild.gradle
File metadata and controls
147 lines (124 loc) · 3.9 KB
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
plugins {
id 'java'
id 'application'
id 'org.springframework.boot' version '3.2.0'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.openjfx.javafxplugin' version '0.0.14'
id 'jacoco'
id 'checkstyle'
}
repositories {
mavenCentral()
// Needed for Google API client service artifacts
maven { url 'https://maven.google.com' }
}
def javafxVersion = '21'
dependencies {
// Spring Boot starters
implementation('org.springframework.boot:spring-boot-starter-data-jdbc') {
exclude group: 'commons-logging', module: 'commons-logging'
}
implementation('org.springframework.boot:spring-boot-starter-validation') {
exclude group: 'commons-logging', module: 'commons-logging'
}
// Database dependencies
implementation 'com.h2database:h2'
implementation 'com.zaxxer:HikariCP'
// JavaFX dependencies
implementation 'org.openjfx:javafx-controls:21'
implementation 'org.openjfx:javafx-fxml:21'
implementation 'org.openjfx:javafx-web:21'
// Jackson for JSON annotations used in entities
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
// Google OAuth 2.0 + Drive API
implementation 'com.google.api-client:google-api-client:2.2.0'
implementation 'com.google.oauth-client:google-oauth-client-jetty:1.34.1'
implementation 'com.google.apis:google-api-services-drive:v3-rev20241206-2.0.0'
implementation 'com.google.apis:google-api-services-oauth2:v2-rev20200213-2.0.0'
// Testing dependencies
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.mockito:mockito-core'
}
javafx {
version = '21'
// Usually you declare whichever modules you use:
modules = ['javafx.controls', 'javafx.fxml', 'javafx.web']
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
group = 'com.studysync'
version = '0.1.6'
description = 'StudySync - Personal Study and Task Management Desktop Application (Beta)'
application {
mainClass = 'com.studysync.StudySyncApplication'
}
// Test configuration
tasks.named('test') {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
}
finalizedBy jacocoTestReport
}
// Code coverage
jacoco {
toolVersion = "0.8.11"
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
html.required = true
csv.required = false
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
'**/config/**',
'**/StudySyncApplication.class',
'**/StudySyncJavaFXApp.class'
])
}))
}
}
// Code style checking
checkstyle {
toolVersion = '10.12.1'
configFile = file("${rootDir}/config/checkstyle/checkstyle.xml")
}
checkstyleMain {
source = 'src/main/java'
}
checkstyleTest {
source = 'src/test/java'
}
// Integration tests
configurations {
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntimeOnly.extendsFrom testRuntimeOnly
}
sourceSets {
integrationTest {
java {
compileClasspath += sourceSets.main.output
compileClasspath += sourceSets.test.output
runtimeClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.test.output
srcDir file('src/test/java/com/studysync/integration')
}
resources.srcDir file('src/test/resources')
}
}
tasks.register('integrationTest', Test) {
description = 'Runs integration tests.'
group = 'verification'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
useJUnitPlatform()
shouldRunAfter test
}