-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.gradle
executable file
·74 lines (56 loc) · 1.67 KB
/
common.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
//
// This file is to be applied to every subproject.
//
apply plugin: 'groovy'
apply plugin: 'application'
group = 'org.gotan'
version = '1.0.2'
sourceCompatibility = '1.7'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
repositories {
jcenter()
maven { url "http://maven.restlet.org" }
}
dependencies {
// Adding dependencies here will add the dependencies to each subproject.
compile "org.restlet.jse:org.restlet:2.1.0"
compile "org.restlet.jse:org.restlet.ext.json:2.1.0"
compile 'org.slf4j:slf4j-api:1.6.1'
compile 'ch.qos.logback:logback-classic:0.9.28'
compile "org.codehaus.groovy:groovy-all:2.1.0"
testCompile "org.spockframework:spock-core:0.7-groovy-2.0"
}
task sourcesJar(type: Jar, dependsOn: classes, description: 'Creates a jar from the source files.') {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives jar
archives sourcesJar
}
task createFolders(description: 'Creates the source folders if they do not exist.') doLast {
sourceSets*.allSource*.srcDirs*.each { File srcDir ->
if (!srcDir.isDirectory()) {
println "Creating source folder: ${srcDir}"
srcDir.mkdirs()
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '1.8'
}
// License plugin
buildscript {
repositories {
jcenter()
}
dependencies {
// For the license plugin
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.5.0'
// For the ubuntu packager plugin
// classpath 'be.thinkerit.gradle:ubuntu-packager-plugin:dev-SNAPSHOT'
}
}
license {
header rootProject.file('LICENSE')
}