forked from MarginaliaSearch/MarginaliaSearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsrcsets.gradle
More file actions
82 lines (72 loc) · 2.06 KB
/
srcsets.gradle
File metadata and controls
82 lines (72 loc) · 2.06 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
/** Configures the source sets for the code/ subprojects.
*
* Ideally this would have been done in the root build.gradle file, but due to disagreements
* between Gradle and IntelliJ's gradle plugin about how to interpret the sourceSets block
* when applied to subprojects from the root project, this has to be done in each subproject.
* */
apply plugin: 'java'
apply plugin: 'com.adarshr.test-logger'
apply plugin: 'com.gradleup.shadow'
apply plugin: 'application'
test {
maxHeapSize = "8G"
useJUnitPlatform()
}
tasks.register('fastTests', Test) {
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
maxHeapSize = "8G"
useJUnitPlatform {
excludeTags("slow", "flaky")
}
}
if (project.plugins.hasPlugin('application')) {
if (!application.mainClass.isPresent() || !application.applicationName.endsWith("-service")) {
tasks.shadowJar.enabled = false
}
else {
}
shadowJar {
mergeServiceFiles()
archiveBaseName = application.applicationName
archiveClassifier = ''
archiveVersion = project.version
zip64 true
// Manifest for executable JAR
manifest {
attributes(
'Main-Class': application.mainClass,
'Implementation-Version': project.version
)
}
// Minimize JAR size by excluding unnecessary files
exclude 'META-INF/*.SF'
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
}
}
dependencies {
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
sourceSets {
main {
java {
srcDirs = [
'java',
'build/generated/source/proto/main/grpc',
'build/generated/source/proto/main/java'
]
}
resources {
srcDirs = [ 'resources' ]
}
}
test {
java {
srcDirs = [ 'test' ]
}
resources {
srcDirs = [ 'test-resources' ]
}
}
}