-
-
Notifications
You must be signed in to change notification settings - Fork 142
Expand file tree
/
Copy pathbuild.gradle
More file actions
60 lines (49 loc) · 1.33 KB
/
build.gradle
File metadata and controls
60 lines (49 loc) · 1.33 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
import org.apache.tools.ant.filters.ReplaceTokens
import tool.generator.GenerateLibs
import tool.generator.api.task.GenerateApi
plugins {
id 'java'
id 'maven-publish'
id 'signing'
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:6.0.3")
testImplementation("org.junit.jupiter:junit-jupiter-engine:6.0.3")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
test {
useJUnitPlatform()
}
compileJava {
// By default we do not generate API, since we believe this should be done on purpose.
if (System.getProperty('build.debug.generate.api.enable')) {
dependsOn 'generateApi'
}
}
sourceSets {
main.java.srcDirs = ['src/generated/java']
raw.java.srcDirs = ['src/main/java']
}
tasks.register('generateApi', GenerateApi)
tasks.register('generateLibs', GenerateLibs) {
it.dependsOn assemble
}
apply from: "$rootDir/publish.gradle"
configurePublishing('imgui-java-binding', 'JNI based binding for Dear ImGui', project.version)
jar {
manifest {
attributes 'Automatic-Module-Name': 'imgui.binding'
}
}
processResources {
filesMatching('**/imgui-java.properties') {
filter(ReplaceTokens, tokens: [
'version': version
])
}
}