-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
89 lines (70 loc) · 2.31 KB
/
build.gradle
File metadata and controls
89 lines (70 loc) · 2.31 KB
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
plugins {
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
id 'groovy'
id 'com.github.johnrengelman.shadow' version '4.0.2'
id 'application'
id 'com.bmuschko.docker-java-application' version '4.10.0'
}
import com.bmuschko.gradle.docker.tasks.image.*
group 'com.thecodesmith'
ext {
namespace = 'test'
}
repositories {
mavenCentral()
jcenter()
}
dependencyManagement {
imports {
mavenBom 'io.micronaut:micronaut-bom:1.2.0'
}
}
configurations {
developmentOnly
}
dependencies {
compile 'io.micronaut:micronaut-runtime-groovy'
compile 'io.micronaut:micronaut-validation'
compile 'io.micronaut:micronaut-http-client'
compile 'io.micronaut:micronaut-http-server-netty'
compile 'javax.annotation:javax.annotation-api'
compile 'org.codehaus.groovy:groovy-json:2.5.8'
compile 'org.codehaus.groovy:groovy-xml:2.5.8'
compileOnly 'io.micronaut:micronaut-inject-groovy'
runtime 'ch.qos.logback:logback-classic:1.2.3'
testCompile('org.spockframework:spock-core') {
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
}
testCompile 'io.micronaut:micronaut-inject-groovy'
testCompile 'io.micronaut.test:micronaut-test-spock'
developmentOnly 'io.micronaut:micronaut-runtime-osx'
developmentOnly 'net.java.dev.jna:jna'
developmentOnly 'io.methvin:directory-watcher'
}
test.classpath += configurations.developmentOnly
mainClassName = 'com.thecodesmith.echo.server.Application'
tasks.withType(GroovyCompile) {
groovyOptions.forkOptions.jvmArgs.add('-Dgroovy.parameters=true')
}
shadowJar {
mergeServiceFiles()
}
docker {
javaApplication {
baseImage = 'amazoncorretto:11'
tag = "thecodesmith/echo-server:$version"
ports = [8080]
maintainer = 'Brian Stewart "[email protected]"'
}
}
dockerCreateDockerfile {
environmentVariable 'JAVA_OPTS', '-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap'
}
run.classpath += configurations.developmentOnly
run.jvmArgs('-noverify', '-XX:TieredStopAtLevel=1', '-Dcom.sun.management.jmxremote')
tasks.create('kubectlInstall', Exec) {
commandLine 'kubectl', 'apply', '-n', namespace, '-f', 'manifests'
}
tasks.create('kubectlUninstall', Exec) {
commandLine 'kubectl', 'delete', 'deployment,service,ingress', 'echo'
}