apply {
    plugin "groovy"
    plugin "java-gradle-plugin"
}

gradlePlugin {
    plugins {
        apiPlugin {
            id = 'com.blankj.api'
            implementationClass = 'com.blankj.api.ApiPlugin'
        }
    }
}

dependencies {
    compileOnly Config.depConfig.plugin_gradle.dep
    implementation Config.depConfig.commons_io.dep
    implementation Config.depConfig.plugin_lib_base_transform.dep
    implementation gradleApi()
    implementation localGroovy()

    testImplementation Config.depConfig.test_junit.dep
    testImplementation Config.depConfig.plugin_gradle.dep
}

sourceSets {
    main {
        groovy {
            srcDirs += 'src/main/java'
        }
    }
}

apply from: "${rootDir.path}/gradle/publish.gradle"
publish {
    name = "ApiPlugin"
    groupId = Config.depConfig.plugin_api.groupId
    artifactId = Config.depConfig.plugin_api.artifactId
    version = Config.depConfig.plugin_api.version
    website = "https://github.com/Blankj/AndroidUtilCode"
}

//./gradlew clean :plugin_api-gradle-plugin:mavenLocal     // 上传到本地 mavenLocal
//./gradlew clean :plugin_api-gradle-plugin:bintrayUpload  // 上传到 jcenter
