-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
82 lines (59 loc) · 2 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
apply plugin: 'pl.allegro.tech.build.axion-release'
project.ext.set("glueVersion", "1.1.108")
project.version = scmVersion.version
repositories {
mavenLocal()
}
configurations {
gluetoolsCore
}
dependencies {
gluetoolsCore group: 'cvr.ac.uk', name: 'gluetools-core', version: project.glueVersion, transitive: false
}
buildscript {
repositories {
// for ssh-deploy stuff
jcenter()
// for axion-release
mavenCentral()
}
dependencies {
classpath group: 'commons-io', name: 'commons-io', version: '1.3.2'
classpath group: 'pl.allegro.tech.build', name: 'axion-release-plugin', version: '1.9.3'
classpath group: 'org.ajoberstar', name: 'gradle-git', version: '1.7.2'
}
}
task copyGluetoolsJar(type: Copy) {
from configurations.gluetoolsCore
into "$buildDir/runtimeJars"
rename('gluetools-core-'+project.glueVersion+'.jar', 'gluetools-core.jar')
}
def glueConfigFile = 'remote-gluetools-config.xml'
task ncbiHcvUpdate(type: JavaExec, dependsOn: 'copyGluetoolsJar') {
classpath "build/runtimeJars/gluetools-core.jar"
main 'uk.ac.gla.cvr.gluetools.core.console.Console'
jvmArgs '-Xmx10000m'
args '-c', glueConfigFile, '-i', 'run', 'file', 'ncbiHcvUpdate.glue'
}
task ncbiHcvProjectBuild(type: JavaExec, dependsOn: 'copyGluetoolsJar') {
classpath "build/runtimeJars/gluetools-core.jar"
main 'uk.ac.gla.cvr.gluetools.core.console.Console'
jvmArgs '-Xmx10000m'
args '-c', glueConfigFile, '-i', 'run', 'file', 'ncbiHcvProjectBuild.glue'
}
def scmCustomKey = '/Users/imacadmin/.ssh/github_id_rsa'
scmVersion {
hooks {
pre 'fileUpdate', [file: 'glue/ncbiHcvExtensionSettings.glue', pattern: {v, c -> /set extension-setting ncbi_hcv extension-version $v/}, replacement: {v, c -> "set extension-setting ncbi_hcv extension-version $v"}]
pre 'commit', {v, p -> "Release version $v"}
}
scmVersion {
versionCreator 'versionWithBranch'
repository {
customKey = file(scmCustomKey)
}
tag {
prefix = 'NCBI-HCV-GLUE'
}
}
}