This commit documents the GraalVM Native image support in Spring for GraphQL and lists relevant pointers to the Spring Framework and Spring Boot documentations. This also explains how developers are expected to provide reachability hints for the cases where the AOT processing is not able to discover the relevant types. Closes gh-581
83 lines
2.0 KiB
Groovy
83 lines
2.0 KiB
Groovy
plugins {
|
|
id 'org.jetbrains.kotlin.jvm' version '1.7.0' apply false
|
|
}
|
|
|
|
ext {
|
|
moduleProjects = [project(":spring-graphql"), project(":spring-graphql-test")]
|
|
springFrameworkVersion = "6.0.3"
|
|
graphQlJavaVersion = "19.2"
|
|
springBootVersion = "3.0.0"
|
|
}
|
|
|
|
description = "Spring for GraphQL"
|
|
|
|
subprojects {
|
|
apply plugin: 'org.springframework.graphql.compiler'
|
|
apply plugin: 'org.springframework.graphql.deployment'
|
|
|
|
group = 'org.springframework.graphql'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
if (version.contains('-')) {
|
|
maven { url "https://repo.spring.io/milestone" }
|
|
}
|
|
if (version.endsWith('-SNAPSHOT')) {
|
|
maven { url "https://repo.spring.io/snapshot" }
|
|
}
|
|
}
|
|
}
|
|
|
|
configure(moduleProjects) {
|
|
apply plugin: 'java-library'
|
|
apply plugin: 'java-test-fixtures'
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(17)
|
|
}
|
|
}
|
|
|
|
pluginManager.withPlugin("kotlin") {
|
|
compileKotlin {
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
languageVersion = "1.7"
|
|
apiVersion = "1.7"
|
|
freeCompilerArgs = ["-Xjsr305=strict", "-Xsuppress-version-warnings", "-opt-in=kotlin.RequiresOptIn"]
|
|
allWarningsAsErrors = true
|
|
}
|
|
}
|
|
compileTestKotlin {
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
freeCompilerArgs = ["-Xjsr305=strict"]
|
|
}
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
dependencyManagement {
|
|
canBeConsumed = false
|
|
canBeResolved = false
|
|
visible = false
|
|
}
|
|
matching { it.name.endsWith("Classpath") }.all { it.extendsFrom(dependencyManagement) }
|
|
}
|
|
|
|
dependencies {
|
|
dependencyManagement(enforcedPlatform(dependencies.project(path: ":platform")))
|
|
}
|
|
|
|
ext.javadocLinks = [
|
|
"https://docs.oracle.com/en/java/javase/17/docs/api/",
|
|
"https://docs.spring.io/spring-framework/docs/6.0.x/javadoc-api/",
|
|
"https://javadoc.io/doc/com.graphql-java/graphql-java/19.2/"
|
|
] as String[]
|
|
|
|
components.java.withVariantsFromConfiguration(configurations.testFixturesApiElements) { skip() }
|
|
components.java.withVariantsFromConfiguration(configurations.testFixturesRuntimeElements) { skip() }
|
|
|
|
apply from: "${rootDir}/gradle/publishing.gradle"
|
|
}
|