-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
59 lines (48 loc) · 1.46 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
import groovy.json.JsonSlurper
apply plugin: 'application'
apply plugin: 'java-library'
group 'org.iot.dsa'
mainClassName = 'org.iot.dsa.dslink.DSLink'
sourceCompatibility = 1.8
targetCompatibility = 1.8
build {
def inputFile = file('dslink.json')
def json = new JsonSlurper().parseText(inputFile.text)
version = json.version
}
repositories {
//mavenLocal()
jcenter()
maven {
url 'https://jitpack.io'
}
}
dependencies {
//implementation 'org.iot-dsa:dslink-v2-websocket:+' //for a locally installed sdk
implementation 'com.github.iot-dsa-v2.sdk-dslink-java-v2:dslink-v2-websocket:+'
implementation 'com.github.iot-dsa-v2:sdk-dslink-java-v2:+'
testImplementation group: 'org.python', name: 'jython-standalone', version: '2.7.0'
testImplementation 'com.github.bkromhout:java-diff-utils:+'
testImplementation 'org.apache.commons:commons-lang3:3.4'
testImplementation 'junit:junit:+'
}
applicationDistribution.from(new File(project.projectDir, "/dslink.json"))
run {
args System.getProperty("exec.args", "").split()
workingDir project.buildDir
}
task sourcesJar(group: 'build', type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allJava+sourceSets.test.allJava
}
task testJar(group: 'build', type: Jar, dependsOn: classes) {
classifier = 'tests'
from sourceSets.test.output
}
artifacts {
archives sourcesJar
archives testJar
}
wrapper {
gradleVersion = '4.10.2'
}