-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle
73 lines (58 loc) · 1.62 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
buildscript {
ext.kotlin_version = '1.2.30'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
group 'info.p2sh.clightning'
version '0.1.1-SNAPSHOT'
apply plugin: 'kotlin'
repositories {
mavenCentral()
jcenter()
}
configurations {
ktlint
}
task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
main = "com.github.shyiko.ktlint.Main"
classpath = configurations.ktlint
args "src/**/*.kt"
}
check.dependsOn ktlint
task ktlintFormat(type: JavaExec, group: "formatting") {
description = "Fix Kotlin code style deviations."
main = "com.github.shyiko.ktlint.Main"
classpath = configurations.ktlint
args "-F", "src/**/*.kt"
}
dependencies {
ktlint "com.github.shyiko:ktlint:0.11.1"
compile "com.beust:jcommander:1.71"
compile "io.undertow:undertow-core:1.4.22.Final"
compile "com.github.jnr:jnr-unixsocket:0.18"
compile "com.google.code.gson:gson:2.8.2"
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
jar {
manifest {
attributes(
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Main-Class': 'info.p2sh.clightning.MainKt'
)
}
doFirst {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}
exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/licence/*'
}