-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
121 lines (109 loc) · 2.98 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
110
111
112
113
114
115
116
117
118
119
120
121
plugins {
id 'eclipse'
id 'groovy'
id 'com.gradle.plugin-publish' version '1.0.0' // plugin publication, and java-gradle-plugin and maven-publish plugins
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.ajoberstar.grgit:grgit-core:5.0.0'
def awsSdkVersion = '2.18.24'
implementation "software.amazon.awssdk:cloudformation:$awsSdkVersion"
implementation "software.amazon.awssdk:ssm:$awsSdkVersion"
testImplementation('org.assertj:assertj-core:3.22.0')
testImplementation('org.junit.jupiter:junit-jupiter')
testImplementation(platform('org.junit:junit-bom:5.8.2'))
}
group = 'se.solrike.cloudformation'
version = '1.0.0'
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks.withType(GroovyCompile) {
configure(options) {
options.compilerArgs << '-Xlint:deprecation' << '-Xlint:unchecked'
}
}
sourceSets {
main {
java {
srcDirs = [] // don't compile Java code twice
}
groovy {
srcDirs = [
'src/main/groovy',
'src/main/java'
]
}
}
test {
java {
srcDirs = [] // don't compile Java code twice
}
groovy {
srcDirs = ['src/test/groovy']
}
}
}
javadoc {
enabled = false
}
groovydoc {
enabled = false
}
// folder names that ends with 'nosync' will not be synced to iCloud drive.
eclipse {
classpath {
def mainOutputDir = 'bin.nosync/main'
defaultOutputDir = file(mainOutputDir)
file {
whenMerged {
entries.findAll({it.kind == 'src'}).each {
if (it.path.contains('main') || it.path == '.apt_generated') {
it.output = mainOutputDir
}
else if (it.path.contains('test')) {
it.output = 'bin.nosync/test'
}
}
}
}
}
}
test {
useJUnitPlatform()
}
// publish the plugin like: ./gradlew publishPlugins
gradlePlugin {
plugins {
cloudformationPlugin {
id = group
implementationClass = 'se.solrike.cloudformation.CloudformationPlugin'
displayName = 'Cloudformation plugin'
description =
'Gradle plugin for create/update and delete AWS Cloudformation stacks. ' +
'The parameters for the Cloudformation template can be managed per environment and kept in ' +
'for instance Java properties files. Values in the Java properties files will be "interpolated" ' +
'according to Groovy\'s evaluation. That is, properties can reference other properties ' +
'and Groovy/Java functions. ' +
'\nMin Gradle version 7.0.'
}
}
}
pluginBundle {
website = 'https://github.com/Lucas3oo/cloudformation-gradle-plugin'
vcsUrl = website
pluginTags = [
cloudformationPlugin: [
'Cloudformation',
'AWS',
'continues deployment'
]
]
}
// to upgrade the metainfo about which gradle version we shall use. Run ./gradlew wrapper after you have updated the version. The commit the new wrapper files except the gradlew.bat
wrapper {
gradleVersion = '7.5.1'
}