All Projects → trycatchx → RocketXPlugin

trycatchx / RocketXPlugin

Licence: other
🔥🔥 android 端编译加速插件🚀 自动识别未改动 module 并在编译流程中替换为 aar ,只编译改动模块,加速 Android apk 的编译速度。

Programming Languages

kotlin
9241 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to RocketXPlugin

Fastdex
🚀 加快 apk 的编译速度 🚀
Stars: ✭ 1,457 (+257.11%)
Mutual labels:  gradle, apk, dex, freeline
gradle-upgrade-interactive
CLI to interactively upgrade gradle dependencies, inspired by yarn.
Stars: ✭ 44 (-89.22%)
Mutual labels:  build, gradle, dependency
Gogradle
A Gradle Plugin Providing Full Support for Go
Stars: ✭ 712 (+74.51%)
Mutual labels:  build, gradle, gradle-plugin
Androidanimationexercise
Android 动画各种实现,包括帧动画、补间动画和属性动画的总结分享
Stars: ✭ 1,254 (+207.35%)
Mutual labels:  gradle, apk, gradle-plugin
Forma
Meta build system with Android and Gradle support.
Stars: ✭ 127 (-68.87%)
Mutual labels:  build, gradle, gradle-plugin
dalvikgate
Lightweight dex / odex / apk to jar converter
Stars: ✭ 32 (-92.16%)
Mutual labels:  apk, dex
boost
Boost Maven and Gradle plugins for MicroProfile development
Stars: ✭ 27 (-93.38%)
Mutual labels:  boost, gradle-plugin
build-scripts
Utility scripts for building of 3rd-party libraries
Stars: ✭ 33 (-91.91%)
Mutual labels:  build, boost
gradle-cleaner-intellij-plugin
Force clear delaying & no longer needed Gradle tasks.
Stars: ✭ 26 (-93.63%)
Mutual labels:  gradle, gradle-plugin
Json
A C++11 or library for parsing and serializing JSON to and from a DOM container in memory.
Stars: ✭ 205 (-49.75%)
Mutual labels:  fast, boost
axmldec
Stand-alone binary AndroidManifest.xml decoder
Stars: ✭ 151 (-62.99%)
Mutual labels:  boost, apk
sphinx-gradle-plugin
Sphinx site generation plugin for Gradle
Stars: ✭ 19 (-95.34%)
Mutual labels:  gradle, gradle-plugin
OffsetGuided
Code for "Greedy Offset-Guided Keypoint Grouping for Human Pose Estimation"
Stars: ✭ 31 (-92.4%)
Mutual labels:  fast, speed
CodeClaimer
A neat and faster Discord Gift Claimer.
Stars: ✭ 21 (-94.85%)
Mutual labels:  fast, speed
NinjaDroid
Ninja Reverse Engineering on Android APK packages
Stars: ✭ 224 (-45.1%)
Mutual labels:  apk, dex
Bazel Watcher
Tools for building Bazel targets when source files change.
Stars: ✭ 245 (-39.95%)
Mutual labels:  fast, build
b2
B2 makes it easy to build C++ projects, everywhere.
Stars: ✭ 38 (-90.69%)
Mutual labels:  build, build-tools
gradle-build-info-plugin
Gradle plugin to include build information such as Git commit ID to your JAR. It can be used to show Git commit information with Spring Boot Actuator.
Stars: ✭ 33 (-91.91%)
Mutual labels:  gradle, gradle-plugin
gradle-localization-plugin
Gradle plugin for automating the download process of localization files.
Stars: ✭ 19 (-95.34%)
Mutual labels:  gradle, gradle-plugin
gatling-gradle-plugin-demo
Showcase of the Gatling Plugin for Gradle
Stars: ✭ 17 (-95.83%)
Mutual labels:  gradle, gradle-plugin

RocketXPlugin

本插件自动识别未改动 module 并在编译流程中替换为 aar ,只编译改动模块,加速 Android apk 的编译速度。让你体验到所有模块都是 aar 的速度,又能保留所有的 module 便于修改,完美!

Build Status java AGP Code Size

编译速度对比

build-speed.png

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+

如何使用

方式一:网络依赖

  • 依赖 gradle 插件
// app module 的 build.gradle 加入
apply plugin: 'com.rocketx'

// 在根目录的 build.gradle 加入
buildscript {
    dependencies {
        classpath 'io.github.trycatchx:rocketx:1.0.20'
    }
}
  • 依赖 AS 插件 android studio setting->plugins-> marketplace 搜索 RocketX 安装(搜索不到使用本地安装)

assembleDebug

方式二:本地依赖(实时使用最新的版本,网络依赖需要上传 maven 有所滞后)

下载项目中的 lib 文件夹两个 jar:

  • rocketX-studio-plugin.jar 通过 android studio setting->plugins->install plugin from disk 进行安装

  • rocketx.jar 通过在项目工程根目录新建文件夹Plugin,置放进去 Plugin文件夹,在根目录的build.gradle 写入 classpath fileTree(dir: './Plugin', include: ['*.jar'])

  • 同样在 app module 的 build.gradle 加入:apply plugin: 'com.rocketx'

使用点击小火箭至喷火icon (开启 状态),点击编译器 run 按钮 :

assembleDebug

如果你有多个 app module 也可选择 Assemble${flavor}${buildType} task 进行 run

配置(可选)

  • openLog :打开 log
  • excludeModule :哪一些模块不需要打成 aar(譬如有些模块使用了 tool:replace="XX" ,打成 aar 后属性会消失,当然也可以移动到 app module 的 AndroidMenifest.xml)
  //app moodule下 配置插件编译项
  android {
  //..
    RocketX {
        openLog = true
        //指定哪些模块不打成 aar ,字符串为 module.path
        excludeModule = [":module_common"]
    }
   //..
   }
  • excludeTransForms: 编译阶段可以禁用的 transform ,编译速度更快(可通过build 的 log 搜索关键字 transFormList 查看自己项目引用了哪些 transform,并手动配置在 gradle.properties 文件下)
# 使用空格间隔开
excludeTransForms = com.alibaba.arouter AAA bbb

问题

  • 对于 gradle.properties 中的配置:如果使用 org.gradle.configureondemand = true ,请删除或者设置为 false,目前在 window 的 as 上会出现问题,已纳入下期需求
  • 第一次的加速,是最慢的因为需要全量编译后,打出 aar 上传到 LocalMaven
  • 目前如果编译出错,请重新再 run 一次,出现的问题 欢迎提 issue

开发维护者


JustAClamber
(知者不惑)

louis
(louis-lzt)

trycatchx
(日落西来,月向东)

FamilyCYZ
(什么都没有留下)

为爱发电(贡献者)

账号 留言
XZQ XZQ

License

Copyright (C) 2022 [email protected]

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].