forked from ratpack/example-ratpack-gradle-java-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
59 lines (49 loc) · 1.55 KB
/
build.gradle
File metadata and controls
59 lines (49 loc) · 1.55 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
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath 'io.ratpack:ratpack-gradle:2.0.0-rc-1',
'gradle.plugin.com.github.johnrengelman:shadow:7.1.2'
}
}
if (!JavaVersion.current().java8Compatible) {
throw new IllegalStateException("Must be built with Java 8 or higher")
}
// The “ratpack” plugin applies the “application” plugin, making it easy to create a standalone application.
// See: http://gradle.org/docs/current/userguide/application_plugin.html
apply plugin: "io.ratpack.ratpack-java"
apply plugin: "com.github.johnrengelman.shadow"
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.0'
// This is a Guice ratpack app
implementation ratpack.dependency("guice")
runtimeOnly 'org.slf4j:slf4j-simple:1.7.36'
}
// The “ratpack” plugin is IDEA aware.
// It will create a run configuration in IDEA to launch your app in your IDE, with hot reloading.
apply plugin: "idea"
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'
}
}
}
}
//some CI config
apply from: file("gradle/ci.gradle")
test {
useJUnitPlatform()
}
mainClassName = "ratpack.example.java.MyApp"