/*
 *  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.
 */

buildscript {
	repositories {
		mavenCentral()
	}
	dependencies {
		classpath platform(project(":grails-bom"))
		classpath("org.springframework.boot:spring-boot-gradle-plugin")
	}
}

apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

dependencies {
	implementation platform(project(':grails-bom'))

	implementation 'org.springframework.boot:spring-boot-starter'
	implementation "org.springframework.boot:spring-boot-starter-web"
	implementation project(':grails-data-hibernate5-boot-plugin')
	implementation "org.hibernate:hibernate-core:$hibernateCoreVersion"
	implementation "org.hibernate:hibernate-ehcache:$hibernateCoreVersion", {
		// exclude javax variant of hibernate-core
		exclude group: 'org.hibernate', module: 'hibernate-core'
	}
	implementation "org.apache.grails:grails-core"
	implementation project(":gorm-graphql")
	//implementation 'org.codehaus.groovy:groovy-astbuilder:3.0.19'
	implementation 'jakarta.transaction:jakarta.transaction-api'
	implementation 'com.github.javaparser:javaparser-core'
	implementation "com.graphql-java:graphql-java:$graphqlJavaVersion"
	implementation 'junit:junit'
	runtimeOnly 'com.h2database:h2'
	runtimeOnly 'org.apache.tomcat:tomcat-jdbc'
	runtimeOnly "org.apache.tomcat.embed:tomcat-embed-logging-log4j"
	implementation 'jakarta.persistence:jakarta.persistence-api'

	runtimeOnly "javax.el:javax.el-api"
	runtimeOnly "org.glassfish:javax.el"

	testImplementation 'org.springframework.boot:spring-boot-starter-test'
	testImplementation 'org.spockframework:spock-core'
	testImplementation 'junit:junit'
}

tasks.withType(Test) {
	useJUnitPlatform()
}