-
Notifications
You must be signed in to change notification settings - Fork 35
/
build.gradle
76 lines (64 loc) · 1.57 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
plugins {
id "java-library"
id "maven-publish"
id "com.jfrog.bintray" version "1.8.5"
}
group = "ai.serenade"
version = "1.1.1"
repositories {
mavenLocal()
mavenCentral()
}
task buildSharedObject {
inputs.file "lib/ai_serenade_treesitter_Languages.cc"
inputs.file "lib/ai_serenade_treesitter_Languages.h"
inputs.file "lib/ai_serenade_treesitter_TreeSitter.cc"
inputs.file "lib/ai_serenade_treesitter_TreeSitter.h"
outputs.file "libjava-tree-sitter.so"
doLast {
exec {
commandLine "./build.py", "libjava-tree-sitter", "src/test/tree-sitter-python"
}
}
}
clean {
delete "libjava-tree-sitter.so"
}
compileJava {
options.compilerArgs += ["-h", "${project.projectDir.toString()}/lib"]
}
compileTestJava {
dependsOn buildSharedObject
}
dependencies {
testImplementation "org.junit.jupiter:junit-jupiter:5.6.2"
}
publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
}
bintray {
user = System.getenv("BINTRAY_USER")
key = System.getenv("BINTRAY_KEY")
publications = ['maven']
pkg {
repo = "maven"
name = "java-tree-sitter"
userOrg = "serenadeai"
licenses = ["MIT"]
vcsUrl = "https://github.com/serenadeai/java-tree-sitter"
version {
name = project.getVersion()
}
}
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
environment "JAVA_TREE_SITTER", "${project.projectDir.toString()}/libjava-tree-sitter.so"
}