buildscript {
    repositories {
        mavenCentral()
        maven {
            name = "aliyun"
            url "https://maven.aliyun.com/repository/public/"
        }
    }
    dependencies {
        // https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-gradle-plugin
        classpath "org.springframework.boot:spring-boot-gradle-plugin:2.7.18"
    }
}

plugins {
    id "idea"
    id "eclipse"
}

subprojects {
    apply plugin: "java"
    apply plugin: "idea"
    apply plugin: "eclipse-wtp"

    group = "com.publiccms"
    version = "V4.0.202406.e"

    test.enabled = false

    ext {
        // https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api
        // 5,6 for jakarta
        servletVersion = "4.0.1"
        // http://mvnrepository.com/artifact/org.springframework/spring-core
        // https://spring.io/projects/spring-framework
        // 6.0,6.1 for Java 17
        springVersion = "5.3.39"
        // https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web
        // https://spring.io/projects/spring-boot
        // 3.0,3.1 for Java 17
        springBootVersion = "2.7.18"
        // https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine
        junitVersion = "5.11.0"
        // http://mvnrepository.com/artifact/org.hibernate/hibernate-core
        // http://hibernate.org/orm/downloads/
        // 6 for jakarta
        hibernateVersion = "5.6.15.Final"
        // http://mvnrepository.com/artifact/org.hibernate/hibernate-tools
        // 6 for jakarta
        hibernateToolsVersion = "5.6.15.Final"
        // https://mvnrepository.com/artifact/org.hibernate.search/hibernate-search-mapper-orm
        // http://hibernate.org/search/downloads/
        hibernateSearchVersion = "6.2.4.Final"
        // https://mvnrepository.com/artifact/org.hibernate.validator/hibernate-validator
        // 6.1,7,8 for jakarta
        hibernateValidatorVersion = "6.0.23.Final"
        // https://mvnrepository.com/artifact/org.ehcache/ehcache
        ehcacheVersion = "3.10.8"
        // http://mvnrepository.com/artifact/org.mybatis/mybatis
        mybatisVersion = "3.5.16"
        // http://mvnrepository.com/artifact/org.mybatis/mybatis-spring
        // 3.0 for Java 17+
        mybatisSpringVersion = "2.1.2"
        // http://mvnrepository.com/artifact/org.mybatis.generator/mybatis-generator-core
        mybatisGenerator = "1.4.2"
        // https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper
        pageHelperVersion = "6.1.0"
        // https://mvnrepository.com/artifact/org.mybatis.dynamic-sql/mybatis-dynamic-sql
        dynamicSqlVersion = "1.5.2"
        // http://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
        jacksonVersion = "2.17.2"
        // http://mvnrepository.com/artifact/org.freemarker/freemarker
        freemarkerVersion = "2.3.33"
        // https://mvnrepository.com/artifact/org.apache.lucene/lucene-analyzers-smartcn
        luceneVersion = "8.11.2"
        // http://mvnrepository.com/artifact/redis.clients/jedis
        jedisVersion = "5.1.5"
        // http://mvnrepository.com/artifact/org.quartz-scheduler/quartz
        quartzVersion = "2.3.2"
        // https://mvnrepository.com/artifact/com.zaxxer/HikariCP
        // https://github.com/brettwooldridge/HikariCP
        // Java 11+ maven artifact: 5.0,5.1
        hikariCPVersion = "4.0.3"
        // https://mvnrepository.com/artifact/com.mysql/mysql-connector-j
        mysqlVersion = "9.0.0"
        // http://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient
        // http://hc.apache.org/downloads.cgi
        httpclientVersion = "4.5.14"
        // https://mvnrepository.com/artifact/fr.opensagres.xdocreport/fr.opensagres.poi.xwpf.converter.xhtml
        // 2.1.0 for Java 17+
        xhtmlConverterVersion = "2.0.6"
        // https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml
        poiVersion = "5.3.0"
        // http://mvnrepository.com/artifact/commons-fileupload/commons-fileupload
        fileuploadVersion = "1.5"
        // http://mvnrepository.com/artifact/org.apache.commons/commons-collections4
        collectionsVersion = "4.4"
        // http://mvnrepository.com/artifact/org.apache.commons/commons-lang3
        langVersion = "3.17.0"
        // http://mvnrepository.com/artifact/commons-io/commons-io
        ioVersion = "2.16.1"
        // https://mvnrepository.com/artifact/org.apache.commons/commons-text
        textVersion = "1.12.0"
        // https://mvnrepository.com/artifact/org.apache.commons/commons-compress
        compressVersion = "1.27.1"
        // http://mvnrepository.com/artifact/commons-codec/commons-codec
        codecVersion = "1.17.1"
        // https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core
        log4jVersion = "2.24.0"
        // https://mvnrepository.com/artifact/com.drewnoakes/metadata-extractor
        extractorVersion = "2.19.0"
        // https://mvnrepository.com/artifact/org.sejda.imageio/webp-imageio
        webpVersion = "0.1.6"
        // https://mvnrepository.com/artifact/net.ifok.image/image4j
        image4jVersion = "0.7.2"
        // https://mvnrepository.com/artifact/net.sf.cssbox/pdf2dom -->
        pdf2domVersion = "2.0.3"
        // https://mvnrepository.com/artifact/org.apache.pdfbox/jbig2-imageio
        jbig2Version = "3.0.4"
        // https://mvnrepository.com/artifact/com.github.bgalek.security.svg/safe-svg
        safeSvgVersion = "1.1.7"
        // http://mvnrepository.com/artifact/com.blueconic/browscap-java
        browscapVersion = "1.4.4"
        // https://mvnrepository.com/artifact/com.github.therapi/therapi-runtime-javadoc
        therapiJavadocVersion = "0.15.0"
        // https://mvnrepository.com/artifact/org.jsoup/jsoup
        jsoupVersion = "1.18.1"
        // https://mvnrepository.com/artifact/jakarta.annotation/jakarta.annotation-api
        annotationVersion = "1.3.5"
        // https://mvnrepository.com/artifact/jakarta.mail/jakarta.mail-api
        mailVersion = "1.6.7"
        // http://mvnrepository.com/artifact/javax.transaction/jta
        jtaVersion = "1.1"
        // https://mvnrepository.com/artifact/org.glassfish.jaxb/jaxb-runtime
        jaxbVersion = "2.3.1"
    }
    sourceCompatibility = 1.8
    targetCompatibility = 1.8

    compileJava {
        options.encoding = "UTF-8"
        options.compilerArgs << "-parameters"
    }

    repositories {
        mavenLocal()
        mavenCentral()
    }
    eclipse {
        wtp {
            facet {
                facet name: "jst.java", version: "1.8"
            }
        }
    }
}