forked from ratpack/ratpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ratpack.gradle
102 lines (86 loc) · 2.73 KB
/
ratpack.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
plugins {
id "com.github.ben-manes.versions"
}
allprojects {
group = "io.ratpack"
version = "2.0.0-SNAPSHOT"
}
ext {
isSnapshot = version.endsWith("SNAPSHOT")
isTravis = System.getenv("TRAVIS") != null
isDrone = System.getenv("DRONE") != null
isCodeship = System.getenv("CI_NAME") == "codeship"
isSnapCi = System.getenv("SNAP_CI") != null
isAppveyor = System.getenv("APPVEYOR") != null
isHeroku = System.getenv("HEROKU") != null
isSemaphore = System.getenv("SEMAPHORE") != null
isCircleCI = System.getenv("CIRCLECI") != null
isCloudCi = isTravis || isDrone || isCodeship || isSnapCi || isAppveyor || isSemaphore || isCircleCI
isCi = isCloudCi
publishedModules = [
"ratpack-config",
"ratpack-consul",
"ratpack-core",
"ratpack-dropwizard-metrics",
"ratpack-exec",
"ratpack-func",
"ratpack-gradle",
"ratpack-groovy",
"ratpack-groovy-test",
"ratpack-gson",
"ratpack-guice",
"ratpack-h2",
"ratpack-handlebars",
"ratpack-hikari",
"ratpack-jdbc-tx",
"ratpack-newrelic",
"ratpack-reactor",
"ratpack-retrofit2",
"ratpack-rocker",
"ratpack-rx2",
"ratpack-session",
"ratpack-session-redis",
"ratpack-session-serialization-kryo",
"ratpack-spring-boot",
"ratpack-spring-boot-starter",
"ratpack-test",
"ratpack-thymeleaf3",
].collect { project(it) }
nonLibraryPublishedModules = [
"ratpack-spring-boot-starter", "ratpack-manual"
].collect { project(it) }
apiModules = publishedModules.findAll { !(it.name in ["ratpack-manual", "ratpack-gradle", "ratpack-spring-boot-starter"]) }
}
def jvmEncoding = java.nio.charset.Charset.defaultCharset().name()
if (jvmEncoding != "UTF-8") {
throw new IllegalStateException("Build environment must be UTF-8 (it is: $jvmEncoding) - add '-Dfile.encoding=UTF-8' to the GRADLE_OPTS environment variable ")
}
if (!JavaVersion.current().java11Compatible) {
throw new IllegalStateException("Must be built with Java 11 or higher")
}
gradle.beforeProject {
it.with {
apply plugin: "base"
apply from: "$rootDir/gradle/dependencyRules.gradle"
apply plugin: "com.github.ben-manes.versions"
repositories {
mavenCentral()
maven { url 'https://oss.jfrog.org/artifactory/repo' }
}
configurations {
published
}
tasks.withType(JavaExec) {
maxHeapSize = "1g"
}
tasks.register("sanityCheck")
apply from: "$rootDir/gradle/ratpackLocal.gradle"
if (project in publishedModules && !(project in nonLibraryPublishedModules)) {
apply from: "$rootDir/gradle/publish-library.gradle"
}
}
}
apply from: "gradle/idea.gradle"
apply from: "gradle/publish-root.gradle"
apply from: "gradle/dependencies.gradle"
apply from: "gradle/coveralls.gradle"