-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
53 lines (44 loc) · 1.32 KB
/
Copy pathbuild.gradle
File metadata and controls
53 lines (44 loc) · 1.32 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
plugins {
id 'java'
id 'com.gradleup.shadow' version '9.4.2'
}
group = 'com.avrix'
version = '1.0.0'
def buildPath = System.getenv('BUILD_PATH') ?: 'build'
def baseSuffix = "API"
def baseArchiveName = "${rootProject.name.capitalize()}-${baseSuffix}"
repositories {
mavenCentral()
}
dependencies {
// AvrixLoader
compileOnly(rootProject)
compileOnly(fileTree(dir: 'libs', include: '*.jar'))
// Test
testImplementation platform('org.junit:junit-bom:6.1.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.assertj:assertj-core:3.27.7'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation("org.slf4j:slf4j-simple:2.0.18")
testImplementation("org.spongepowered:configurate-yaml:4.2.0")
}
test {
useJUnitPlatform()
}
processResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
filesMatching('**/metadata.yml') {
filter { String line -> line.replace('%API_VERSION%', version.toString()) }
}
}
shadowJar {
archiveBaseName.set(baseArchiveName)
archiveClassifier.set('')
destinationDirectory.set(file(buildPath))
manifest {
attributes(
'Implementation-Title': "${rootProject.name.capitalize()}-${baseSuffix}",
'Implementation-Version': version
)
}
}