-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
72 lines (59 loc) · 1.36 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
plugins {
id "com.jfrog.bintray" version "1.8.0"
}
apply plugin: 'java'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
group = 'com.github.pcdv.jocket'
version = "${jocket_version}"
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.+'
}
task jni(type: Exec) {
workingDir 'src/main/c'
executable 'make'
}
jni.dependsOn compileJava
import org.gradle.internal.os.OperatingSystem
if (OperatingSystem.current().isLinux()) {
test.dependsOn jni
jar.dependsOn jni
} else
println("Disabling JNI build because OS is not UNIX")
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['MyPublication']
publish = true
pkg {
repo = 'maven'
name = 'jocket'
userOrg = System.getenv('BINTRAY_USER')
licenses = ['MIT']
vcsUrl = 'https://github.com/pcdv/jocket.git'
version {
name = "${jocket_version}"
desc = "Experimental shared memory socket ${jocket_version}"
released = new Date()
}
}
}
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
groupId 'com.github.pcdv.jocket'
artifactId 'jocket'
version "${version}"
artifact sourceJar {
classifier "sources"
}
}
}
}
task sourceJar(type: Jar) {
from sourceSets.main.allJava
}