-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
65 lines (53 loc) · 1.8 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
apply plugin: 'application'
sourceCompatibility = 1.8
mainClassName = 'se.commit.train.TrainDriver'
repositories {
mavenCentral()
maven {
url "https://repo.eclipse.org/content/groups/releases/"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'org.eclipse.jgit:org.eclipse.jgit:4.11.0.201803080745-r'
compile 'org.eclipse.jgit:org.eclipse.jgit.archive:4.11.0.201803080745-r'
compile 'commons-io:commons-io:2.6'
compile 'org.slf4j:slf4j-simple:1.7.25'
// optional dependency of commons-compress which is needed by JGit
compile 'org.tukaani:xz:1.8'
testCompile 'junit:junit:4.12'
}
task wrapper(type: Wrapper) {
gradleVersion = '5.0'
}
run {
if (project.hasProperty("appArgs")) {
args Eval.me(appArgs)
}
}
jar {
from {
configurations.compile.collect {
it.isDirectory() ? it : zipTree(it)
}
configurations.runtime.collect {
it.isDirectory() ? it : zipTree(it)
}
}
manifest {
attributes 'Implementation-Title': 'ndeploy',
'Implementation-Version': '0.1.0',
'Built-By': System.getProperty('user.name'),
'Built-Date': new Date(),
'Built-JDK': System.getProperty('java.version'),
'Main-Class': 'se.commit.train.TrainDriver'
}
}
task adjustWrapperPropertiesFile << {
ant.replaceregexp(match:'^#.*', replace:'', flags:'g', byline:true) {
fileset(dir: project.projectDir, includes: 'gradle/wrapper/gradle-wrapper.properties')
}
new File(project.projectDir, 'gradle/wrapper/gradle-wrapper.properties').with { it.text = it.readLines().findAll { it }.sort().join('\n') }
ant.fixcrlf(file: 'gradle/wrapper/gradle-wrapper.properties', eol: 'lf')
}
wrapper.finalizedBy adjustWrapperPropertiesFile