-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
128 lines (111 loc) · 2.98 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
id 'java-library'
id 'maven-publish'
// id 'signing'
}
java {
sourceCompatibility = 11
targetCompatibility = 11
withJavadocJar()
withSourcesJar()
}
group 'io.sisu'
// Given the versioning pattern x.x.x-y-z, the plan is x.x.x follows the
// expected version of nng supported. The y is the major release of this
// library against that version and z is the patch release of the major.
// Yes, it's a bit ugly, but it follows some conventions blessed by
// Oracle:
// https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN8904
version '1.8.0-0-SNAPSHOT'
publishing {
publications {
nngJava(MavenPublication) {
from components.java
}
}
}
repositories {
mavenCentral()
maven {
name = "GithubPackages"
url = "https://maven.pkg.github.com/voutilad/nng-java"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
dependencies {
implementation 'net.java.dev.jna:jna:5.14.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
test {
useJUnitPlatform()
}
task getVersion {
System.out.println("${project.version}")
}
/*
signing {
sign configurations.archives
}
*/
project(':benchmarks') {
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java'
java {
sourceCompatibility = 11
targetCompatibility = 11
}
group = 'io.sisu.nng'
version = parent.version
repositories {
mavenCentral()
}
dependencies {
implementation rootProject
implementation 'net.java.dev.jna:jna:5.14.0'
}
jar {
manifest {
attributes 'Description': 'Some (contrived) benchmarks of NNG-Java'
}
}
}
project(':demo') {
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java'
java {
sourceCompatibility = 11
targetCompatibility = 11
}
group = 'io.sisu.nng'
version = parent.version
repositories {
mavenCentral()
}
dependencies {
implementation rootProject
}
jar {
manifest {
attributes 'Description': 'Some demonstrations of NNG-Java'
}
}
task runDemoAsyncServer(type: JavaExec) {
group = "Execution"
description = "Run the Async Server demo"
classpath = sourceSets.main.runtimeClasspath
mainClass = $/io.sisu.nng.demo.async.Server/$
environment "JNA_LIBRARY_PATH", System.getenv("JNA_LIBRARY_PATH")
}
task runDemoAsyncClient(type: JavaExec) {
group = "Execution"
description = "Run the Async Client demo"
classpath = sourceSets.main.runtimeClasspath
mainClass = $/io.sisu.nng.demo.async.Client/$
environment "JNA_LIBRARY_PATH", System.getenv("JNA_LIBRARY_PATH")
}
}