-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
91 lines (75 loc) · 2.89 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
plugins {
id 'org.springframework.boot' version '2.4.5'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
}
group = 'uk.ac.ebi.ena'
version = System.getenv("APP_VERSION")
sourceCompatibility = '1.8'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-mail'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'commons-net:commons-net:3.8.0'
implementation 'org.apache.commons:commons-lang3:3.4'
implementation 'org.json:json:20090211'
implementation 'com.google.guava:guava:30.1.1-jre'
implementation group: 'commons-io', name: 'commons-io', version: '2.7'
implementation group: 'me.tongfei', name: 'progressbar', version: '0.9.1'
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13'
implementation 'com.univocity:univocity-parsers:2.8.4'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.2'
testImplementation 'junit:junit:4.12'
compile group: 'org.mockito', name: 'mockito-core', version: '2.24.0'
testCompile('org.projectlombok:lombok')
testAnnotationProcessor('org.projectlombok:lombok')
}
bootRun {
// to run in Idea provide params like:
// bootRun -Pargs="--accessions=SAMD00016353,DRS000002 --format=READS_FASTQ --location=/mnt/c/data-files --protocol=FTP --asperaLocation=null --email=NONE"
if (project.hasProperty('args')) {
args project.args.split('\\s+')
}
}
bootJar {
archiveName = "${archiveBaseName.get()}.${archiveExtension.get()}"
}
test {
useJUnitPlatform()
}
// zip including runner scripts is created in build/dist. Create a new release in github and upload zip.
tasks.register('packageDistribution', Zip) {
archiveFileName = "ena-file-downloader-" + project.version + ".zip"
destinationDirectory = layout.buildDirectory.dir('dist')
from(layout.buildDirectory.dir("libs")) {
include "ena-file-downloader.jar"
}
from(layout.projectDirectory) {
include "README.md"
}
from(layout.projectDirectory.dir("distribution")) {
include "run.*"
}
}
task replaceVersion {
ant.replaceregexp(match:'version:[^->]*', replace:'version:' + version , byline:true) {
fileset(dir:project.projectDir,includes: 'README.md')
}
ant.replaceregexp(match:'version:[^->]*', replace:'version:' + version , byline:true) {
fileset(dir: 'src/main/resources', includes: 'banner.txt')
}
}
tasks.build.dependsOn(replaceVersion)
compileJava.dependsOn clean
bootJar.finalizedBy packageDistribution