-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
51 lines (41 loc) · 1.41 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
plugins {
kotlin("jvm") version "1.3.61"
id("com.gradle.plugin-publish") version "0.12.0"
id("com.github.knifemaster007.git-version") version "0.1.4"
`java-gradle-plugin`
}
repositories {
mavenCentral()
}
val jgitVersion by extra { "5.7.0.202003110725-r" }
val junitVersion by extra { "5.6.2" }
version = gitVersionDetails.tags?.joinToString("-") ?: gitVersionDetails.shortHash ?: "dev"
dependencies {
implementation(kotlin("stdlib"))
implementation(gradleApi())
implementation("org.eclipse.jgit:org.eclipse.jgit:$jgitVersion")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
}
tasks.test {
useJUnitPlatform()
}
gradlePlugin {
plugins {
create("gitVersionPlugin") {
id = "com.github.knifemaster007.git-version"
implementationClass = "com.github.knifemaster007.gradle.gitversion.GitversionPlugin"
}
}
}
pluginBundle {
website = "https://github.com/KnifeMaster007"
vcsUrl = "https://github.com/KnifeMaster007/git-version"
(plugins) {
"gitVersionPlugin" {
displayName = "Gradle Git version details plugin"
description = "Plugin allows to read revision-related information from Git"
tags = listOf("git", "version", "versioning", "buildnumber", "versionname", "versioncode")
}
}
}