提交 e8f4c74c 编写于 作者: B Blankj

see 11/30 log

上级 240020b6
......@@ -13,12 +13,16 @@ apply {
configSigning()
configApkName()
bus {
onlyScanLibRegex = '^([:]|(com\\.blankj)).+$'
if (Config.depConfig.plugin_bus.isApply) {
bus {
onlyScanLibRegex = '^([:]|(com\\.blankj)).+$'
}
}
api {
onlyScanLibRegex = '^([:]|(com\\.blankj)).+$'
if (Config.depConfig.plugin_api.isApply) {
api {
onlyScanLibRegex = '^([:]|(com\\.blankj)).+$'
}
}
android {
......
......@@ -25,8 +25,8 @@ class Config {
static depConfig = [
/*Never delete this line*/
/*Generated by "config.json"*/
plugin_api_gradle_plugin : new DepConfig(false, true, ":plugin:api-gradle-plugin"),
plugin_bus_gradle_plugin : new DepConfig(false, true, ":plugin:bus-gradle-plugin"),
plugin_api_gradle_plugin : new DepConfig(true, true, ":plugin:api-gradle-plugin"),
plugin_bus_gradle_plugin : new DepConfig(true, true, ":plugin:bus-gradle-plugin"),
feature_mock : new DepConfig(false, true, ":feature:mock"),
feature_launcher_app : new DepConfig(true, true, ":feature:launcher:app"),
feature_main_app : new DepConfig(false, true, ":feature:main:app"),
......@@ -44,17 +44,17 @@ class Config {
lib_utildebug : new DepConfig(true, true, ":lib:utildebug", "com.blankj:utildebug:1.25.10-alpha5"),
lib_utildebug_no_op : new DepConfig(true, true, ":lib:utildebug-no-op", "com.blankj:utildebug-no-op:1.25.10-alpha5"),
/*Never delete this line*/
plugin_gradle : new DepConfig(pluginPath: "com.android.tools.build:gradle:3.4.2"),
plugin_gradle : new DepConfig(pluginPath: "com.android.tools.build:gradle:3.5.2"),
plugin_kotlin : new DepConfig(pluginPath: "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"),
plugin_maven : new DepConfig(pluginPath: "com.github.dcendents:android-maven-gradle-plugin:2.1", pluginId: "com.github.dcendents.android-maven"),// 上传到 maven
plugin_bintray : new DepConfig(pluginPath: "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4", pluginId: "com.jfrog.bintray"),// 上传到 bintray
plugin_traute : new DepConfig(pluginPath: "tech.harmonysoft:traute-gradle:1.1.10", pluginId: "tech.harmonysoft.oss.traute"),// 注解转非空判断
// 本地第一次上传插件新的版本需设置 useLocal = true, isApply = false
// 本地第一次上传插件新的版本需设置 isApply = false, useLocal = true
// 本地上传成功之后 isApply = true 即可应用插件来调试,后续版本更新无需设置 isApply = false
// 发布版本的话把 useLocal = false, isApply = false,更新版本号,发布成功后 isApply = true 即可使用远程库版本
plugin_api : new DepConfig(isApply: true, useLocal: false, pluginPath: "com.blankj:api-gradle-plugin:1.1", pluginId: "com.blankj.api"),
plugin_bus : new DepConfig(isApply: true, useLocal: false, pluginPath: "com.blankj:bus-gradle-plugin:2.3", pluginId: "com.blankj.bus"),
// 发布版本的话把 isApply = false, useLocal = false,更新版本号,发布成功后 isApply = true 即可使用远程库版本
plugin_api : new DepConfig(isApply: true, useLocal: false, pluginPath: "com.blankj:api-gradle-plugin:1.2", pluginId: "com.blankj.api"),
plugin_bus : new DepConfig(isApply: false, useLocal: false, pluginPath: "com.blankj:bus-gradle-plugin:2.4", pluginId: "com.blankj.bus"),
support_appcompat_v7 : new DepConfig("com.android.support:appcompat-v7:$support_version"),
support_design : new DepConfig("com.android.support:design:$support_version"),
......
......@@ -74,7 +74,7 @@ class ConfigUtils {
static getApplyPlugins() {
def plugins = [:]
for (Map.Entry<String, DepConfig> entry : Config.depConfig.entrySet()) {
if (entry.value.isApply && entry.key.startsWith("plugin_")) {
if (entry.value.isApply && entry.value.pluginPath != null) {
plugins.put(entry.key, entry.value)
}
}
......
......@@ -50,6 +50,11 @@ class DepConfig {
this.remotePath = remotePath
}
void setPluginPath(String pluginPath){
this.pluginPath = pluginPath
this.remotePath = pluginPath
}
String getPath() {
if (pluginPath != null) return pluginPath
return useLocal ? localPath : remotePath
......
......@@ -5,8 +5,8 @@
"pkgConfig": [],
"proConfigDesc": "proConfig 配置的是使用本地还是仓库,优先级低于 appConfig 和 pkgConfig",
"proConfig": [
{"isApply": false, "useLocal": true, "localPath": ":plugin:api-gradle-plugin"},
{"isApply": false, "useLocal": true, "localPath": ":plugin:bus-gradle-plugin"},
{"isApply": true, "useLocal": true, "localPath": ":plugin:api-gradle-plugin"},
{"isApply": true, "useLocal": true, "localPath": ":plugin:bus-gradle-plugin"},
{"isApply": true, "useLocal": true, "localPath": ":feature:mock"},
{"isApply": true, "useLocal": true, "localPath": ":feature:launcher:app"},
{"isApply": true, "useLocal": true, "localPath": ":feature:main:app"},
......
......@@ -40,4 +40,5 @@ public class BaseTest {
@Test
public void test() throws Exception {
}
}
\ No newline at end of file
# Change Log
## v1.2
去除 gradle 版本依赖的问题
## v1.1(2019/10/30)
新增 onlyScanLibRegex, jumpScanLibRegex 的 DSL
......
......@@ -28,7 +28,7 @@
buildscript {
dependencies {
...
classpath 'com.blankj:api-gradle-plugin:1.1'
classpath 'com.blankj:api-gradle-plugin:1.2'
}
}
```
......
......@@ -24,7 +24,7 @@ gradlePlugin {
}
dependencies {
implementation Config.depConfig.plugin_gradle.dep
compileOnly Config.depConfig.plugin_gradle.dep
implementation Config.depConfig.commons_io.dep
implementation gradleApi()
implementation localGroovy()
......
# Change Log
## v2.4
去除 gradle 版本依赖的问题
## v2.3
新增 onlyScanLibRegex, jumpScanLibRegex 的 DSL
......
......@@ -19,7 +19,7 @@
buildscript {
dependencies {
...
classpath 'com.blankj:bus-gradle-plugin:2.3'
classpath 'com.blankj:bus-gradle-plugin:2.4'
}
}
```
......
......@@ -24,7 +24,7 @@ gradlePlugin {
}
dependencies {
implementation Config.depConfig.plugin_gradle.dep
compileOnly Config.depConfig.plugin_gradle.dep
implementation Config.depConfig.commons_io.dep
implementation gradleApi()
implementation localGroovy()
......
......@@ -12,7 +12,7 @@ class BusPlugin implements Plugin<Project> {
void apply(Project project) {
if (project.plugins.hasPlugin(AppPlugin)) {
LogUtils.init(project)
LogUtils.l('project(' + project.toString() + ') apply api gradle plugin!')
LogUtils.l('project(' + project.toString() + ') apply bus gradle plugin!')
project.extensions.create(Config.EXT_NAME, BusExtension)
def android = project.extensions.getByType(AppExtension)
android.registerTransform(new BusTransform(project))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册