forked from classmethod/gradle-aws-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
130 lines (110 loc) · 3.26 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
// -*- coding: utf-8; mode: groovy -*-
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.7.0'
}
}
apply plugin: 'groovy'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'license'
defaultTasks 'clean', 'build'
// ======== deployment options (dispatched on group name) ========
group = 'jp.classmethod.aws'
version = '0.16-SNAPSHOT'
sourceCompatibility = 1.7
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
}
artifacts {
archives sourcesJar
archives javadocJar
}
configurations {
deployerJars
}
// ======== library versions ========
ext {
awsJavaSdkVersion = '1.9.0'
groovyVersion = '2.3.7'
junitVersion = '4.+'
hamcrestVersion = '1.3'
mockitoCoreVersion = '1.9.5'
guavaVersion = '18.0'
}
repositories {
mavenCentral()
}
dependencies {
compile gradleApi()
compile "org.codehaus.groovy:groovy-all:$groovyVersion"
compile "com.amazonaws:aws-java-sdk:$awsJavaSdkVersion"
compile 'commons-codec:commons-codec:1.8'
compile "com.google.guava:guava:$guavaVersion"
// 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.1'
}
// ======== License =======
license {
ext.year = Calendar.getInstance().get(Calendar.YEAR)
header file('copyright/HEADER')
strictCheck true
}
// ======== 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.7',
'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
}
}