-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
109 lines (90 loc) · 2.66 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
100
101
102
103
104
105
106
107
108
109
plugins {
id 'java-gradle-plugin'
id "com.gradle.plugin-publish" version "1.2.1"
id 'maven-publish'
id 'signing'
id 'eclipse'
id 'com.github.spotbugs' version '5.0.13'
id 'com.diffplug.spotless' version '5.3.0'
}
group 'com.formkiq.gradle'
version '1.6.0'
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
repositories {
mavenCentral()
}
dependencies {
implementation group: 'org.apache.commons', name: 'commons-compress', version: '1.20'
testImplementation 'junit:junit:4.13'
testImplementation group: 'commons-io', name: 'commons-io', version: '2.8.0'
testImplementation group: 'org.apache.commons', name: 'commons-exec', version: '1.3'
testImplementation group: 'com.google.testing.compile', name: 'compile-testing', version: '0.18'
testImplementation gradleTestKit()
}
spotbugs {
effort = 'max'
reportLevel = 'medium'
excludeFilter = file("$rootDir/config/gradle/spotbugs-exclude.xml")
}
spotbugsMain {
reports {
xml.enabled = false
html.enabled = true
}
}
spotless {
java {
eclipse().configFile project.rootProject.file("spotless.eclipseformat.xml")
}
}
gradlePlugin {
// Define the plugin
website.set("https://github.com/formkiq/graalvm-native-plugin")
vcsUrl.set("https://github.com/formkiq/graalvm-native-plugin.git")
plugins {
nativeImage {
id = 'com.formkiq.gradle.graalvm-native-plugin'
displayName = 'GraalVM native Gradle plugin'
description = 'Support for building Java applications as GraalVM native images'
implementationClass = 'com.formkiq.gradle.GraalvmNativePlugin'
tags.set([ 'graal', 'graalvm', 'native', 'image', 'java', 'lambda', 'aws', ])
}
}
}
// Add a source set for the functional test suite
sourceSets {
functionalTest {
}
}
gradlePlugin.testSourceSets(sourceSets.functionalTest)
configurations.functionalTestImplementation.extendsFrom(configurations.testImplementation)
// Add a task to run the functional tests
tasks.register('functionalTest', Test) {
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = sourceSets.functionalTest.runtimeClasspath + sourceSets.functionalTest.compileClasspath
}
check {
// Run the functional tests as part of `check`
dependsOn(tasks.functionalTest, tasks.publishToMavenLocal)
}
test {
failFast = true
}
publishing {
publications {
pluginMaven(MavenPublication) {
}
}
}
check {
dependsOn(tasks.publishToMavenLocal)
}
tasks {
processResources {
duplicatesStrategy = org.gradle.api.file.DuplicatesStrategy.INCLUDE
}
}