This repository has been archived by the owner on May 29, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild.gradle
68 lines (53 loc) · 1.87 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
apply plugin: 'eclipse'
apply plugin: 'application'
mainClassName = "com.sourcegraph.javagraph.Main"
version = '0.0.1-SNAPSHOT'
group = 'com.sourcegraph'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
maven { url 'http://repo.gradle.org/gradle/libs-releases-local' }
}
dependencies {
testCompile 'junit:junit:4.10'
compile 'com.google.code.gson:gson:2.3'
compile 'org.apache.commons:commons-lang3:3.3.2'
compile 'commons-codec:commons-codec:1.10'
compile 'org.apache.solr:solr-solrj:5.4.1'
compile 'com.beust:jcommander:1.30'
compile 'org.apache.maven:maven-core:3.2.3'
compile 'org.apache.maven:maven-model:3.2.3'
compile 'commons-io:commons-io:2.4'
compile 'org.eclipse.aether:aether-api:0.9.0.M4'
compile 'org.eclipse.aether:aether-impl:0.9.0.M4'
compile 'org.eclipse.aether:aether-spi:0.9.0.M4'
compile 'org.eclipse.aether:aether-util:0.9.0.M4'
compile 'org.eclipse.aether:aether-transport-http:0.9.0.M4'
compile 'org.eclipse.aether:aether-connector-basic:0.9.0.M4'
compile 'org.eclipse.aether:aether-transport-file:0.9.0.M4'
compile 'org.apache.ant:ant:1.9.6'
compile 'com.google.guava:guava:18.0'
compile 'org.json:json:20160212'
compile 'org.slf4j:slf4j-api:1.7.12'
runtime 'org.slf4j:slf4j-log4j12:1.7.12'
testRuntime 'org.slf4j:slf4j-log4j12:1.7.12'
compile files("${System.properties['java.home']}/../lib/tools.jar")
}
jar {
def gitRef = "sh -c 'git rev-parse --short HEAD || git ls-remote https://github.com/sourcegraph/srclib-java master | awk \"{ print \\\$1 }\" || echo snapshot'".execute().text.trim()
manifest {
attributes "Main-Class" : mainClassName
attributes "Javagraph-Version" : gitRef
}
dependsOn configurations.runtime
// TODO I don't fully understand this.
from {
configurations.runtime.collect {
it.isDirectory() ? it : zipTree(it)
}
} {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
}