Skip to content

Commit 4e17cd8

Browse files
committed
see 11/23 log
1 parent 408303f commit 4e17cd8

File tree

158 files changed

+3188
-2041
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+3188
-2041
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
* `19/11/22` [fix] Adapt the project for Gradle version of 6.0.
12
* `19/10/30` [add] Publish bus plugin v2.3. Publish api plugin v1.1.
23
* `19/10/24` [upd] Demo's UI.
34
* `19/10/22` [add] NotificationUtils.

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
3+
ConfigUtils.init(gradle)
34
repositories {
45
// use for debug plugin local
5-
if (Config.depConfig.plugin.bus.useLocal || Config.depConfig.plugin.api.useLocal) {
6+
if (Config.depConfig.plugin_bus.useLocal || Config.depConfig.plugin_api.useLocal) {
67
maven() {
78
url new File("maven")
89
}

buildApp.gradle

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ apply {
22
plugin "com.android.application"
33
plugin "kotlin-android"
44
plugin "kotlin-android-extensions"
5-
if (Config.depConfig.plugin.bus.isApply) {
6-
plugin "com.blankj.bus"
5+
if (Config.depConfig.plugin_bus.isApply) {
6+
plugin Config.depConfig.plugin_bus.pluginId
77
}
8-
if (Config.depConfig.plugin.api.isApply) {
9-
plugin "com.blankj.api"
8+
if (Config.depConfig.plugin_api.isApply) {
9+
plugin Config.depConfig.plugin_api.pluginId
1010
}
1111
}
1212

@@ -62,23 +62,20 @@ android {
6262

6363
dependencies {
6464
// LeakCanary
65-
debugImplementation Config.depConfig.leakcanary.android.dep
66-
debugImplementation Config.depConfig.leakcanary.support_fragment.dep
67-
releaseImplementation Config.depConfig.leakcanary.android_no_op.dep
65+
debugImplementation Config.depConfig.leakcanary_android.dep
66+
debugImplementation Config.depConfig.leakcanary_support_fragment.dep
67+
releaseImplementation Config.depConfig.leakcanary_android_no_op.dep
6868

69-
debugImplementation Config.depConfig.lib.utildebug.dep
70-
releaseImplementation Config.depConfig.lib.utildebug_no_op.dep
71-
72-
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:1.1.8'
73-
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-no-op:1.1.8'
69+
debugImplementation Config.depConfig.lib_utildebug.dep
70+
releaseImplementation Config.depConfig.lib_utildebug_no_op.dep
7471

7572
// 根据 Config.pkgConfig 来依赖所有 pkg
7673
for (def entrySet : ConfigUtils.getApplyPkgs().entrySet()) {
7774
api entrySet.value.dep
7875
}
7976

80-
if (Config.depConfig.feature.mock.isApply) {
81-
api Config.depConfig.feature.mock.dep
77+
if (Config.depConfig.feature_mock.isApply) {
78+
api Config.depConfig.feature_mock.dep
8279
}
8380
}
8481

buildLib.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ dependencies {
3838
api entrySet.value.dep
3939
}
4040
} else if (project.name == 'export') {
41-
api Config.depConfig.lib.common.dep
41+
api Config.depConfig.lib_common.dep
4242
}
4343
}

buildSrc/src/main/groovy/Config.groovy

Lines changed: 60 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -18,100 +18,70 @@ class Config {
1818
static versionName = '1.25.10-alpha5'// E.g. 1.9.72 => 1,009,072
1919

2020
// lib version
21-
static kotlin_version = '1.3.10'
21+
static kotlin_version = '1.3.50'
2222
static support_version = '28.0.0'
2323
static leakcanary_version = '1.6.3'
2424

25-
// appConfig 配置的是可以跑 app 的模块,git 提交务必只包含 launcher
26-
static appConfig = ['launcher']
27-
// pkgConfig 配置的是要依赖的功能包,为空则依赖全部,git 提交务必为空
28-
static pkgConfig = []
29-
3025
static depConfig = [
31-
plugin : [
32-
gradle : new DepConfig("com.android.tools.build:gradle:3.4.2"),
33-
kotlin : new DepConfig("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"),
34-
maven : new DepConfig("com.github.dcendents:android-maven-gradle-plugin:2.1"),// 上传到 maven
35-
bintray: new DepConfig("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"),// 上传到 bintray
36-
traute : new DepConfig("tech.harmonysoft:traute-gradle:1.1.10"),// 注解转非空判断
37-
38-
// 本地第一次上传插件新的版本需设置 useLocal = true, isApply = false
39-
// 本地上传成功之后 isApply = true 即可应用插件来调试,后续版本更新无需设置 isApply = false
40-
// 发布版本的话把 useLocal = false, isApply = false,更新版本号,发布成功后 isApply = true 即可使用远程库版本
41-
api : new DepConfig(false/*是否本地调试*/, "com.blankj:api-gradle-plugin:1.1", true/*是否使用插件*/),
42-
bus : new DepConfig(false/*是否本地调试*/, "com.blankj:bus-gradle-plugin:2.3", true/*是否使用插件*/),
43-
],
44-
45-
api_gradle_plugin: new DepConfig(":plugin:api-gradle-plugin", false),
46-
bus_gradle_plugin: new DepConfig(":plugin:bus-gradle-plugin", false),
47-
48-
feature : [
49-
mock : new DepConfig(":feature:mock"),
50-
51-
launcher: [
52-
app: new DepConfig(":feature:launcher:app")
53-
],
54-
55-
main : [
56-
app: new DepConfig(":feature:main:app"),
57-
pkg: new DepConfig(":feature:main:pkg"),
58-
],
59-
60-
subutil : [
61-
app : new DepConfig(":feature:subutil:app"),
62-
pkg : new DepConfig(":feature:subutil:pkg"),
63-
export: new DepConfig(":feature:subutil:export"),
64-
],
65-
66-
utilcode: [
67-
app : new DepConfig(":feature:utilcode:app"),
68-
pkg : new DepConfig(":feature:utilcode:pkg"),
69-
export: new DepConfig(":feature:utilcode:export"),
70-
],
71-
],
72-
73-
lib : [
74-
base : new DepConfig(":lib:base"),
75-
common : new DepConfig(":lib:common"),
76-
subutil : new DepConfig(":lib:subutil"),
77-
utilcode : new DepConfig(true/*是否本地调试*/, ":lib:utilcode", "com.blankj:utilcode:$versionName"),
78-
79-
utildebug : new DepConfig(true/*是否本地调试*/, ":lib:utildebug", "com.blankj:utildebug:$versionName"),
80-
utildebug_no_op: new DepConfig(true/*是否本地调试*/, ":lib:utildebug-no-op", "com.blankj:utildebug-no-op:$versionName"),
81-
],
82-
83-
support : [
84-
appcompat_v7: new DepConfig("com.android.support:appcompat-v7:$support_version"),
85-
design : new DepConfig("com.android.support:design:$support_version"),
86-
multidex : new DepConfig("com.android.support:multidex:1.0.2"),
87-
constraint : new DepConfig("com.android.support.constraint:constraint-layout:1.1.3"),
88-
],
89-
90-
kotlin : new DepConfig("org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"),
91-
92-
leakcanary : [
93-
android : new DepConfig("com.squareup.leakcanary:leakcanary-android:$leakcanary_version"),
94-
android_no_op : new DepConfig("com.squareup.leakcanary:leakcanary-android-no-op:$leakcanary_version"),
95-
support_fragment: new DepConfig("com.squareup.leakcanary:leakcanary-support-fragment:$leakcanary_version"),
96-
],
97-
98-
free_proguard : new DepConfig("com.blankj:free-proguard:1.0.1"),
99-
swipe_panel : new DepConfig("com.blankj:swipe-panel:1.2"),
100-
101-
gson : new DepConfig("com.google.code.gson:gson:2.8.6"),
102-
glide : new DepConfig("com.github.bumptech.glide:glide:4.7.1"),
103-
retrofit : new DepConfig("com.squareup.retrofit2:retrofit:2.4.0"),
104-
commons_io : new DepConfig("commons-io:commons-io:2.6"),
105-
eventbus : [
106-
lib : new DepConfig("org.greenrobot:eventbus:3.1.1"),
107-
processor: new DepConfig("org.greenrobot:eventbus-annotation-processor:3.0.1")
108-
],
109-
photo_view : new DepConfig("com.github.chrisbanes:PhotoView:2.0.0"),
110-
111-
test : [
112-
junit : new DepConfig("junit:junit:4.12"),
113-
robolectric: new DepConfig("org.robolectric:robolectric:4.2"),
114-
],
26+
/*Never delete this line*/
27+
/*Generated by "config.json"*/
28+
plugin_api_gradle_plugin : new DepConfig(false, true, ":plugin:api-gradle-plugin"),
29+
plugin_bus_gradle_plugin : new DepConfig(false, true, ":plugin:bus-gradle-plugin"),
30+
feature_mock : new DepConfig(false, true, ":feature:mock"),
31+
feature_launcher_app : new DepConfig(true, true, ":feature:launcher:app"),
32+
feature_main_app : new DepConfig(false, true, ":feature:main:app"),
33+
feature_main_pkg : new DepConfig(true, true, ":feature:main:pkg"),
34+
feature_subutil_app : new DepConfig(false, true, ":feature:subutil:app"),
35+
feature_subutil_pkg : new DepConfig(true, true, ":feature:subutil:pkg"),
36+
feature_subutil_export : new DepConfig(true, true, ":feature:subutil:export"),
37+
feature_utilcode_app : new DepConfig(false, true, ":feature:utilcode:app"),
38+
feature_utilcode_pkg : new DepConfig(true, true, ":feature:utilcode:pkg"),
39+
feature_utilcode_export : new DepConfig(true, true, ":feature:utilcode:export"),
40+
lib_base : new DepConfig(true, true, ":lib:base"),
41+
lib_common : new DepConfig(true, true, ":lib:common"),
42+
lib_subutil : new DepConfig(true, true, ":lib:subutil"),
43+
lib_utilcode : new DepConfig(true, true, ":lib:utilcode", "com.blankj:utilcode:1.25.10-alpha5"),
44+
lib_utildebug : new DepConfig(true, true, ":lib:utildebug", "com.blankj:utildebug:1.25.10-alpha5"),
45+
lib_utildebug_no_op : new DepConfig(true, true, ":lib:utildebug-no-op", "com.blankj:utildebug-no-op:1.25.10-alpha5"),
46+
/*Never delete this line*/
47+
plugin_gradle : new DepConfig(pluginPath: "com.android.tools.build:gradle:3.5.2"),
48+
plugin_kotlin : new DepConfig(pluginPath: "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"),
49+
plugin_maven : new DepConfig(pluginPath: "com.github.dcendents:android-maven-gradle-plugin:2.1", pluginId: "com.github.dcendents.android-maven"),// 上传到 maven
50+
plugin_bintray : new DepConfig(pluginPath: "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4", pluginId: "com.jfrog.bintray"),// 上传到 bintray
51+
plugin_traute : new DepConfig(pluginPath: "tech.harmonysoft:traute-gradle:1.1.10", pluginId: "tech.harmonysoft.oss.traute"),// 注解转非空判断
52+
53+
// 本地第一次上传插件新的版本需设置 useLocal = true, isApply = false
54+
// 本地上传成功之后 isApply = true 即可应用插件来调试,后续版本更新无需设置 isApply = false
55+
// 发布版本的话把 useLocal = false, isApply = false,更新版本号,发布成功后 isApply = true 即可使用远程库版本
56+
plugin_api : new DepConfig(isApply: true, useLocal: false, pluginPath: "com.blankj:api-gradle-plugin:1.1", pluginId: "com.blankj.api"),
57+
plugin_bus : new DepConfig(isApply: true, useLocal: false, pluginPath: "com.blankj:bus-gradle-plugin:2.3", pluginId: "com.blankj.bus"),
58+
59+
support_appcompat_v7 : new DepConfig("com.android.support:appcompat-v7:$support_version"),
60+
support_design : new DepConfig("com.android.support:design:$support_version"),
61+
support_multidex : new DepConfig("com.android.support:multidex:1.0.2"),
62+
support_constraint : new DepConfig("com.android.support.constraint:constraint-layout:1.1.3"),
63+
64+
kotlin : new DepConfig("org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"),
65+
66+
leakcanary_android : new DepConfig("com.squareup.leakcanary:leakcanary-android:$leakcanary_version"),
67+
leakcanary_android_no_op : new DepConfig("com.squareup.leakcanary:leakcanary-android-no-op:$leakcanary_version"),
68+
leakcanary_support_fragment: new DepConfig("com.squareup.leakcanary:leakcanary-support-fragment:$leakcanary_version"),
69+
70+
free_proguard : new DepConfig("com.blankj:free-proguard:1.0.1"),
71+
swipe_panel : new DepConfig("com.blankj:swipe-panel:1.2"),
72+
73+
gson : new DepConfig("com.google.code.gson:gson:2.8.6"),
74+
glide : new DepConfig("com.github.bumptech.glide:glide:4.7.1"),
75+
retrofit : new DepConfig("com.squareup.retrofit2:retrofit:2.4.0"),
76+
commons_io : new DepConfig("commons-io:commons-io:2.6"),
77+
78+
eventbus_lib : new DepConfig("org.greenrobot:eventbus:3.1.1"),
79+
eventbus_processor : new DepConfig("org.greenrobot:eventbus-annotation-processor:3.0.1"),
80+
81+
photo_view : new DepConfig("com.github.chrisbanes:PhotoView:2.0.0"),
82+
83+
test_junit : new DepConfig("junit:junit:4.12"),
84+
test_robolectric : new DepConfig("org.robolectric:robolectric:4.2"),
11585
]
11686
}
11787
//./gradlew clean :lib:utilcode:bintrayUpload

0 commit comments

Comments
 (0)