Skip to content

Commit

Permalink
1.0.4 调整gradle插件版本3.1,优化调试log格式,解决多task下makeproject编译问题
Browse files Browse the repository at this point in the history
  • Loading branch information
YummyLau committed Oct 22, 2019
1 parent 890f001 commit 23f4c67
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 15 deletions.
12 changes: 11 additions & 1 deletion README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ README: [English](https://github.com/YummyLau/ComponentPlugin/blob/master/README
从一开始了解到 《微信的模块化架构重构实践》 开始关注组件化,到接触得到/美团外卖/51信用卡/猫眼等方案,从中获益良多。我理解的组件化同,工程上要满足 “不同功能粒度的模块独立”,业务要满足 “功能独立”,开发上更要满足 “依赖隔离,面向接口编程”。这便是为何我方案放弃使用路由方案来转发 api 的原因。该轮子更偏向于解决 “便捷调试/完全代码隔离” ,同样便捷支持模块 api 的绑定解绑。

### 版本更新
* 2019/10/10 1.0.3-beta
* 支持组件循环依赖
* 支持并发 transform 加快编译速度
* 2019/10/22 1.0.4
* 调整gradle插件版本为3.1
* 优化调试 log 格式
* 解决多task任务下 make project 编译失败的问题


### 为什么要使用

**tip:** *下文 module 一词均表示 android Studio 创建的原生模块,组件 一词均表示经过插件处理后的 module 模块*
Expand Down Expand Up @@ -67,7 +77,7 @@ buildscript {
jcenter()
}
dependencies {
classpath "com.effective.plugins:component:1.0.3-beta
classpath "com.effective.plugins:component:1.0.4
}
}
allprojects {
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ README: [English](https://github.com/YummyLau/ComponentPlugin/blob/master/README
From the very beginning, I learned that "WeChat's Modular Architecture Reconstruction Practice" began to focus on componentization, and benefited from contact with the US-based take-out/51 credit card/cat eye. I understand the same componentization, the project must meet the "module independence of different functional granularity", the business must meet the "functional independence", and the development must meet the "dependency isolation, interface-oriented programming". This is why my solution abandoned the use of routing schemes to forward apis. The wheel is more inclined to solve the "convenient debugging / full code isolation", and it is also convenient to support the binding and unbinding of the module api.

### new version update
* 2019/10/10 1.0.3-beta
* Support component circular dependency
* Support for concurrent transform to speed up compilation
* 2019/10/22 1.0.4
* Adjust the gradle plugin version to 3.1
* Optimized debug log format
* Solve the problem of compile compilation failure under multi-task task

### Why use it

**tip:** *The word module below refers to the native module created by android Studio. The term component means the module module processed by the plugin.*
Expand Down Expand Up @@ -67,7 +76,7 @@ buildscript {
jcenter()
}
dependencies {
classpath "com.effective.plugins:component:1.0.3-beta
classpath "com.effective.plugins:component:1.0.4
}
}
allprojects {
Expand Down
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ apply from: "./gradleScript/config.gradle"

buildscript {
ext.kotlin_version = '1.3.50'
ext.component_version = '1.0.4-beta'
ext.component_version = '1.0.4'

repositories {
google()
jcenter()
maven { url 'https://dl.bintray.com/yummylau/maven' }
}
dependencies {
// classpath "com.effective.plugins:component:$component_version"
classpath 'com.android.tools.build:gradle:3.1.0'
classpath "com.effective.plugins:component:$component_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
//调试需要
classpath "com.effective.plugins:component-plugin"
// classpath "com.effective.plugins:component-plugin"

//发布需要
// classpath 'com.novoda:bintray-release:0.9.1'
Expand Down
2 changes: 1 addition & 1 deletion component-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies {
// userOrg = 'yummylau'
// groupId = 'com.effective.android'
// artifactId = 'component-core'
// publishVersion = '1.0.3-beta'
// publishVersion = '1.0.4'
// desc = 'Android component core code'
// website = 'https://github.com/YummyLau/ComponentPlugin'
//}
Expand Down
4 changes: 2 additions & 2 deletions component-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'maven'

group = 'com.effective.plugins'
archivesBaseName = 'component'
version = '1.0.4-beta'
version = '1.0.4'

//设置本地发布路径
uploadArchives {
Expand Down Expand Up @@ -47,7 +47,7 @@ repositories {
// userOrg = 'yummylau'
// groupId = 'com.effective.plugins'
// artifactId = 'component'
// publishVersion = '1.0.3-beta'
// publishVersion = '1.0.4'
// desc = 'Android component plugin'
// website = 'https://github.com/YummyLau/ComponentPlugin'
//}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ class ComponentPlugin implements Plugin<Project> {
childProject.pluginManager.apply(Constants.PLUGIN_COMPONENT)
childProject.dependencies {
Logger.buildOutput("add dependency: " + Constants.CORE_DEPENDENCY)
// implementation Constants.CORE_DEPENDENCY
implementation childProject.project(":component-core")
implementation Constants.CORE_DEPENDENCY
// implementation childProject.project(":component-core")
}
if (it instanceof AppPlugin) {
if (projectInfo.isDebugModule() || projectInfo.isMainModule()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Constants {
public static String IMPL_PRE = 'impl-'
public static String COMPONENT_PRE = 'component-'
public static String DEBUG_COMPONENT_PRE = 'debugDependency-'
public static String CORE_DEPENDENCY = "com.effective.android:component-core:1.0.3-beta"
public static String CORE_DEPENDENCY = "com.effective.android:component-core:1.0.4"

//sourceSet - default
public static String JAVA_PATH = "src/main/java"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
6 changes: 3 additions & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//发布调试 core
include ':component-core'
//include ':component-core'
//
//发布插件
//include ':component-plugin'

//调试插件
includeBuild './component-plugin'

//includeBuild './component-plugin'
//
include ':app'
include ':debugModule'
include ':library', ':libraryKotlin', ':libraryWithoutPlugin'

0 comments on commit 23f4c67

Please sign in to comment.