/*
 *  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-gradle-plugin'
}

Properties versions = new Properties()
file('../gradle.properties').withInputStream {
    versions.load(it)
}

repositories {
    mavenCentral()
    maven { url = 'https://repo.grails.org/grails/restricted' }
    maven {
        url = 'https://repository.apache.org/content/groups/snapshots'
        content {
            includeVersionByRegex('org[.]apache[.]((grails)|(groovy)).*', '.*','.*SNAPSHOT')
        }
    }
    maven {
        url = 'https://repository.apache.org/content/groups/staging'
        content {
            includeGroupByRegex('org[.]apache[.]grails.*')
        }
    }
    maven {
        url = 'https://central.sonatype.com/repository/maven-snapshots'
        content {
            includeVersionByRegex('cloud[.]wondrify', '.*', '.*-SNAPSHOT')
        }
    }
}

dependencies {
    implementation platform("org.apache.grails:grails-gradle-bom:${versions.get('grailsVersion')}")
    implementation "org.asciidoctor:asciidoctor-gradle-jvm:${versions.get('asciidoctorGradlePluginVersion')}"
    implementation 'cloud.wondrify:asset-pipeline-gradle'
    implementation 'org.apache.grails.gradle:grails-publish'
    implementation 'org.apache.grails:grails-gradle-plugins'
    implementation "org.nosphere.apache.rat:org.nosphere.apache.rat.gradle.plugin:${versions.get('ratVersion')}"
    implementation "org.gradle.crypto.checksum:org.gradle.crypto.checksum.gradle.plugin:${versions.get('gradleCryptoChecksumVersion')}"
    implementation 'org.apache.grails:grails-docs-core'
}
