-
-
Notifications
You must be signed in to change notification settings - Fork 974
Expand file tree
/
Copy pathbuild.gradle
More file actions
119 lines (106 loc) · 4.63 KB
/
Copy pathbuild.gradle
File metadata and controls
119 lines (106 loc) · 4.63 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
plugins {
id 'org.apache.grails.buildsrc.properties'
id 'org.apache.grails.gradle.grails-plugin'
id 'org.apache.grails.gradle.grails-gson'
id 'org.apache.grails.buildsrc.compile'
id 'org.apache.grails.buildsrc.publish'
id 'org.apache.grails.buildsrc.sbom'
id 'org.apache.grails.gradle.grails-code-style'
}
version = projectVersion
group = 'org.apache.grails'
ext {
gormApiDocs = true
pomTitle = 'GORM for GraphQL'
pomDescription = 'Generates a GraphQL schema based on entities in GORM'
}
dependencies {
implementation platform(project(':grails-bom'))
api project(':grails-data-graphql-core'), {
// api: GraphQLEntityNamingConvention, Schema, GraphQLSchema generation
}
api project(':grails-controllers'), {
// api: GraphqlController extends from grails controller infrastructure
}
api project(':grails-databinding'), {
// api: data binding for GraphQL request payloads
}
api project(':grails-rest-transforms'), {
// api: REST transforms used for JSON marshalling
exclude group: 'org.apache.grails', module: 'grails-converters'
}
api project(':grails-url-mappings'), {
// api: URL mappings for /graphql endpoint
}
api project(':grails-converters'), {
// api: JSON converters used by the controller
}
api project(':grails-views-gson'), {
// api: GSON view rendering for GraphQL responses
}
api 'com.github.javaparser:javaparser-core', {
// api: parsing of GORM entity sources for schema introspection
}
api 'com.graphql-java:graphql-java', {
// api: GraphQL execution and schema types
}
api 'jakarta.servlet:jakarta.servlet-api', {
// api: HttpServletRequest/Response in GraphqlController
}
// GraphQLSpec test trait imports types from io.micronaut.http.* and
// io.micronaut.rxjava2.http.client.* so the rxjava2 client (which transitively
// pulls micronaut-http-client and micronaut-http) is required to compile the
// trait. The trait is only useful from integration tests; the runtime
// dependency is therefore deferred to consumers (the example apps already
// declare it as `implementation`). Keeping it `compileOnly` here avoids
// shipping an unused micronaut HTTP client on every Grails app's runtime
// classpath - test dependencies must not leak onto the production classpath
// post Grails 7.
compileOnly "io.micronaut.rxjava2:micronaut-rxjava2-http-client:$micronautRxjava2Version"
testImplementation project(':grails-testing-support-web')
testImplementation 'org.spockframework:spock-core'
testRuntimeOnly 'net.bytebuddy:byte-buddy' // Required by Spock's mocking support
testRuntimeOnly 'org.objenesis:objenesis' // Required by Spock for mocking classes without default constructor
}
compileGsonViews {
packageName = 'gorm-graphql'
}
// compileGsonViews writes compiled GSON view classes into build/gson-classes/main,
// which the Groovy plugin treats as part of the main source-set output. Without an
// explicit dependency the groovydoc task implicitly consumes that output, which
// Gradle 8.x rejects as an undeclared task input.
tasks.named('groovydoc').configure {
dependsOn tasks.named('compileGsonViews')
}
// This is a Grails plugin (library), not an application; the Spring Boot
// `bootRun` / `bootTestRun` tasks are inapplicable. Disabled to mirror
// `grails-data-mongodb/grails-plugin/build.gradle`.
def disabledTasks = ['bootRun', 'bootTestRun']
disabledTasks.each { taskName ->
tasks.named(taskName) {
enabled = false
}
}
apply {
from rootProject.layout.projectDirectory.file('gradle/test-config.gradle')
from rootProject.layout.projectDirectory.file('gradle/docs-config.gradle')
from rootProject.layout.projectDirectory.file('gradle/grails-extension-gradle-config.gradle')
}