This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
166 lines (140 loc) · 4.52 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
// ============================================================================
// (C) Copyright Schalk W. Cronje 2013-2015
//
// This software is licensed under the Apache License 2.0
// See http://www.apache.org/licenses/LICENSE-2.0 for license details
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
//
// ============================================================================
plugins {
id 'com.gradle.build-scan' version '1.0'
id 'groovy'
id 'maven'
id 'org.ysb33r.bintray' version '1.5'
id 'org.ysb33r.gradletest' version '1.0-beta3'
id 'com.jfrog.artifactory' version '3.1.0'
id 'com.gradle.plugin-publish' version '0.9.4'
id 'com.github.hierynomus.license' version '0.13.1'
}
group = 'org.ysb33r.gradle'
archivesBaseName = 'gnumake'
version = '1.1.1'
sourceCompatibility = 1.6
targetCompatibility = 1.6
ext {
bintrayOwner = 'ysb33r'
bintrayRepo = 'grysb33r'
moduleName = 'gnumake-gradle-plugin'
}
repositories {
jcenter()
}
dependencies {
compile gradleApi()
compile localGroovy()
testCompile ("org.spockframework:spock-core:1.0-groovy-${GroovySystem.version.replaceAll(/\.\d+$/, '')}") {
exclude module : 'groovy-all'
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar) {
description "An archive of the JavaDocs for Maven Central"
classifier "javadoc"
from javadoc
}
artifacts {
archives sourcesJar
archives javadocJar
}
jar {
manifest {
attributes 'Implementation-Title': moduleName, 'Implementation-Version': version
}
}
gradleTest {
versions '2.0','2.2','2.3','2.4','2.5','2.6','2.8','2.12','2.13'
dependsOn jar
}
artifactory {
publish {
contextUrl = 'http://oss.jfrog.org'
repository {
repoKey = 'oss-snapshot-local'
username = project.properties.bintrayUserName
password = project.properties.bintrayApiKey
}
}
}
artifactoryPublish {
onlyIf { version.endsWith("SNAPSHOT") }
}
uploadArchives {
repositories {
bintrayMavenDeployer {
username project.properties.bintrayUserName
apiKey project.properties.bintrayApiKey
repoOwner bintrayOwner
repoName bintrayRepo
packageName moduleName
description 'This is a plugin for Gradle that allows invoking GNU Make builds'
tags 'gradle','GNU','gmake','make','gnumake'
licenses 'Apache-2.0'
vcsUrl 'https://github.com/ysb33r/Gradle.git'
autoCreatePackage true
updatePackage true
versionAttributes 'gradle-plugin' : "org.ysb33r.gnumake:${group}:${archivesBaseName}"
}
}
onlyIf { !version.endsWith("SNAPSHOT") }
}
pluginBundle {
description = 'This is a plugin for Gradle that allows invoking GNU Make builds'
website = 'https://github.com/ysb33r/gnumake-gradle-plugin'
vcsUrl = 'https://github.com/ysb33r/gnumake-gradle-plugin.git'
tags = ['GNU','gmake','make','gnumake']
plugins {
gnumakePlugin {
id = 'org.ysb33r.gnumake'
displayName = 'Gradle GNU Make plugin'
}
}
mavenCoordinates {
groupId = project.group
artifactId = 'gnumake'
}
}
publishPlugins {
onlyIf { !version.endsWith("SNAPSHOT") }
}
license {
header = rootProject.file('config/HEADER')
strictCheck = true
ignoreFailures = false
mapping {
groovy ='DOUBLESLASH_STYLE'
}
ext.year = '2013-2016'
excludes(['**/*.ad', '**/*.asciidoc', '**/*.adoc', '**/*.md','**/*.properties'])
exclude '**/*CompatibilitySpec.groovy'
}
task updateReadmeWithReleaseNumber {
group 'Publication'
description 'Updates the README with the release version number'
onlyIf { !version.endsWith("SNAPSHOT") }
doLast {
File readme = file("${projectDir}/README.adoc")
readme.text = readme.text.replaceFirst(/:revnumber:\s?[\d.]+/,":revnumber: ${version}")
}
}
task release {
group 'Publication'
description 'Build, test & push publications'
onlyIf { !version.endsWith("SNAPSHOT") }
dependsOn updateReadmeWithReleaseNumber, build, publishPlugins, uploadArchives
}