EastWoodYang / MicroModule

Rebuild multiple complete module structures within the module.
Other
219 stars 50 forks source link
aar gradle maven micromodule submodule

MicroModule

重新定义Android模块结构,在模块内部可以创建多个和模块结构一致的微模块(MicroModule)。每一个MicroModule的结构和Android模块结构保持一致,也会有自己的build.gradle。另外,你可以很方便的配置哪些MicroModule参与APK的编译。

Usage

在根项目build.gradle中添加MicroModule插件依赖:

buildscript {
    dependencies {
        ...
        classpath 'com.eastwood.tools.plugins:micro-module:1.4.0'
    }
}

applicationlibrary类型的模块build.gradle中添加MicroModule插件:

apply plugin: 'micro-module'
apply plugin: 'com.android.library' // or 'com.android.application'

android {}

microModule {
    ...
}

dependencies {}

注意:MicroModule插件需要添加在android相关插件之前,相关配置microModule {} 需要添加在 android {}dependencies {}之间。

microModule属性说明

MicroModule Android Studio Plugin

Provides an action which allow you quickly create MicroModule or convert module to MicroModule.

Install Step:

  1. open [File] -> [Settings...] -> [plugins] -> [Browse repositories...]
  2. and search name MicroModule

Plugin detail:

https://plugins.jetbrains.com/plugin/10785-micromodule

Question or Idea

有问题或想法可以直接加我微信: EastWoodYang

License

   Copyright 2018 EastWood Yang

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.