-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
124 lines (104 loc) · 3.08 KB
/
build.gradle
File metadata and controls
124 lines (104 loc) · 3.08 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
plugins {
id 'java-library'
id 'java-gradle-plugin'
id 'jvm-test-suite'
id 'checkstyle'
id 'org.sonarqube' version '4.4.1.3373'
id 'jacoco'
id 'maven-publish'
id 'com.gradle.plugin-publish' version '1.2.1'
id 'io.github.pepperkit.git-hooks-gradle-plugin' version '1.0.0'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
group 'io.github.pepperkit'
version '1.0.0'
gradlePlugin {
website = 'https://pepperkit.github.io/'
vcsUrl = 'https://github.com/pepperkit/git-hooks-gradle-plugin'
plugins {
gitHooksGradlePlugin {
id = 'io.github.pepperkit.git-hooks-gradle-plugin'
displayName = 'Plugin for easy git hooks configuration'
description = 'A plugin that helps you configure git hooks on the project level'
tags.addAll('git', 'git hooks')
implementationClass = 'io.github.pepperkit.githooks.GitHooksPlugin'
}
}
}
repositories {
mavenLocal()
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
checkstyle {
toolVersion '10.12.5'
config project.resources.text
.fromUri(new URI("https://raw.githubusercontent.com/pepperkit/java-style-guide/v1.0.2-9.2/checkstyle.xml"))
}
testing {
suites {
configureEach {
useJUnitJupiter()
dependencies {
implementation 'org.junit.jupiter:junit-jupiter:5.10.1'
implementation 'org.junit.jupiter:junit-jupiter-engine:5.10.1'
implementation 'org.junit.platform:junit-platform-suite:1.10.1'
implementation 'org.mockito:mockito-core:5.11.0'
implementation 'org.assertj:assertj-core:3.25.1'
}
}
test {
}
systemTest(JvmTestSuite) {
sources {
java {
srcDirs = ['src/system-test/java']
}
resources {
srcDirs = ['src/system-test/resources']
}
}
dependencies {
implementation project()
implementation('org.testcontainers:junit-jupiter:1.19.7')
implementation("io.cucumber:cucumber-java:7.15.0")
implementation("io.cucumber:cucumber-junit-platform-engine:7.16.1")
}
}
}
}
jacoco {
toolVersion = "0.8.10"
}
jacocoTestReport {
reports {
xml.required = true
csv.required = false
html.required = true
xml.destination file("${buildDir}/reports/jacoco.xml")
}
}
sonar {
properties {
property "sonar.projectKey", "pepperkit_git-hooks-gradle-plugin"
property "sonar.organization", "pepperkit"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.exclusions", "**GitHooksManager.java"
}
}
compileJava {
dependsOn initGitHooks
}
gitHooksGradlePlugin {
hooks = [
'pre-commit' : 'gradle -q checkstyleMain',
'pre-push' : 'gradle -q test'
]
}