forked from classmethod/gradle-aws-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
159 lines (136 loc) · 4.36 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
// -*- coding: utf-8; mode: groovy -*-
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.7.0'
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2"
classpath "com.gradle.publish:plugin-publish-plugin:0.9.1"
}
}
apply plugin: "com.gradle.plugin-publish"
apply plugin: "java"
apply plugin: "license"
apply plugin: "eclipse"
apply plugin: "idea"
defaultTasks "clean", "build"
// ======== deployment options (dispatched on group name) ========
group = "jp.classmethod.aws"
version = "0.25-SNAPSHOT"
sourceCompatibility = targetCompatibility = 1.8
ext {
artifactId = "gradle-aws-plugin"
defaultEncoding = "UTF-8"
}
// ======== create source and javadoc bundles ========
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = "javadoc"
from javadoc.destinationDir
}
javadoc {
failOnError = false
}
artifacts {
archives sourcesJar
archives javadocJar
}
configurations {
deployerJars
}
// ======== library versions ========
ext {
lombokVersion = "1.16.2"
awsJavaSdkVersion = "1.10.58"
groovyVersion = "2.3.7"
junitVersion = "4.+"
hamcrestVersion = "1.3"
mockitoCoreVersion = "1.9.5"
guavaVersion = "18.0"
sparWingsVersion = "0.11"
}
repositories {
mavenCentral()
maven { url "http://dl.bintray.com/dai0304/spar-wings" } // for spar-wings
}
dependencies {
compile gradleApi()
compile "com.google.guava:guava:$guavaVersion"
compile "commons-io:commons-io:1.4"
compile "org.projectlombok:lombok:$lombokVersion"
compile "com.amazonaws:aws-java-sdk-sts:$awsJavaSdkVersion"
compile "com.amazonaws:aws-java-sdk-s3:$awsJavaSdkVersion"
compile "com.amazonaws:aws-java-sdk-ec2:$awsJavaSdkVersion"
compile "com.amazonaws:aws-java-sdk-rds:$awsJavaSdkVersion"
compile "com.amazonaws:aws-java-sdk-route53:$awsJavaSdkVersion"
compile "com.amazonaws:aws-java-sdk-elasticloadbalancing:$awsJavaSdkVersion"
compile "com.amazonaws:aws-java-sdk-elasticbeanstalk:$awsJavaSdkVersion"
compile "com.amazonaws:aws-java-sdk-cloudformation:$awsJavaSdkVersion"
compile "com.amazonaws:aws-java-sdk-lambda:$awsJavaSdkVersion"
compile "com.amazonaws:aws-java-sdk-iam:$awsJavaSdkVersion"
compile "jp.xet.spar-wings:spar-wings-awscli-config:$sparWingsVersion"
// tests
testCompile "junit:junit:$junitVersion"
testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion"
testCompile "org.mockito:mockito-core:$mockitoCoreVersion"
deployerJars "org.springframework.build:aws-maven:4.7.0.RELEASE"
}
// ======== deploy artifacts ========
// Allows forks of the plugin to define their own deployment mechanisms
// in separate files named according to their maven group name
apply from: "deploy/${group}.gradle"
// ======== wrapper ========
task wrapper(type: Wrapper) {
gradleVersion = "2.5"
}
// ======== License =======
license {
ext.year = Calendar.getInstance().get(Calendar.YEAR)
header file("copyright/HEADER")
strictCheck true
mapping {
java = "SLASHSTAR_STYLE"
}
}
// ======== IDE ========
eclipse {
project {
buildCommand 'org.eclipse.jdt.core.javabuilder'
buildCommand 'org.springframework.ide.eclipse.core.springbuilder'
buildCommand 'net.sf.eclipsecs.core.CheckstyleNature'
buildCommand 'edu.umd.cs.findbugs.plugin.eclipse.findbugsNature'
natures 'org.eclipse.jdt.core.javanature',
'org.springsource.ide.eclipse.gradle.core.nature',
'org.springframework.ide.eclipse.core.springnature',
'net.sf.eclipsecs.core.CheckstyleBuilder',
'edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder'
}
classpath {
defaultOutputDir = file('build/classes')
containers = [
'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8',
'org.springsource.ide.eclipse.gradle.classpathcontainer' // Gradle IDE classpath container
]
file {
// exclude jar entries from .classpath
whenMerged { classpath ->
classpath.configure classpath.entries.grep { entry ->
!(entry instanceof org.gradle.plugins.ide.eclipse.model.Library)
}
classpath.entries.findAll {
it instanceof org.gradle.plugins.ide.eclipse.model.SourceFolder && it.path.startsWith("src/test/")
}*.output = "build/test-classes"
}
}
downloadSources = true
downloadJavadoc = true
}
}