-
Notifications
You must be signed in to change notification settings - Fork 29
/
build.gradle
93 lines (78 loc) · 2.09 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.github.ben-manes:gradle-versions-plugin:0.12.0"
}
}
task wrapper(type: Wrapper) {
gradleVersion = "2.11"
}
repositories {
mavenLocal()
mavenCentral()
}
apply plugin: "idea"
apply plugin: "java"
apply plugin: "com.github.ben-manes.versions"
dependencies {
compile "org.jetbrains:annotations:15.0"
compile "org.eclipse.jgit:org.eclipse.jgit:4.5.0.201609210915-r"
compile "org.mapdb:mapdb:3.0.2"
compile "org.slf4j:slf4j-simple:1.7.21"
compile "com.beust:jcommander:1.58"
compile "ru.bozaro.gitlfs:gitlfs-pointer:0.11.0"
compile "ru.bozaro.gitlfs:gitlfs-client:0.11.0"
testCompile "com.google.jimfs:jimfs:1.1"
testCompile "org.testng:testng:6.9.13.6"
}
sourceCompatibility = JavaVersion.VERSION_1_8
idea {
project {
jdkName = sourceCompatibility.name
languageLevel = sourceCompatibility.name
}
module {
jdkName = sourceCompatibility.name
downloadJavadoc = true
downloadSources = true
}
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
test {
useTestNG()
maxHeapSize = "384m"
ignoreFailures = "$testIgnoreFailures".toBoolean()
}
jar {
manifest {
attributes(
"Main-Class": "git.lfs.migrate.Main",
"Class-Path": "${-> createLauncherClassPath()}"
)
}
}
task deployJars(dependsOn: jar) << {
def projectArtifacts = configurations.archives.artifacts*.file
def fullArtifacts = configurations.archives.artifacts*.file + configurations.runtime.files
copy {
from fullArtifacts.intersect(projectArtifacts)
into "${project.buildDir}/deploy"
}
copy {
from fullArtifacts.minus(projectArtifacts)
into "${project.buildDir}/deploy/vendors"
}
}
task deployZip(type: Zip, dependsOn: deployJars) {
from "build/deploy"
}
def createLauncherClassPath() {
def projectArtifacts = configurations.archives.artifacts*.file
def fullArtifacts = configurations.archives.artifacts*.file + configurations.runtime.files
def vendorJars = fullArtifacts.minus(projectArtifacts).collect { "vendors/${it.name}" }
return vendorJars.join(" ")
}