trycatchx / RocketX

🔥🔥 android 端编译加速插件🚀 动态识别未改动 module 并在编译流程中替换为 aar ,只编译改动模块,加速 Android apk 的编译速度。
861 stars 104 forks source link
aar agp android apk boost build build-tools buildspeed dependency dex fast fastbuild fastdex freeline gradle gradle-plugin gradle-plugin-kotlin kotlin rocketx speed

RocketX

本插件自动识别未改动 module 并在编译流程中替换为 aar ,做到只编译当前改动的 module,加速 Android apk 的编译速度。让你体验到所有模块都是 aar 的速度,又能保留所有的 module 便于修改,完美!(开源不易,希望朋友小手一抖,右上角来个star,感谢🙏)
[English Document](https://github.com/trycatchx/RocketXPlugin/blob/master/README-EN.md) | [Blog讲解](https://juejin.cn/post/7038157787976695815)

编译速度对比

2788235-0f027965fefc94f7

AGP 版本兼容

Plugin version Gradle version
4.0.0+ 6.1.1+
4.1.0+ 6.5+
4.2.0+ 6.7.1+
7.0 7.0+

如何使用

// app module 的 build.gradle 加入
apply plugin: 'com.rocketx'

// 在根目录的 build.gradle 加入
buildscript {
    dependencies {
        classpath 'io.github.trycatchx:rocketx:1.1.1'
    }
}
image
如果你有多个 app module 也可选择 Assemble${flavor}${buildType} task 进行 run

配置(可选)

  //app moodule下 配置插件编译项
  android {
  //..
    RocketX {
        openLog = true
        //指定哪些模块不打成 aar ,字符串为 module.path,以下 moduleB 不是一级目录,需要带上父文件夹
        excludeModule = [":moduleA",":module_common:moduleB"]
        //默认为true,表示走增量编译,由于有过多的 tranform 使用不当情况,可使用 false 使其编译通过(编译速度会变慢)
        dexMergeIncremental = true 
    }
   //..
   }
# 使用空格间隔开
excludeTransForms = com.alibaba.arouter AAA bbb

问题

开发维护者


trycatchx
(日落西来,月向东)

JustAClamber
(知者不惑)

louis
(louis-lzt)

FamilyCYZ
(什么都没有留下)

quan229870530
(什么都没有留下)

为爱发电(贡献者)

账号 留言
XZQ XZQ

为爱发电文档

交流群

先加微信(备注 RocketX)再拉进群

image

License


Copyright (C) 2022 237939682@qq.com

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.