This repository has been archived by the owner on Nov 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
94 lines (72 loc) · 2.47 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'
id 'eclipse'
id 'jacoco'
id 'checkstyle'
id 'org.starchartlabs.flare.dependency-constraints' version '1.0.0'
id 'org.starchartlabs.flare.increased-test-logging' version '1.0.0'
id 'org.starchartlabs.flare.source-jars' version '1.0.0'
id 'it.gianluz.capsule' version '1.0.3'
}
description = 'Command line interface for managing encrypted credential files'
dependencyConstraints {
file file("${rootDir}/dependencies.properties")
}
//Always download sources, to allow debugging, and use Eclipse containers for greater portability
eclipse {
classpath {
downloadSources=true
}
}
//Need to exclude the real logger from test runs, so use a special configuration to side-step its inclusion in test runs
configurations {
capsuleRuntime{
extendsFrom runtime
}
}
repositories { mavenCentral() }
dependencies {
compileOnly 'com.google.code.findbugs:jsr305'
compile 'com.google.code.gson:gson'
compile 'com.squareup.okhttp3:okhttp'
compile 'commons-codec:commons-codec'
compile 'info.picocli:picocli'
compile 'org.slf4j:slf4j-api'
compile 'org.starchartlabs.alloy:alloy-core'
capsuleRuntime 'org.slf4j:slf4j-simple'
testCompile 'com.squareup.okhttp3:mockwebserver'
testCompile 'org.testng:testng'
testCompile 'uk.org.lidalia:slf4j-test'
}
//Setup default test behavior, including failure logging
test {
useTestNG() { useDefaultListeners = true }
}
checkstyle {
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
configProperties = [ 'checkstyle.config.dir' : rootProject.file('config/checkstyle') ]
toolVersion = '8.29'
}
task checkstyleAll{}
tasks.withType(Checkstyle).all { checkstyleTask -> checkstyleAll.dependsOn checkstyleTask }
check.dependsOn checkstyleAll
//Apply module naming to all projects
//Add LICENSE so it is included in all JARs, as well as dependent licenses, fulfilling the "distributions include license" requirement
jar {
from("${rootDir}"){ include 'LICENSE' }
}
//All projects should provide source code and javadoc, and upload these with any released artifacts
sourcesJar {
from("${rootDir}"){ include 'LICENSE' }
}
javadocJar{
from("${rootDir}"){ include 'LICENSE' }
}
task distCapsule(type: FatCapsule) {
applicationClass 'org.starchartlabs.lure.CommandLineInterface'
embedConfiguration configurations.capsuleRuntime
}
tasks.assemble.dependsOn distCapsule
artifacts {
archives distCapsule
}