<NME> build.gradle
<BEF> // Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    apply from: "config.gradle"
    def runType = rootProject.ext.publish_config["run_type"]
    def dokitPluginVersion = rootProject.ext.publish_config["version"]

    def kotlinVersion
    if (needKotlinV14()) {
        kotlinVersion = rootProject.ext.android["kotlin_version_v14"]
    } else {
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
        classpath 'com.novoda:bintray-release:0.9.1'
        classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:1.0.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        google()
        mavenCentral()
        jcenter()
        maven {
            url "https://oss.sonatype.org/content/groups/public"
        }

        println("[dokit build] add buildscript private repositories")
        println("[dokit build] usePrivateEnv=" + usePrivateEnv() +",privateRepository="+ privateRepository())
        println("[dokit build] useLocalRepository="+useLocalRepository()+",localRepository="+localRepository() )

        if (usePrivateEnv()){
            maven {
                url privateRepository()
            }
        }
        if (useLocalRepository()){
            maven {
                url uri(localRepository())
            }
        }

    }
    dependencies {
        classpath "com.android.tools.build:gradle:$gradlePluginVersion"

        // MavenCentral
        classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.4.30"
        if (runType == 1) {
            classpath "io.github.didi.dokit:dokitx-plugin:$dokitPluginVersion"
        }
//        classpath "com.didiglobal.booster:booster-task-compression-pngquant:${rootProject.ext.android["booster_version"]}"

        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
//        classpath "com.didiglobal.booster:booster-gradle-plugin:3.3.1"
//        classpath "com.didiglobal.booster:booster-task-analyser:3.3.1"
    }

}

apply from: "./config.gradle"

allprojects {
    def isRootProject = "Dokit-Android".equals(project.name)
    repositories {
        google()
        mavenCentral()
        jcenter()
        maven {
            url "https://oss.sonatype.org/content/groups/public"
        }

        println("[dokit build] add allprojects repositories config project=" + project.name)
        println("[dokit build] usePrivateEnv=" + usePrivateEnv() + ",privateRepository=" + privateRepository())
        println("[dokit build] useLocalRepository=" + useLocalRepository() + ",localRepository=" + localRepository())

        if (usePrivateEnv()) {
            maven {
                url privateRepository()
            }
        }

        if (useLocalRepository()){
            maven {
                url uri(localRepository())
            }
        }
    }
}

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

/**
 * 删除指定目录下的文件
 */
task deleteSource(type: Delete) {
    doFirst {
        println("path===>${project.rootDir}")
        println("===delete Plugin Source start===")
    }
    followSymlinks = true
    delete "${project.rootDir}/dokit-plugin/src/main/kotlin"
    doLast {
        println("===delete Plugin Source end===")
    }
}

/**
 * 将buildSrc中的代码同步到doraemonkit-plugin中
 */
task copyPluginSource(type: Copy, dependsOn: deleteSource) {
    doFirst {
        println("===copy Plugin Source start===")
    }

    from "${project.rootDir}/buildSrc/src/main/kotlin"
    into "${project.rootDir}/dokit-plugin/src/main/kotlin"
    include('**/*')

    doLast {
        println("===copy Plugin Source end===")
    }
}

/**
 * 打包上传配置检查
 */
task checkUploadConfig4Maven() {
    doLast {
        if (rootProject.ext.publish_config["archives_type"] != 2) {
            throw new RuntimeException("执行当前打包上传任务必须修改config.gradle配置中的archives_type = 2。")
        }

        //仓库检查
        def repositories = new ArrayList<String>()

        rootProject.repositories.forEach {
            if (it instanceof MavenArtifactRepository) {
                repositories.add((it as MavenArtifactRepository).url.toString())
            }
        }

        //相关模块检查
        def modules = new ArrayList<String>()

        rootProject.allprojects.forEach {
            modules.add(it.name)
        }

//        if (!modules.contains("dokit-rpc")) {
//            throw new RuntimeException("未找到dokit-rpc module。。。")
//        }
//
//        if (!modules.contains("dokit-rpc-mc")) {
//            throw new RuntimeException("未找到dokit-rpc-mc module。。。")
//        }

        if (!modules.contains("dokit-plugin")) {
            throw new RuntimeException("未找到dokit-plugin module。。。")
        }
    }
}

task checkUploadConfig4Local() {
    doLast {
        //配置检查
        if (rootProject.ext.publish_config["archives_type"] != 0) {
            throw new RuntimeException("执行当前打包上传任务必须修改config.gradle配置中的archives_type = 0。")
        }
        //仓库检查
        def repositories = new ArrayList<String>()

        rootProject.repositories.forEach {
            if (it instanceof MavenArtifactRepository) {
                repositories.add((it as MavenArtifactRepository).url.toString())
            }
        }

        //相关模块检查
        def modules = new ArrayList<String>()

        rootProject.allprojects.forEach {
            modules.add(it.name)
        }

//        if (!modules.contains("dokit-rpc")) {
//            throw new RuntimeException("未找到dokit-rpc module。。。")
//        }
//
//        if (!modules.contains("dokit-rpc-mc")) {
//            throw new RuntimeException("未找到dokit-rpc-mc module。。。")
//        }

        if (!modules.contains("dokit-plugin")) {
            throw new RuntimeException("未找到dokit-plugin module。。。")
        }
    }
}

task checkUploadConfig4Didi() {
    doLast {
        if (rootProject.ext.publish_config["archives_type"] != 1) {
            throw new RuntimeException("执行当前打包上传任务必须修改config.gradle配置中的archives_type = 1。")
        }
        //仓库检查
        def repositories = new ArrayList<String>()

        rootProject.repositories.forEach {
            if (it instanceof MavenArtifactRepository) {
                repositories.add((it as MavenArtifactRepository).url.toString())
            }
        }

        //相关模块检查
        def modules = new ArrayList<String>()

        rootProject.allprojects.forEach {
            modules.add(it.name)
        }

//        if (!modules.contains("dokit-rpc")) {
//            throw new RuntimeException("未找到dokit-rpc module。。。")
//        }
//
//        if (!modules.contains("dokit-rpc-mc")) {
//            throw new RuntimeException("未找到dokit-rpc-mc module。。。")
//        }

        if (!modules.contains("dokit-plugin")) {
            throw new RuntimeException("未找到dokit-plugin module。。。")
        }
    }
}




<MSG> modify:
1、压缩健康体检的图片大小

<DFF> @@ -12,7 +12,7 @@ buildscript {
     }
     dependencies {
         classpath 'com.android.tools.build:gradle:3.5.3'
-        classpath 'com.novoda:bintray-release:0.9.1'
+        classpath 'com.novoda:bintray-release:0.9.2'
         classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:1.0.0'
         // NOTE: Do not place your application dependencies here; they belong
         // in the individual module build.gradle files

{'addition_count': 1, 'commit_subject': 'modify: 1、压缩健康体检的图片大小', 'deletion_count': 1, 'file_extension': '.gradle', 'lang': 'gradle', 'license': 'apache-2.0', 'repo_name': 'didi/DoraemonKit'}