//  version for dependency local
ext.router_dep = "1.10.0.0"
ext.kapt_dep = "1.10.0.0"
ext.plugins_dep = "1.10.0.0"
ext.annotations_dep = "1.10.0.0"

//  version for publish
ext.router_pub = "1.10.0.0"
ext.kapt_pub = "1.10.0.0"
ext.plugins_pub = "1.10.0.0"
ext.annotations_pub = "1.10.0.0"

// version for dependency
ext.blueprint = "5.1.12"
ext.knt_x = "0.0.67"
ext.knt_gradle = "0.1.1"
ext.synccode = "0.0.8"

ext.pubs = [:]
ext.deps = [:]

def rubikPubs = [:]
rubikPubs.router = router_pub + kotlin_version_suffix + local_version_suffix
rubikPubs.kapt = kapt_pub + kotlin_version_suffix + local_version_suffix
rubikPubs.plugins = plugins_pub + agbt_version_suffix + kotlin_version_suffix + local_version_suffix
//rubikPubs.context = plugins_pub + kotlin_version_suffix + local_version_suffix
rubikPubs.annotations = annotations_pub + local_version_suffix
pubs.rubik = rubikPubs

def rubikDeps = [:]
rubikDeps.router = "com.rubik:router:" + router_dep + kotlin_version_suffix + local_version_suffix
rubikDeps.kapt = "com.rubik:kapt:" + kapt_dep + kotlin_version_suffix + local_version_suffix
rubikDeps.plugins = "com.rubik:plugins:" + plugins_dep + agbt_version_suffix + kotlin_version_suffix + local_version_suffix
rubikDeps.annotations = "com.rubik:annotations:" + annotations_dep + local_version_suffix
deps.rubik = rubikDeps

def synccodeDeps = [:]
synccodeDeps.syncer = "com.synccode:syncer:" + synccode + kotlin_version_suffix
deps.synccode = synccodeDeps


def kotlinDeps = [:]
kotlinDeps.blueprint = "com.kotlin:blueprint:" + blueprint + kotlin_version_suffix
deps.kotlin = kotlinDeps

def ktnailDeps = [:]
ktnailDeps.x = "com.ktnail:x:" + knt_x + kotlin_version_suffix
ktnailDeps.gradle = "com.ktnail:gradle:" + knt_gradle + agbt_version_suffix + kotlin_version_suffix
deps.ktnail = ktnailDeps


ext.rubik_kapt_version = deps.rubik.kapt
ext.rubik_router_version = deps.rubik.router
ext.rubik_plugins_version = deps.rubik.plugins

def addRepos(RepositoryHandler handler) {
    handler.maven {
        url uri(rubik_maven_local_repository)
        allowInsecureProtocol = true
    }
    handler.maven {
        url 'http://maven.aliyun.com/nexus/content/groups/public/'
        allowInsecureProtocol = true
    }
//    handler.maven { url rubik_github_maven_repository }
    handler.google()
    handler.jcenter()
    handler.mavenCentral()
}

ext.addRepos = this.&addRepos