forked from owagner/hm2mqtt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
57 lines (48 loc) · 1.29 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
version = '0.19'
apply plugin: 'java'
apply plugin: 'eclipse'
sourceCompatibility = 1.7
targetCompatibility = 1.7
[ compileJava, compileTestJava ]*.options*.encoding = 'UTF-8'
repositories {
mavenCentral()
maven {
url 'https://repo.eclipse.org/content/repositories/paho-releases/'
}
}
dependencies {
compile 'com.eclipsesource.minimal-json:minimal-json:0.9.4'
compile 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.2'
}
task listJars << {
configurations.compile.each { File file -> println file.name }
}
jar {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } { exclude "META-INF/**" }
archiveName 'hm2mqtt.jar'
manifest {
attributes 'Main-Class': 'com.tellerulam.hm2mqtt.Main',
'Implementation-Title': 'hm2mqtt Homematic to MQTT bridge',
'Implementation-Version': version
}
}
task addon(dependsOn: 'jar', type: Tar) {
compression = Compression.GZIP
archiveName 'hm2mqtt-addon.tar.gz'
into('addon') {
from 'hm2mqtt-addon/addon', 'build/libs/hm2mqtt.jar'
}
into('rc.d') {
from 'hm2mqtt-addon/rc.d'
}
into('') {
from 'hm2mqtt-addon/update_script', 'hm2mqtt-addon/hm2mqtt_addon.cfg', 'hm2mqtt-addon/VERSION'
}
}
uploadArchives {
repositories {
flatDir {
dirs 'build'
}
}
}