-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
132 lines (109 loc) · 3.08 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
plugins {
// Compiling
id "java"
id 'io.miret.etienne.sass' version '1.4.2' // SASS Compiler
// Formatting
id 'com.diffplug.spotless' version "6.25.0"
// Code Coverage
id 'jacoco'
// Testing
id 'info.solidsoft.pitest' version '1.9.11' // Mutation Testing
id 'com.adarshr.test-logger' version '4.0.0' // Test Logger
}
group = 'com.xenosnowfox.forgedbythefox'
version = '0.0.0'
defaultTasks "spotlessApply", "clean", "compileSass", "copyAssets", "copyFonts", "shadowJar"
repositories {
mavenCentral()
maven {
url = "https://s3-us-west-2.amazonaws.com/dynamodb-local/release"
}
}
allprojects {
group = rootProject.group
version = rootProject.version
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
repositories {
mavenCentral()
maven {
url = "https://s3-us-west-2.amazonaws.com/dynamodb-local/release"
}
}
}
subprojects {
apply plugin: "java"
apply plugin: "jacoco"
apply plugin: "com.diffplug.spotless"
apply plugin: "com.adarshr.test-logger"
project.buildDir(new File(rootProject.projectDir, "build/modules/" + project.name))
dependencies {
// Jackson Data Modules
implementation "com.fasterxml.jackson.core:jackson-databind:2.18.0"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.14.1"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.1"
implementation "com.fasterxml.jackson.module:jackson-module-parameter-names:2.14.1"
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.18.0"
// project lombok
compileOnly "org.projectlombok:lombok:1.18.34"
annotationProcessor "org.projectlombok:lombok:1.18.34"
testCompileOnly "org.projectlombok:lombok:1.18.34"
testAnnotationProcessor "org.projectlombok:lombok:1.18.34"
// JUnit5 Testing Dependencies
testImplementation "org.junit.jupiter:junit-jupiter-api:5.11.1"
testImplementation "org.junit.jupiter:junit-jupiter-engine:5.11.1"
testImplementation "org.junit.jupiter:junit-jupiter-params:5.11.1"
}
jacoco {
toolVersion = "0.8.12"
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport // report is always generated after tests run
}
compileJava {
dependsOn "spotlessApply"
}
spotless {
java {
importOrder()
removeUnusedImports()
palantirJavaFormat()
formatAnnotations()
}
format("styling") {
target("sass/**/*.css", "sass/**/*.scss", "sass/*.css", "sass/*.scss")
}
}
}
spotless {
format("styling") {
target("*.css", "*.scss")
}
}
sass {
version = '1.80.4'
directory = file ("${rootDir}/.gradle/sass")
baseUrl = 'https://github.com/sass/dart-sass/releases/download'
}
compileSass {
outputDir = project.file ("${projectDir}/build/modules/static-resources/styles/")
sourceDir = project.file ("${projectDir}/sass")
style = compressed
noCharset ()
noErrorCss ()
sourceMap = none
sourceMapUrls = relative
}
task copyAssets(type: Copy) {
from 'assets'
into 'build/modules/static-resources'
}
compileJava.dependsOn copyAssets
task copyFonts(type: Copy) {
from 'font'
into 'build/modules/static-resources/fonts'
}
compileJava.dependsOn copyFonts