buildscript {
    repositories {
        mavenCentral()
        maven {
           url = 'https://repo.grails.org/grails/restricted'
        }
    }
    dependencies { // Not Published to Gradle Plugin Portal
        classpath "cloud.wondrify:asset-pipeline-gradle"
        classpath platform("org.apache.grails:grails-bom:$grailsVersion")
        classpath "org.apache.grails:grails-data-hibernate5"
        classpath "org.apache.grails:grails-data-hibernate5-dbmigration"
        classpath "org.apache.grails:grails-gradle-plugins"
    }
}

plugins {
    id "war"
    id "idea"
    id "eclipse"
}

// Not Published to Gradle Plugin Portal
apply plugin: "org.apache.grails.gradle.grails-web"
apply plugin: "org.apache.grails.gradle.grails-gsp"
apply plugin: "cloud.wondrify.asset-pipeline"

group = "com.flowkraft"

repositories {
    mavenCentral()
    maven {
       url = 'https://repo.grails.org/grails/restricted'
    }
}

dependencies {
    profile "org.apache.grails.profiles:web"
    developmentOnly "org.springframework.boot:spring-boot-devtools" // Spring Boot DevTools may cause performance slowdowns or compatibility issues on larger applications
    testAndDevelopmentOnly "org.webjars.npm:bootstrap"
    testAndDevelopmentOnly "org.webjars.npm:bootstrap-icons"
    testAndDevelopmentOnly "org.webjars.npm:jquery"
    implementation platform("org.apache.grails:grails-bom:$grailsVersion")
    implementation "org.apache.grails:grails-core"
    implementation "org.apache.grails:grails-data-hibernate5"
    implementation "org.apache.grails:grails-data-hibernate5-dbmigration"
    implementation "org.apache.grails:grails-databinding"
    implementation "org.apache.grails:grails-events"
    implementation "org.apache.grails:grails-gsp"
    implementation "org.apache.grails:grails-interceptors"
    implementation "org.apache.grails:grails-layout"
    implementation "org.apache.grails:grails-logging"
    implementation "org.apache.grails:grails-quartz:4.0.0"
    implementation "org.apache.grails:grails-rest-transforms"
    implementation "org.apache.grails:grails-scaffolding"
    implementation "org.apache.grails:grails-services"
    implementation "org.apache.grails:grails-url-mappings"
    implementation "org.apache.grails:grails-views-gson"
    implementation "org.apache.grails:grails-web-boot"
    implementation "org.hibernate.validator:hibernate-validator"
    implementation "org.springframework.boot:spring-boot-autoconfigure"
    implementation "org.springframework.boot:spring-boot-starter"
    implementation "org.springframework.boot:spring-boot-starter-actuator"
    implementation "org.springframework.boot:spring-boot-starter-logging"
    implementation "org.springframework.boot:spring-boot-starter-tomcat"
    implementation "org.springframework.boot:spring-boot-starter-validation"
    implementation "org.webjars:webjars-locator-core"
    console "org.apache.grails:grails-console"
    runtimeOnly "cloud.wondrify:asset-pipeline-grails"
    runtimeOnly "com.mysql:mysql-connector-j"
    runtimeOnly "com.zaxxer:HikariCP"
    runtimeOnly "org.fusesource.jansi:jansi"
    testImplementation "org.apache.grails:grails-testing-support-datamapping"
    testImplementation "org.apache.grails:grails-testing-support-views-gson"
    testImplementation "org.apache.grails:grails-testing-support-web"
    testImplementation "org.junit.jupiter:junit-jupiter"
    testImplementation "org.testcontainers:junit-jupiter"
    testImplementation "org.testcontainers:mysql"
    testImplementation "org.testcontainers:testcontainers"

    //my own
    implementation "org.xerial:sqlite-jdbc:3.51.0.0"
    implementation "com.github.gwenn:sqlite-dialect:0.1.4"
    implementation "org.liquibase:liquibase-core:4.31.1"
    implementation("org.liquibase:liquibase-groovy-dsl:4.0.1") {
        exclude group: 'org.codehaus.groovy'
    }
}

compileJava.options.release = 17


assets {
    excludes = [
            'webjars/jquery/**',
            'webjars/bootstrap/**',
            'webjars/bootstrap-icons/**'
    ]
    includes = [
            'webjars/jquery/*/dist/jquery.js',
            'webjars/bootstrap/*/dist/js/bootstrap.bundle.js',
            'webjars/bootstrap/*/dist/css/bootstrap.css',
            'webjars/bootstrap-icons/*/font/bootstrap-icons.css',
            'webjars/bootstrap-icons/*/font/fonts/*',
    ]
}

