-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
170 lines (147 loc) · 4.64 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'pl.allegro.tech.build.axion-release' version '1.3.4'
id "com.jfrog.bintray" version "1.6"
id 'com.github.johnrengelman.shadow' version '1.2.3'
id 'groovy'
}
allprojects {
apply plugin: 'groovy'
group = 'com.ceilfors.groovy'
repositories {
jcenter()
}
configurations {
provided
}
sourceSets {
main {
compileClasspath += configurations.provided
test.compileClasspath += configurations.provided
test.runtimeClasspath += configurations.provided
}
}
dependencies {
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
testCompile 'cglib:cglib-nodep:3.2.1'
testCompile 'junit:junit:4.12'
}
scmVersion {
tag {
prefix = ''
}
}
project.version = scmVersion.version
processResources {
filter ReplaceTokens, tokens: [
"version": project.property("version"),
"name": project.property("name"),
]
}
task wrapper(type: Wrapper) {
gradleVersion = '2.10'
}
}
subprojects {
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.4.5'
}
}
apply plugin: 'maven-publish'
apply plugin: 'codenarc'
apply plugin: 'idea'
codenarc {
configFile = file('config/codenarc/rules.groovy')
toolVersion = '0.25.1'
}
codenarcTest {
configFile = file('config/codenarc/rulesTest.groovy')
}
dependencies {
provided 'org.codehaus.groovy:groovy-all:2.4.5'
compile 'com.github.yihtserns:groovy-decorator:0.0.4'
compile 'org.fusesource.jansi:jansi:1.11'
testCompile project(':spock-helper')
}
test {
systemProperty 'line.separator', '\n'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
publishing {
publications {
mavenCentral(MavenPublication) {
from components.java
groupId 'com.ceilfors.groovy'
artifactId 'gq'
version project.version
artifact shadowJar
artifact sourcesJar
artifact javadocJar
pom.withXml {
asNode().children().last() + {
// From http://mike-neck.github.io/blog/2013/06/21/how-to-publish-artifacts-with-gradle-maven-publish-plugin-version-1-dot-6/
resolveStrategy = Closure.DELEGATE_FIRST
name 'gq'
description 'Quick and dirty debugging output for Groovy tired programmers.'
url 'https://github.com/ceilfors/gq'
scm {
url 'git@github.com:ceilfors/gq.git'
connection 'scm:git:git@github.com:ceilfors/gq.git'
developerConnection 'scm:git:git@github.com:ceilfors/gq.git'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/license/LICENSE-2.0.txt'
distribution 'repo'
}
}
developers {
developer {
id 'ceilfors'
name 'Wisen Tanasa'
email 'wisen@ceilfors.com'
}
}
}
}
}
}
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
publications = ['mavenCentral']
publish = true
pkg {
repo = 'maven'
name = 'gq'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/ceilfors/gq.git'
version {
name = project.version
gpg {
sign = true
passphrase = project.hasProperty('gpgPassphrase') ? project.property('gpgPassphrase') : System.getenv('GPG_PASSPHRASE')
}
mavenCentralSync {
sync = true
user = 'ceilfors'
password = project.hasProperty('mavenCentralPassword') ? project.property('mavenCentralPassword') : System.getenv('MAVEN_CENTRAL_PASSWORD')
}
}
}
}
idea{
module {
downloadJavadoc = true
downloadSources = true
}
}