-
Notifications
You must be signed in to change notification settings - Fork 40
/
build.gradle.kts
99 lines (84 loc) · 2.27 KB
/
build.gradle.kts
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
/**
* Plug-in development
*/
plugins {
/**
* Java plugin & Groovy
*/
`java-gradle-plugin`
groovy
id("com.gradle.plugin-publish") version "0.15.0"
/**
* Versioning applied to itself
*/
id("net.nemerosa.versioning") version "2.14.0"
/**
* Release in GitHub
*/
id("com.github.breadmoirai.github-release") version "2.2.12"
}
/**
* Meta information
*/
group = "net.nemerosa"
version = versioning.info.display
/**
* Dependencies
*/
val jgitVersion: String by project
repositories {
maven {
url = uri("https://plugins.gradle.org/m2/")
}
mavenCentral()
}
dependencies {
implementation(gradleApi())
implementation(localGroovy())
implementation("org.ajoberstar.grgit:grgit-core:4.1.1")
implementation("org.eclipse.jgit:org.eclipse.jgit.ui:${jgitVersion}")
implementation("org.eclipse.jgit:org.eclipse.jgit:${jgitVersion}")
implementation("org.tmatesoft.svnkit:svnkit:1.10.6")
testImplementation("junit:junit:4.13.2")
testImplementation("commons-lang:commons-lang:2.6")
testImplementation("commons-io:commons-io:2.11.0")
}
/**
* Plug-in definition
*/
pluginBundle {
website = "https://github.com/nemerosa/versioning/"
vcsUrl = "https://github.com/nemerosa/versioning/"
description = "Gradle plug-in that computes version information from the SCM"
tags = listOf("gradle", "plugin", "scm", "git", "svn", "version")
}
gradlePlugin {
plugins {
create("versioningPlugin") {
id = "net.nemerosa.versioning"
displayName = "Versioning plugin for Gradle"
description = "Gradle plug-in that computes version information from the SCM"
implementationClass = "net.nemerosa.versioning.VersioningPlugin"
}
}
}
tasks.test {
environment("GIT_TEST_BRANCH", "feature/456-cute")
environment("SVN_TEST_BRANCH", "feature-456-cute")
}
/**
* GitHub release parameters
*/
val gitHubToken: String by project
val gitHubOwner: String by project
val gitHubRepo: String by project
val gitHubCommit: String by project
githubRelease {
token(gitHubToken)
owner(gitHubOwner)
repo(gitHubRepo)
tagName(version.toString())
releaseName(version.toString())
targetCommitish(gitHubCommit)
overwrite(true)
}