/*
 *  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 'groovy'
    id 'java-library'
    id 'project-report'
    id 'org.apache.grails.gradle.grails-plugin'
    id 'org.apache.grails.buildsrc.publish'
    id 'org.apache.grails.buildsrc.sbom'
}

version = projectVersion
group = 'org.apache.grails'

ext {
    pomTitle = 'SiteMesh 3 Grails Plugin'
    pomDescription = 'SiteMesh is a web-page layout and decoration framework and web- application integration framework to aid in creating sites consisting of many pages for which a consistent look/feel, navigation and layout scheme is required.'
    pomDevelopers = [codeconsole: 'Scott Murphy Heiberg']
}

dependencies {

    implementation platform(project(':grails-bom'))
    api "org.sitemesh:spring-boot-starter-sitemesh"
    api project(':grails-web-gsp-taglib')

//    api project(':grails-web-gsp'), { // GrailsConventionGroovyPageLocator
//        // API dependencies in grails-web-gsp
//        //exclude group: 'org.apache.grails.views', module: 'grails-gsp-core' // DefaultGroovyPageLocator
//        exclude group: 'org.apache.grails.web', module: 'grails-web-common'
//        exclude group: 'org.apache.grails.web', module: 'grails-web-taglib'
//    }
//    api project(':grails-web-gsp-taglib'), { // GrailsConventionGroovyPageLocator
//        // API dependencies in grails-web-gsp-taglib
//        exclude group: 'org.apache.grails.web', module: 'grails-taglib'
//        //exclude group: 'org.apache.grails.web', module: 'grails-web-gsp' // DefaultGroovyPageLocator
//    }
//    api "org.sitemesh:sitemesh:$sitemeshVersion" // SiteMeshFilter
//    api 'org.springframework:spring-webmvc' // AbstractHandlerAdapter, ParameterizableViewController, AbstractHandlerMapping
//    api 'org.springframework.boot:spring-boot' // FilterRegistrationBean
//
//    implementation project(':grails-web-taglib'), { // TagLib, TagLibrary
//        // API dependencies in grails-web-taglib
//        exclude group: 'org.apache.grails.web', module: 'grails-taglib'
//        exclude group: 'org.apache.grails.web', module: 'grails-web-common'
//    }
//    implementation project(':grails-web-common'), { // WebUtils
//        // API dependencies in grails-web-common
//        exclude group: 'org.apache.groovy', module: 'groovy-templates'
//        exclude group: 'org.apache.grails', module: 'grails-core'
//        exclude group: 'org.apache.grails', module: 'grails-databinding'
//        exclude group: 'org.apache.grails', module: 'grails-encoder'
//        exclude group: 'org.springframework', module: 'spring-webmvc'
//        exclude group: 'org.springframework', module: 'spring-context-support'
//    }
//    implementation 'org.springframework:spring-beans' // Autowired, Qualifier
//    implementation 'org.springframework:spring-web' // HttpMethod, ResponseStatusException, HttpStatus
//
//    runtimeOnly "org.apache.grails:grails-codecs:$grailsVersion" // Registers CodecLookup bean
//    runtimeOnly "org.sitemesh:spring-boot-starter-sitemesh:$sitemeshVersion"
//
//    compileOnly 'jakarta.servlet:jakarta.servlet-api' // Provided by servlet container
//    compileOnly 'org.apache.groovy:groovy' // Provided by Grails Application

}

apply {
    // java-configuration must be applied first since tasks are now lazy registered
    from rootProject.layout.projectDirectory.file('gradle/java-config.gradle')
    from rootProject.layout.projectDirectory.file('gradle/code-style-config.gradle')
    from rootProject.layout.projectDirectory.file('gradle/docs-config.gradle')
    from rootProject.layout.projectDirectory.file('gradle/test-config.gradle')
    from rootProject.layout.projectDirectory.file('gradle/grails-extension-gradle-config.gradle')
}