forked from ratpack/ratpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ratpack.gradle
113 lines (95 loc) · 2.9 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
103
104
105
106
107
108
109
110
111
112
113
buildscript {
repositories {
jcenter()
gradlePluginPortal()
}
dependencies {
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.18.3"
classpath 'org.apache.commons:commons-lang3:3.6'
classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.3.1"
classpath "com.github.ben-manes:gradle-versions-plugin:0.17.0"
}
}
allprojects {
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-manual",
"ratpack-newrelic",
"ratpack-reactor",
"ratpack-retrofit2",
"ratpack-rocker",
"ratpack-rx2",
"ratpack-session",
"ratpack-session-redis",
"ratpack-spring-boot",
"ratpack-spring-boot-starter",
"ratpack-test",
"ratpack-thymeleaf3",
].collect { project(it) }
noCodeModules = [
"ratpack-spring-boot-starter"
]
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 {
group = "io.ratpack"
apply plugin: "base"
apply from: "$rootDir/gradle/dependencyRules.gradle"
apply plugin: "com.github.ben-manes.versions"
repositories {
jcenter()
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) {
apply from: "$rootDir/gradle/publish-module.gradle"
}
}
}
apply from: "gradle/idea.gradle"
apply from: "gradle/publish.gradle"
apply from: "gradle/dependencies.gradle"
apply from: "gradle/coveralls.gradle"