plugins {
    id 'org.springframework.boot' version '2.6.13'
    id 'io.spring.dependency-management' version '1.0.15.RELEASE'
    id 'java'
}

group = 'com.corewing'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'

configurations {
    compileOnly {
        extendsFrom annotationProcessor
    }
}

repositories {
    mavenCentral()
}

dependencyManagement {
    imports {
        mavenBom "com.baomidou:mybatis-plus-bom:3.5.14"
    }
}
dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'      // Spring Data JDBC
    implementation 'org.springframework.boot:spring-boot-starter-data-redis'     // Redis 缓存
    implementation 'org.springframework.boot:spring-boot-starter-jdbc'           // JDBC 支持
    implementation 'org.springframework.boot:spring-boot-starter-web'            // Web MVC
    implementation 'org.springframework.boot:spring-boot-starter-validation'     // 参数校验
    implementation 'org.springframework.boot:spring-boot-starter-mail'           // 邮件发送
    implementation 'com.baomidou:mybatis-plus-boot-starter'                      // MyBatis Plus
    implementation 'com.baomidou:mybatis-plus-generator'                         // 代码生成器
    implementation("com.baomidou:mybatis-plus-jsqlparser")                       // SQL 解析器
    implementation 'cn.dev33:sa-token-spring-boot-starter:1.44.0'                // 权限认证
    implementation 'com.alibaba:druid-spring-boot-starter:1.2.27'                // 数据库连接池
    implementation 'org.lionsoul:ip2region:2.7.0'                                // IP 归属地
    compileOnly 'org.projectlombok:lombok'                                       // Lombok
    developmentOnly 'org.springframework.boot:spring-boot-devtools'              // 热重载
    runtimeOnly 'com.mysql:mysql-connector-j'                                    // MySQL 驱动
    annotationProcessor 'org.projectlombok:lombok'                               // Lombok 注解处理
    testImplementation 'org.springframework.boot:spring-boot-starter-test'       // 测试框架
    implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'      // thymeleaf模版引擎
}

tasks.named('test') {
    useJUnitPlatform()
}
