-
Notifications
You must be signed in to change notification settings - Fork 221
/
build.gradle
84 lines (71 loc) · 2.59 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
import org.gradle.api.internal.classpath.ModuleRegistry
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'nu.studer:gradle-plugindev-plugin:4.1'
classpath 'org.codehaus.groovy:groovy-backports-compat23:2.4.6'
classpath 'net.researchgate:gradle-release:2.7.0'
}
}
plugins {
id 'org.gradle.java-gradle-plugin'
id 'org.gradle.groovy'
id 'maven-publish'
id 'net.researchgate.release' version '2.8.0'
id 'com.gradle.plugin-publish' version '0.18.0'
}
apply plugin: 'idea'
group='net.researchgate'
repositories {
mavenCentral()
}
dependencies {
testCompile("org.spockframework:spock-core:2.1-groovy-2.5") { exclude group: 'org.codehaus.groovy' }
testCompile "org.eclipse.jgit:org.eclipse.jgit:5.0.3.201809091024-r"
testCompile "cglib:cglib-nodep:3.2.8"
testImplementation gradleTestKit()
testImplementation("org.junit.jupiter:junit-jupiter:5.7.1")
// work-around for https://github.com/gradle/gradle/issues/16774
testRuntimeOnly(files(project.services.get(ModuleRegistry).getModule('gradle-tooling-api-builders').classpath.asFiles.first()))
testRuntimeOnly('com.google.guava:guava:27.1-android')
}
gradlePlugin {
plugins {
releasePlugin {
displayName = 'Maven style release plugin for gradle'
description = 'gradle-release is a plugin for providing a Maven-like release process to project using Gradle that supports git, subversion bazaar and mercurial'
id = 'net.researchgate.release'
implementationClass = 'net.researchgate.release.ReleasePlugin'
}
}
}
pluginBundle {
website = 'https://github.com/researchgate/gradle-release'
vcsUrl = 'https://github.com/researchgate/gradle-release'
tags = ['release', 'git', 'hg', 'mercurial', 'svn', 'subversion', 'bzr', 'bazaar']
}
tasks.withType(Test).configureEach {
dependsOn tasks.jar
useJUnitPlatform()
systemProperties.put('currentVersion', project.version)
}
release {
git {
requireBranch = '(main|\\d+\\.\\d+)'
}
}
wrapper.gradleVersion = '6.9.2'
updateVersion.doFirst {
def file = file('README.md')
def content = file.text
def versionPattern = /\d+(?:\.\d+)+/
content = content.replaceAll("id 'net.researchgate.release' version '${versionPattern}'",
"id 'net.researchgate.release' version '${version}'")
content = content.replaceAll("net.researchgate:gradle-release:${versionPattern}",
"net.researchgate:gradle-release:${version}")
file.text = content
}