-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
96 lines (81 loc) · 2.75 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
plugins {
// These 2 plugins were meant to deploy on Gradle Plugin Site
// id 'com.gradle.plugin-publish' version '0.10.0'
// id 'net.researchgate.release' version '2.4.0'
// The following 2 plugins are for deployment on Bintray
id 'net.researchgate.release' version '2.7.0'
id 'com.jfrog.bintray' version '1.8.4'
id 'java-gradle-plugin'
id 'groovy'
id 'maven'
id 'jacoco'
}
apply from: "${rootDir}/gradle/publishing.gradle"
group 'org.testeditor'
sourceCompatibility = '1.10'
targetCompatibility = '1.10'
repositories {
jcenter()
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
compile 'org.xtext:xtext-gradle-plugin:2.0.1'
// necessary for publishing using java 9,10 and probably 11, since some packages have been removed from standard runtime
compile 'javax.activation:activation:1.1.1'
compile 'javax.annotation:javax.annotation-api:1.3.2'
compile 'javax.xml.bind:jaxb-api:2.3.0'
testCompile 'junit:junit:4.12'
testCompile 'org.apache.commons:commons-lang3:3.4'
testCompile 'com.netflix.nebula:nebula-test:7.1.0'
testCompile('org.spockframework:spock-core:1.1-groovy-2.4') {
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
check.dependsOn jacocoTestReport
release {
preTagCommitMessage = '[release] pre tag commit: '
tagCommitMessage = '[release] creating tag: '
newVersionCommitMessage = '[release] new version commit: '
tagTemplate = 'v${version}'
}
/* This bundle is for deployment on Gradle Plugin Site
pluginBundle {
website = 'https://github.com/test-editor/test-editor-gradle-plugin'
vcsUrl = 'https://github.com/test-editor/test-editor-gradle-plugin'
description = 'A gradle plugin that compiles Testeditor tests.'
tags = ['testeditor', 'test', 'testing']
plugins {
testeditorPlugin {
id = 'org.testeditor.gradle-plugin'
displayName = 'Test-Editor Gradle plugin'
}
}
mavenCoordinates {
groupId = 'org.testeditor'
artifactId = 'gradle-plugin'
}
}
*/
task updateReadmeVersion << {
def versionPattern = /\d+.\d+(.\d+)?/
def encoding = 'UTF-8'
File file = new File("README.md")
String text = file.getText(encoding)
text = text.replaceAll("gradle-plugin' version '${versionPattern}'", "gradle-plugin' version '${project.version}'")
file.setText(text, encoding)
}
updateReadmeVersion.shouldRunAfter tasks.getByName('confirmReleaseVersion')
tasks.getByName('preTagCommit').dependsOn updateReadmeVersion