-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle
94 lines (85 loc) · 2.44 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
plugins {
id 'java-library'
id 'eclipse'
}
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
description = 'Nifty Modbus: Shell'
archivesBaseName = 'nifty-modbus-shell'
dependencies {
implementation project(':nifty-modbus-api')
implementation project(':nifty-modbus-core');
implementation project(':nifty-modbus-rtu');
implementation project(':nifty-modbus-rtu-jsc');
implementation project(':nifty-modbus-rtu-pjc');
implementation project(':nifty-modbus-tcp');
implementation "org.slf4j:slf4j-api:${slf4jVersion}"
implementation "io.netty:netty-codec:${nettyVersion}"
implementation "com.fazecast:jSerialComm:${jscVersion}";
implementation "net.solarnetwork.external:net.solarnetwork.external.pjc:${pjcVersion}"
implementation "ch.qos.logback:logback-classic:${logbackClassicVersion}"
}
jar.manifest {
attributes('Implementation-Version': version)
}
eclipse {
jdt {
javaRuntimeName 'JavaSE-1.8'
}
}
// to run ModbusShell, run like
// ../gradlew -q --console=plain runWithJavaExec --args='--device /dev/ttyUSB0 --baud 4800 --bits 8N1'
task runWithJavaExec(type: JavaExec) {
group = "Execution"
description = "Run the ModbusShell"
classpath = sourceSets.test.runtimeClasspath
mainClass = 'net.solarnetwork.io.modbus.shell.ModbusShell'
standardInput = System.in
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = project.description
description = 'Nifty Modbus interactive command-line shell application.'
url = 'https://github.com/SolarNetwork/nifty-modbus/shell'
licenses {
license {
name = 'GNU General Public License, Version 2.0'
url = 'https://opensource.org/licenses/GPL-2.0'
}
}
developers {
developer {
id = 'msqr'
name = 'Matt Magoffin'
email = '[email protected]'
organization = 'SolarNetwork Foundation'
organizationUrl = 'https://solarnetwork.org.nz'
}
}
scm {
connection = 'scm:git:https://github.com/SolarNetwork/nifty-modbus.git'
developerConnection = 'scm:git:[email protected]:SolarNetwork/nifty-modbus.git'
url = 'https://github.com/SolarNetwork/nifty-modbus'
}
}
}
}
repositories {
maven {
name = "OSSRH"
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
credentials {
username = ossrhUsername
password = ossrhPassword
}
}
}
}
signing {
useGpgCmd()
sign publishing.publications.mavenJava
}