-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
99 lines (86 loc) · 2.79 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
97
98
99
plugins {
id 'java-gradle-plugin'
id "com.diffplug.spotless" version "6.11.0"
id "pt.com.hugo-dias.git-versioner" version "1.0.1"
id 'maven-publish'
id "com.gradle.plugin-publish" version "1.0.0"
id "pl.droidsonroids.jacoco.testkit" version "1.0.7"
id "jacoco"
id "org.sonarqube" version "3.4.0.2513"
}
group 'pt.com.hugo-dias.gradle.gitversioner'
repositories {
mavenCentral()
}
dependencies {
compileOnly gradleApi()
compileOnly 'org.projectlombok:lombok:1.18.24'
implementation 'org.eclipse.jgit:org.eclipse.jgit:6.3.0.202209071007-r'
implementation "com.jcraft:jsch:0.1.55"
annotationProcessor 'org.projectlombok:lombok:1.18.24'
testCompileOnly 'org.projectlombok:lombok:1.18.24'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.24'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
testImplementation('commons-io:commons-io:2.11.0')
testImplementation('org.assertj:assertj-core:3.23.1')
testImplementation('org.junit.jupiter:junit-jupiter-params:5.9.0')
}
test {
useJUnitPlatform()
}
gradlePlugin {
plugins {
simplePlugin {
id = 'pt.com.hugo-dias.git-versioner'
displayName = 'Automated semantic versioning'
description = 'This plugin will help you by creating a new version for each git commit based in the commit description'
implementationClass = 'pt.com.hugodias.gradle.gitversioner.VersionerPlugin'
}
}
}
spotless {
java {
importOrder()
removeUnusedImports()
googleJavaFormat()
formatAnnotations()
licenseHeader '/* (C) 2022 Hugo Dias */'
}
}
pluginBundle {
website = 'https://github.com/AnakinPt/git-versioner'
vcsUrl = 'https://github.com/AnakinPt/git-versioner'
tags = ['git', 'version', 'semantic-version']
}
tasks.withType(Javadoc) {
enabled = false
}
publishing {
repositories {
maven {
name = 'localPluginRepository'
url = '../local-plugin-repository'
}
}
}
sonarqube {
properties {
property "sonar.projectKey", "AnakinPt_git-versioner"
property "sonar.organization", "anakinpt"
property "sonar.host.url", "https://sonarcloud.io"
// property "sonar.sources", "src/main/java"
// property "sonar.tests", "src/test/java"
// property "sonar.junit.reportPaths", "build/test-results/**/*.xml"
// property "sonar.jacoco.reportPaths", "build/jacoco/*.exec"
// property "sonar.coverage.jacoco.xmlReportPaths", "build/reports/jacoco/test/jacocoTestReport.xml"
// property "sonar.cpd.exclusions", "src/test/**/*"
}
}
versioner {
startFrom {
major = 1
minor = 0
patch = 1
}
}