forked from grails/grails-testing-support
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
98 lines (83 loc) · 3.25 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
buildscript {
repositories {
maven { url "https://repo.grails.org/grails/core" }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "org.grails:grails-docs:${project.ext.properties.grailsDocsVersion ?: grailsVersion}"
classpath "org.grails.plugins:views-gradle:$jsonViewsVersion"
classpath "io.github.gradle-nexus:publish-plugin:1.3.0"
classpath("org.asciidoctor:asciidoctor-gradle-jvm:4.0.0-alpha.1")
}
}
repositories {
maven { url "https://repo.grails.org/grails/core" }
}
version project.projectVersion
ext {
commonBuild = 'https://raw.githubusercontent.com/grails/grails-common-build/gradle7'
}
subprojects { project ->
version rootProject.projectVersion
ext {
userOrg = "grails"
isGrailsPlugin = name.startsWith('grails-plugin')
isBuildSnapshot = version.toString().endsWith("-SNAPSHOT")
}
if (isGrailsPlugin) {
group "org.grails.plugins"
} else {
group "org.grails"
}
repositories {
maven { url "https://repo.grails.org/grails/core" }
if (groovyVersion && groovyVersion.endsWith('-SNAPSHOT')) {
maven {
name 'JFrog OSS snapshot repo'
url 'https://oss.jfrog.org/oss-snapshot-local/'
}
}
}
apply plugin: "groovy"
if (project.name.startsWith("examples")) {
apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.plugins.views-json"
} else {
apply plugin: "java-library"
if (isGrailsPlugin) {
apply plugin: "org.grails.grails-plugin"
} else {
apply from: "${commonBuild}/common-project.gradle"
}
sourceCompatibility = 1.11
targetCompatibility = 1.11
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.springframework') {
details.useVersion(springVersion)
} else if (details.requested.group == 'org.springframework.boot') {
details.useVersion(springBootVersion)
} else if (details.requested.group == 'org.junit.jupiter') {
details.useVersion(junitJupiterVersion)
} else if (details.requested.group == 'org.junit.platform') {
details.useVersion(junitPlatformVersion)
}
}
}
dependencies {
implementation "com.github.javaparser:javaparser-core:$javaParserVersion"
compileOnly "javax.servlet:javax.servlet-api:$servletApiVersion"
testImplementation "javax.servlet:javax.servlet-api:$servletApiVersion"
testImplementation "org.codehaus.groovy:groovy-test-junit5:$groovyVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion"
testImplementation "org.junit.platform:junit-platform-runner:$junitPlatformVersion"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion"
}
tasks.withType(Test) {
useJUnitPlatform()
}
}
apply from: "${commonBuild}/common-publishing.gradle"
apply from: "${commonBuild}/common-docs.gradle"