-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
58 lines (48 loc) · 1.41 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
// Copyright 2024 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
plugins {
id 'java-library'
}
group 'io.github.benjaminamos.TracyJavaBindings'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
sourceSets {
main
}
tasks.withType(Jar).configureEach {
def sharedLibraryTasks = project('tracy-jni').tasks.withType(LinkSharedLibrary)
dependsOn sharedLibraryTasks
def sharedLibraryOutputs = sharedLibraryTasks.find { task ->
task.name.toLowerCase().contains("release")
}.outputs.files.asFileTree.files
from(sharedLibraryOutputs) {
include("*.dll")
into("windows")
}
from(sharedLibraryOutputs) {
include("*.so")
into("linux")
}
from(sharedLibraryOutputs) {
include("*.dylib")
into("macosx")
}
from (new File(project('tracy-jni').projectDir, "tracy")) {
include("LICENSE")
rename("LICENSE", "TRACY_LICENSE")
}
}
tasks.named("test", Test) {
useJUnitPlatform()
maxHeapSize = "1G"
testLogging {
events("passed")
}
systemProperty "java.library.path", project(":tracy-jni").getLayout().getBuildDirectory().dir("lib/main/debug").get().asFile.absolutePath
}