alibaba/freeline — dự án mã nguồn mở — đang có 5.4k sao GitHub. A super fast build tool for Android, an alternative to Instant Run
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Freeline is a super fast build tool for Android and an alternative to Instant Run. Caching reusable class files and resource indices, it enables incremental building Android apps, and optionally deploying the updates to your device by hot swap.
See Freeline official website for more information.
Developed and used by Ant Fortune (about us) Android Team, Freeline has been significantly saving time in daily work. Inspiring by Buck and Instant Run but faster than ever, Freeline can make an incremental build in just a few seconds. No more recompile and reinstall again and again before seeing your modifications, Freeline brings life-changing development experience for Android.
中文说明
Freeline Insights
Freeline splits the build task into several small tasks that run concurrently. It makes full use of the compiled cache files to implement a real incremental build and uses some components of Buck such as dx and DexMerger to speed up the build tasks. Freeline runs a socket server in a separate process on device side, which connects with build tool on developer's machine, so that deployment can still take effects even if the main process crashes.
Freeline uses multi-dex solution for incremental dex hot swapping. A deeply optimized version of aapt tool (FreelineAapt) is made to generate incremental resource pack, which is several times faster than the original aapt tool and the resouce pack can be as small as 1kb. MonkeyPatcher from Instant Run is utilized to make hot resource replacement. Freeline support dynamic swap native .so library, you don't need to re-build your project after native .so files changed.
Freeline will automatically switch between full build and incremental build.
Freeline is also a great basis for over-the-air hotpatching. Deliverying Freeline's incremental output, which can be packed into a zip file and usually less than 100 kb, it is able to take effect to fix crashes or other problems and replace resoucres dynamically. Statistical data over large amount cases show that it is effective for 99% of users. Please note that the OTA patch delivery system is out of scope of this project.
FreelineAapt will open source codes later. See wiki to know more about Freeline, only Chinese available now.
中文原理说明
Features
Speed up standard android gradle projects with multiple modules
Concurrent tasks that incrementally build project
Hot deploy even if the main process crashes
Build incremental dex and resource pack
Caching resource.arsc support
Running on Windows, Linux and Mac
Native so hot swap support
Annotation support
Retrolambda support
DataBinding support
See the following table for changes support.
Java
drawable, layout, etc.
res/values
native so
add
√
√
√
√
change
√
√
√
√
remove
√
√
x
-
Freeline has been tested with API versions 17, 19, 22, 23 on the android emulators, a Nexus 6p running marshmallow and a smartisan running Kitkat. Incremental resource patch would be much faster if the android device is running Lolipop or above.
Download
Configure your project-level build.gradle to include freeline plugin:
Finally, execute the gradle task initFreeline to download freeline dependencies.
Windows[CMD]: gradlew initFreeline
Linux/Mac: ./gradlew initFreeline
For Chinese users, if you got stuck in the download process, you can execute gradlew initFreeline -Pmirror to speed up the progress.
You can also use -PfreelineVersion={your-specific-version} parameter to download the specific version of freeline's python and bin dependencies.
If you have a complex project structure, you may need to use freeline DSL to customize your build process. For more details about freeline DSL, see Freeline DSL References.
Usage
You can install freeline plugin in Android Studio for quick usage.
How to install? In Android Studio, go to:
MacOS
Android Studio → Preferences... → Plugins → Browse repositories...
alibaba/freeline có 5.4k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/alibaba/freeline. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
alibaba/freeline có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho alibaba/freeline. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
alibaba/freeline còn đang phát triển không?
Commit gần nhất trên alibaba/freeline là 6.5 năm trước (theo timestamp GitHub). Repo có 619 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
alibaba/freeline viết bằng ngôn ngữ gì?
alibaba/freeline chủ yếu viết bằng Java. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc thêm về alibaba/freeline ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/alibaba/freeline là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về freeline?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về freeline.