forked from Praqma/2git
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
89 lines (71 loc) · 2.24 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
// --------------------
// plugins
// --------------------
plugins {
id 'com.palantir.git-version' version '0.8.0'
id 'co.riiid.gradle' version '0.4.2'
id 'codenarc'
}
apply plugin: 'groovy'
apply plugin: 'application'
apply plugin: 'maven-publish'
// --------------------
// dependencies
// --------------------
repositories {
jcenter()
maven {
url 'https://repo.jenkins-ci.org/public/'
}
}
dependencies {
// COOL
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "net.praqma:praqmajutils:1.0.0"
// Other
compile 'org.slf4j:slf4j-api:1.7.25'
compile 'org.codehaus.groovy:groovy-all:2.4.12'
compile 'org.jfrog.artifactory.client:artifactory-java-client-services:1.2.2'
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
}
// --------------------
// project configuration
// --------------------
project.group = 'com.praqma'
project.version = gitVersion()
project.description = 'Migration engine used to migrate from an arbitrary VCS to git'
// --------------------
// application plugin
// --------------------
project.mainClassName = 'togit.Run'
startScripts {
doLast {
// The start scripts can't handle a project name starting with a number.
// They'd contain use of a parameter called '$2GIT_OPTS', in which the '$2' was problematic.
unixScript.text = unixScript.text.replaceAll('2GIT_OPTS', 'TOGIT_OPTS')
windowsScript.text = windowsScript.text.replaceAll('2GIT_OPTS', 'TOGIT_OPTS')
}
}
// --------------------
// github plugin
// --------------------
github {
owner = 'Praqma'
repo = '2git'
token = project.hasProperty("GITHUB_TOKEN") ? "$GITHUB_TOKEN" : "No token provided"
tagName = gitVersion()
name = gitVersion()
assets = [
"build/distributions/2git-${gitVersion()}.zip",
"build/distributions/2git-${gitVersion()}.tar"
]
targetCommitish = 'master'
}
githubRelease.group = "Publishing"
githubRelease.description = "Creates a release on GitHub"
// --------------------
// codenarc
// --------------------
boolean runCodenarc = project.findProperty('CODENARC') == "true"
codenarcMain.onlyIf { runCodenarc }
codenarcTest.onlyIf { runCodenarc }