-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
76 lines (62 loc) · 2.38 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
plugins {
id 'java-gradle-plugin'
id 'groovy'
id 'com.gradle.plugin-publish' version "1.3.1"
id 'to.wetransform.semantic-release-version' version '2.1.2'
}
repositories {
mavenCentral()
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
group = "to.wetransform"
dependencies {
implementation 'org.ajoberstar.grgit:grgit-core:5.3.0'
// Testing
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.4'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.4'
testImplementation("org.assertj:assertj-core:3.27.3")
}
test {
useJUnitPlatform()
}
gradlePlugin {
def githubUrl = 'https://github.com/wetransform-os/gradle-semantic-release-version'
website = githubUrl
vcsUrl = githubUrl
plugins {
versionPlugin {
id = 'to.wetransform.semantic-release-version'
implementationClass = 'to.wetransform.gradle.version.VersionPlugin'
displayName = 'semantic-release-version'
description = 'Gradle plugin that determines the current release or SNAPSHOT version from Git based on existing tags. Intended to be used with semantic-release.'
tags.set(['semver', 'release', 'version', 'semantic-release', 'git'])
}
configurableVersionPlugin {
id = 'to.wetransform.semantic-release-version-custom'
implementationClass = 'to.wetransform.gradle.version.ConfigurableVersionPlugin'
displayName = 'semantic-release-version-custom'
description = 'Gradle plugin that determines the current version based on information from Git and optionally a version file. Compared to the semantic-release-version plugin the behavior can be customized.'
tags.set(['semver', 'release', 'version', 'semantic-release'])
}
}
}
// Add a source set and a task for a functional test suite
def functionalTest = sourceSets.create('functionalTest')
gradlePlugin.testSourceSets(functionalTest)
configurations[functionalTest.implementationConfigurationName].extendsFrom(configurations.testImplementation)
def functionalTestTask = tasks.register('functionalTest', Test) {
testClassesDirs = functionalTest.output.classesDirs
classpath = configurations[functionalTest.runtimeClasspathConfigurationName] + functionalTest.output
}
tasks.check.configure {
// Run the functional tests as part of `check`
dependsOn(functionalTestTask)
}
tasks.wrapper {
distributionType = Wrapper.DistributionType.ALL
gradleVersion = '8.12'
}