-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
80 lines (64 loc) · 2.24 KB
/
build.gradle
File metadata and controls
80 lines (64 loc) · 2.24 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
plugins {
id 'java-gradle-plugin'
id 'groovy'
id 'com.gradle.plugin-publish' version '1.3.1'
id "uk.gov.hmcts.java" version "0.12.67"
}
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
implementation 'org.owasp:dependency-check-gradle:12.2.0'
implementation 'org.apache.maven:maven-artifact:3.9.12'
compileOnly 'org.projectlombok:lombok:1.18.42'
annotationProcessor 'org.projectlombok:lombok:1.18.42'
testImplementation group: 'com.google.guava', name: 'guava', version: '33.5.0-jre'
testImplementation group: 'commons-io', name: 'commons-io', version: '2.21.0'
testImplementation 'org.spockframework:spock-core:2.3-groovy-3.0'
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
compileJava {
options.compilerArgs += ["-Werror"]
}
group = 'uk.gov.hmcts.reform'
project.version = System.getenv("RELEASE_VERSION")?.replace("refs/tags/", "") ?: "DEV-SNAPSHOT"
gradlePlugin {
// Define the plugin
plugins {
greeting {
id = 'uk.gov.hmcts.java'
implementationClass = 'uk.gov.hmcts.JavaPlugin'
displayName = 'HMCTS Java standards plugin'
description = 'Applies HMCTS Java coding standards'
tags.set(['hmcts'])
}
}
}
sourceSets {
integrationTest {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}
gradlePlugin.testSourceSets(sourceSets.integrationTest)
configurations.integrationTestImplementation.extendsFrom(configurations.testImplementation)
tasks.register('integrationTest', Test) {
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
}
integrationTest.mustRunAfter test
check {
dependsOn(tasks.integrationTest)
}
gradlePlugin {
website = 'https://github.com/hmcts/gradle-java-plugin'
vcsUrl = 'https://github.com/hmcts/gradle-java-plugin'
}
ext['gradle.publish.key'] = System.getenv('GRADLE_PLUGIN_PORTAL_KEY')
ext['gradle.publish.secret'] = System.getenv('GRADLE_PLUGIN_PORTAL_SECRET')
// The tests use copies of this build.
tasks.integrationTest.inputs.files file('test-projects')