// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: 'rubik'

buildscript {
    ext {
        rubik_tmp_lib_dir = uri('./rubik_libs_repository').path // default:./rubik_libs
//        rubik_tmp_lib_dir_mode = false  // default: false

        rubik_maven_repository = "http://my.maven/repository/releases/"
        rubik_maven_username = "admin" // simple
        rubik_maven_password = "123" // simple
        rubik_maven_local_repository = uri('./rubik_maven_local_repository').path

//        rubik_use_reset_compiler = false // default: true

//        rubik_publish_context_lib_source = true // default: true

//        rubik_kapt_version = "com.rubik:kapt:xxx"   //  @see version.gradle in this demo
//        rubik_router_version = "com.rubik:router:xxx"   //  @see version.gradle in this demo
//        rubik_plugins_version = "com.rubik:plugins:xxx"   //  @see version.gradle in this demo

//        rubik_kapt_source_folder = "generated/source/kaptKotlin"

//        rubik_clean_before_task = false  // default: true

        rubik_auto_generate_aggregate = true   // default: false

        rubik_generate_aggregate_in_build_dir = false  // default: true
//                           only usable when rubik_auto_generate_aggregate = true

        rubik_aggregate_kdoc_add_user_add_time = false   // default: true

        rubik_auto_generate_component_id = true  // default: false

        rubik_generate_router_context = true   // default: false

//        rubik_extension_name = "rk"

//        rubik_auto_apply_shell_plugin = false   // default: true

        rubik_config_file_dirs = [uri('./demo').path]

//        rubik_github_maven_repository = "https://maven.pkg.github.com/baidu/rubik/"
//        rubik_github_maven_username = "myname"
//        rubik_github_maven_password = "123"

//        rubik_enable_check_router_version = true // default: false

//        rubik_enable_check_context_version = true // default: false

//        rubik_check_context_lib_tasks_state = false // default: true

//        rubik_context_packing_compile_only = false // default: true

//        rubik_auto_fill_flavor = false // default: true

//        rubik_strict_touching_and_packing = false // default: true

        rubik_except_component_build_types = ['debug']

        rubik_except_component_flavors = ['company2']

        rubik_remove_project_when_publish_context_libs = false // default: true

        rubik_publication_record_files_dir = uri('./rubik_libs_repository').path

//        rubik_auto_update_publication_record = false //  default: true
//
//        rubik_auto_use_publication_record = false //  default: true

        rubik_publication_record_history_max_size = 15 // default: 10

        rubik_on_route_method_max_size = 15 // default: 100

//        rubik_sync_code_enable = false  //  default: true
//
//        rubik_auto_generate_settings = false  //  default: true

        rubik_log_level = 1 // 1:all logs , 2:default , 3:least logs

        rubik_write_log_to_file = false

//        rubik_ignore_value_annotations = ["com.google.gson.annotations.SerializedName"]

    }

    apply from: 'version-adapter.gradle'
    apply from: 'versions.gradle'

    addRepos(repositories)

    dependencies {
        classpath "com.android.tools.build:gradle:$agbt_version"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        classpath rubik_plugins_version
    }
}

allprojects {
    addRepos(repositories)
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
