-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
75 lines (60 loc) · 1.76 KB
/
build.gradle
File metadata and controls
75 lines (60 loc) · 1.76 KB
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
group 'uk.gov.notifications'
version '1.0-SNAPSHOT'
import org.apache.tools.ant.filters.ReplaceTokens
def versionFile = 'src/main/java/uk/gov/notifications/client/Version.java'
def tempDir = 'build/tmp/sourcesCache'
def versionFileName = 'Version.java'
task wrapper(type: Wrapper) {
gradleVersion = '2.2'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'application'
mainClassName = "uk.gov.notifications.cli.GovNotifyCli"
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
}
}
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
mavenCentral()
}
compileJava.doFirst {
copy {
from(versionFile)
into(tempDir)
}
ant.replace(file: versionFile, token: '@VERSION@', value: version)
}
compileJava.doLast {
copy {
from(tempDir + '/' + versionFileName)
into(project.file(versionFile).parent)
}
}
dependencies {
compile 'org.bitbucket.b_c:jose4j:0.4.4'
compile 'net.sourceforge.argparse4j:argparse4j:0.7.0'
compile 'org.json:json:20160212'
compile 'commons-validator:commons-validator:1.5.0'
compile 'org.apache.httpcomponents:httpclient:4.5.2'
compile 'org.slf4j:slf4j-nop:1.7.19'
compile 'commons-codec:commons-codec:1.10'
testCompile 'cglib:cglib:3.2.1'
testCompile 'org.mockito:mockito-all:1.10.19'
testCompile 'junit:junit:4.12'
testCompile 'commons-io:commons-io:2.4'
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
}
shadowJar {
mergeServiceFiles()
}