-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
119 lines (91 loc) · 3.07 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
buildscript {
repositories {
flatDir {
dirs "${rootProject.projectDir}/gradle/plugins"
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath group: 'org.gradle.plugins', name: 'gradle-environments-plugin', version: '1.0'
classpath "net.ltgt.gradle:gradle-apt-plugin:0.5"
}
}
plugins {
id 'com.bmuschko.docker-java-application' version '2.6.1'
id 'io.ratpack.ratpack-java' version '1.1.1'
id 'com.github.johnrengelman.shadow' version '1.2.2'
id 'idea'
}
apply plugin: "net.ltgt.apt"
repositories {
jcenter()
maven {
url 'http://oss.sonatype.org/content/repositories/snapshots'
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
apply plugin: "environments"
dependencies {
runtime 'org.slf4j:slf4j-simple:1.7.12'
compile ratpack.dependency("guice")
compile ratpack.dependency("rx")
compile 'com.google.auto.value:auto-value:1.2-SNAPSHOT'
// compileOnly 'com.ryanharter.auto.value:auto-value-moshi:0.2-SNAPSHOT'
apt 'com.ryanharter.auto.value:auto-value-moshi:0.2-SNAPSHOT'
compile 'com.squareup.moshi:moshi:1.0.0'
compile 'com.braintreepayments.gateway:braintree-java:2.53.0'
testCompile 'junit:junit:4.12'
testCompile 'com.google.truth:truth:0.28'
}
group 'monkeys-app'
version '1.0'
environments {
Main {
// Environments source folder. It must contain inner folders with environment names
// and environment specific configuration files inside of each oen
// Default value "./environments/"
sourceDir = "./src/main/environments"
// Destination folder, where all files from the 'sourceDir/[environment name]' must be copied.
// Default value "." -- current project root
destinationDir = "./src/main/resources/"
// Default environment value, which will be chosen when environment is not specified.
// Default value "development"
defaultEnvironment = "development"
// List of tasks names, dependent on resolving this environment.
// Default value []
dependentTasks = ["build", "idea" ]
}
}
project.ext.dockerUrl = 'unix:///var/run/docker.sock'
docker {
url = project.hasProperty('dockerUrl') ?
project.getProperty('dockerUrl') :
System.env.DOCKER_HOST.replace('tcp', 'https')
// Configuration for Java application image.
javaApplication {
// Default value for maintainer is
// System.properties['user.name'].
maintainer = "Nicolas Milliard <niqo01>"
// Exposed port.
port = 5050
}
}
idea {
project {
//use JDK 1.8 in idea
jdkName "1.8"
languageLevel "1.8"
ipr {
withXml { provider ->
def node = provider.asNode()
//configure git support for the project in idea
node.component.find { it.'@name' == 'VcsDirectoryMappings' }?.mapping[0].'@vcs' = 'Git'
}
}
}
}
mainClassName = 'com.monkey.Server'