forked from nash-io/openlimits-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
55 lines (44 loc) · 1.16 KB
/
build.gradle
File metadata and controls
55 lines (44 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
50
51
52
53
54
55
plugins {
id 'java-library'
id 'maven-publish'
}
group 'com.tuned'
version '0.1.4.3-SNAPSHOT'
repositories {
mavenCentral()
}
task buildNativeDeps {
exec {
workingDir "src/main/openlimits-lib"
commandLine 'cargo', 'build', '--release'
}
}
task copyNativeDeps {
copy {
from "${projectDir}/src/main/openlimits-lib/target/release"
include "libopenlimits_java.*"
into 'build/libs'
}
}
build.finalizedBy(buildNativeDeps)
build.finalizedBy(copyNativeDeps)
tasks.withType(Test) {
environment("BINANCE_API_KEY", System.getenv('BINANCE_API_KEY'))
environment("BINANCE_API_SECRET", System.getenv('BINANCE_API_SECRET'))
environment("NASH_API_SECRET", System.getenv('NASH_API_SECRET'))
environment("NASH_API_KEY", System.getenv('NASH_API_KEY'))
systemProperty "java.library.path", "build/libs"
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = group
artifactId = rootProject.name
version = version
from components.java
}
}
}