-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
63 lines (48 loc) · 1.73 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
apply plugin: 'pl.allegro.tech.build.axion-release'
project.version = scmVersion.version
project.ext.set("glueVersion", "1.1.71")
repositories {
mavenLocal()
}
configurations {
gluetoolsCore
}
dependencies {
gluetoolsCore group: 'cvr.ac.uk', name: 'gluetools-core', version: project.glueVersion, transitive: false
}
buildscript {
repositories {
// for axion-release
mavenCentral()
}
dependencies {
classpath group: 'pl.allegro.tech.build', name: 'axion-release-plugin', version: '1.9.3'
}
}
def scmCustomKey = System.getProperty("user.name").equals('joshsinger') ? '/Users/joshsinger/.ssh/github_id_rsa' : '/opt/bitnami/apps/jenkins/jenkins_home/.ssh/github_id_rsa'
scmVersion {
hooks {
pre 'fileUpdate', [file: 'glue/phdrAddProjectExtension.glue', pattern: {v, c -> /set extension-setting phdr extension-version $v/}, replacement: {v, c -> "set extension-setting phdr extension-version $v"}]
pre 'commit', {v, p -> "Release version $v"}
}
scmVersion {
versionCreator 'versionWithBranch'
repository {
customKey = file(scmCustomKey)
}
tag {
prefix = 'PHE-HCV-DRUG-RESISTANCE'
}
}
}
def glueConfigFile = System.getProperty("user.name").equals('joshsinger') ? 'local-gluetools-config.xml' : 'remote-gluetools-config.xml'
task copyGluetoolsJar(type: Copy) {
from configurations.gluetoolsCore
into "$buildDir/runtimeJars"
rename('gluetools-core-'+project.glueVersion+'.jar', 'gluetools-core.jar')
}
task buildPhdrExtension(type: JavaExec, dependsOn: 'copyGluetoolsJar') {
classpath "build/runtimeJars/gluetools-core.jar"
main 'uk.ac.gla.cvr.gluetools.core.console.Console'
args '-c', glueConfigFile, '-i', 'run', 'file', 'phdrExtension.glue'
}