-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
77 lines (64 loc) · 2.23 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
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Gradle plugin project to get you started.
* For more details take a look at the Writing Custom Plugins chapter in the Gradle
* User Manual available at https://docs.gradle.org/6.2.1/userguide/custom_plugins.html
*/
plugins {
// Apply the Java Gradle plugin development plugin to add support for developing Gradle plugins
id 'java-gradle-plugin'
// Apply the Groovy plugin to add support for Groovy
id 'groovy'
id 'com.gradle.plugin-publish' version '0.10.1'
}
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
ext {
jacksonVer='2.9.8'
}
dependencies {
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${jacksonVer}"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jacksonVer}"
// Use the awesome Spock testing and specification framework
testImplementation 'org.spockframework:spock-core:1.3-groovy-2.5'
}
version = "1.0.0-SNAPSHOT"
pluginBundle {
website = 'https://github.com/castocolina/json2yaml'
vcsUrl = 'https://github.com/castocolina/json2yaml'
tags = ['json', 'yaml', 'converter', 'transform', 'json2yaml']
}
gradlePlugin {
// Define the plugin
plugins {
json2yaml {
id = 'dev.castocolina.json2yaml'
displayName = 'JSON to YAML Plugin'
description = 'Plugin for JSON file convertion to YAML format'
implementationClass = 'dev.castocolina.gradle.plugin.Json2YamlPlugin'
}
}
}
// Add a source set for the functional test suite
sourceSets {
functionalTest {
resources {
srcDir 'src/functionalTest/resources'
}
}
}
gradlePlugin.testSourceSets(sourceSets.functionalTest)
configurations.functionalTestImplementation.extendsFrom(configurations.testImplementation)
// Add a task to run the functional tests
task functionalTest(type: Test) {
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = sourceSets.functionalTest.runtimeClasspath
}
check {
// Run the functional tests as part of `check`
dependsOn(tasks.functionalTest)
}