

allprojects {

    ext {
        querydslVersion = "5.0.0"
        tokenVersion = "3.0.0"
    }
    repositories {
        mavenLocal()
        maven {url 'https://maven.aliyun.com/repository/public/'}
        maven { url 'https://jitpack.io' }
        maven { url "https://kotlin.bintray.com/kotlinx" }
    }

    tasks.withType(JavaCompile) {
        options.encoding = "UTF-8"
    }

}


subprojects {


    group 'com.wallet'
    version "$tokenVersion"

    apply plugin: 'java'
    apply plugin: 'kotlin'
    apply plugin: 'idea'
    apply plugin: 'org.springframework.boot'
    apply plugin: "io.spring.dependency-management"

    sourceCompatibility = 1.8

    compileKotlin {
        kotlinOptions.jvmTarget = "1.8"
    }
    compileTestKotlin {
        kotlinOptions.jvmTarget = "1.8"
    }

    tasks.withType(JavaCompile) {
        options.encoding = "UTF-8"
    }


//    dependencyManagement {
//        imports {
//            mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Dalston.RELEASE'
//        }
//    }


    dependencies {
        compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
        compile "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
        compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
        compile "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3"
        compile "org.springframework.boot:spring-boot-starter-web:$springBootVersion"
        compile "org.springframework.boot:spring-boot-starter-cache:$springBootVersion"
        compile "org.springframework.boot:spring-boot-starter-data-jpa:$springBootVersion"
        compile 'com.zaxxer:HikariCP:5.0.1'
        compile 'mysql:mysql-connector-java:5.1.40'
//        compile "org.springframework.boot:spring-boot-devtools:$springBootVersion"
        compile 'org.apache.commons:commons-lang3:3.8.1'
        compileOnly 'org.projectlombok:lombok:1.18.6'
        compile 'commons-beanutils:commons-beanutils:1.9.4'
//        compile "org.springframework.boot:spring-boot-starter-data-redis:$springBootVersion"
        compile 'org.web3j:core:4.2.0'
        compile 'wf.bitcoin:bitcoin-rpc-client:1.1.0'
//        compile 'com.github.EOSEssentials:eos-java-rpc-wrapper:master'

        // API Doc Generator: Swagger
        compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.6.1'
        compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.6.1'
        compile "org.springframework.boot:spring-boot-starter-amqp:$springBootVersion"
        compile 'com.github.ben-manes.caffeine:caffeine:3.1.8'
        compile 'com.github.sealedtx:bitcoin-cash-converter:1.0'
        compile 'com.xuxueli:xxl-job-core:2.4.0'
        //ALI SDK
//        compile 'com.aliyun:aliyun-java-sdk-core:4.0.3'
//        //AWS SDK
//        compile("net.minidev:json-smart:2.2.1")
//        compile("com.amazonaws:aws-java-sdk:1.11.401") {
//            exclude module: "net.minidev"
//            compile group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1'
//        }
        compile 'com.github.TraderGalax:tokencore:1.2.7'
        testCompile "org.springframework.boot:spring-boot-starter-test:$springBootVersion"

    }
//    configurations{
//        compileJava.exclude module: 'spring-boot-starter-tomcat'
//    }
//    task "create-dirs" << {
//        sourceSets*.java.srcDirs*.each{
//            it.mkdirs()
//        }
//        sourceSets*.kotlin.srcDirs*.each{
//            it.mkdirs()
//        }
//        sourceSets*.resources.srcDirs*.each{
//            it.mkdirs()
//        }
//    }
}

buildscript {

    ext.kotlinVersion = '1.9.10'
    ext.springBootVersion = '3.1.3'

    repositories {
        maven {url 'https://maven.aliyun.com/repository/public/'}
        mavenLocal()
        mavenCentral()
    }
    dependencies {
        classpath "io.spring.gradle:dependency-management-plugin:1.0.3.RELEASE"
        classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
    }
}
