-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
49 lines (38 loc) · 1.16 KB
/
Copy pathbuild.gradle
File metadata and controls
49 lines (38 loc) · 1.16 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
import java.nio.file.Files
import java.nio.file.StandardCopyOption
plugins {
id 'java'
id 'java-library'
}
allprojects {
group = 'zyklone'
version = '1.0.0'
repositories {
mavenCentral()
}
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
api project(":api")
// Logging
compileOnly libs.log4j.core
compileOnly libs.log4j.slf4j2
}
test {
useJUnitPlatform()
}
task copyDepsToDist(type: Copy) {
from configurations.compileClasspath.filter { it.getName().endsWith(".jar") }
into "dist"
}
task dist(group: "build") {
dependsOn ":api:build"
dependsOn ":build"
dependsOn ":copyDepsToDist"
doLast {
def output = rootProject.projectDir.toPath().resolve("dist")
Files.copy(rootProject.projectDir.toPath().resolve("build/libs/red4j-${project.version}.jar"), output.resolve("red4j.jar"), StandardCopyOption.REPLACE_EXISTING)
Files.copy(project(":api").projectDir.toPath().resolve("build/libs/api-${project.version}.jar"), output.resolve("red4j-api.jar"), StandardCopyOption.REPLACE_EXISTING)
}
}