android - gradle 和 gradle-experimental 有什么区别?

标签 android gradle android-ndk android-gradle-plugin gradle-experimental

我知道新版本都支持 Android 应用程序的 NDK。
但是许多插件不适用于 gradle-experimental。

最佳答案

What is gradle?

Gradle is an advanced build system as well as an advanced build toolkit allowing to create custom build logic through plugins.


What is gradle-experimental?

The new experimental plugin is based on Gradle’s new component model mechanism, which allows significant reduction in configuration time. It also includes NDK integration for building JNI applications. This user guides provides details on how to use it and highlights the difference between the new plugin and the original plugin.

WARNING: Note that this is plugin is at the experimental stage. The Gradle API for the new component model is not final, which means it’ll only work with a specific version of Gradle until the APIs are final.

Additionally, the DSL is likely change significantly, as APIs to create the DSL are finalized.

This is a very early preview of the plugin for feedback on performance and NDK integration.


从本质上讲,gradle-experimental 是一项正在进行的工作(如上所述 这个插件处于实验阶段 ),它是 gradle 本身 future 应该成为的样子。

一个比喻:
一栋房子是几年前 build 的,经过了很多改进。一切都准备好了,看起来已经完成了。今天,这是一个你知道如果你住在里面你会很安全的地方。
此刻正在 build 另一所房子,因为上面房子的主人有搬家的计划。有些房间已经建成,有些还没有。有些门窗已经到位,有些甚至还没有订购。有些领域他们甚至还不知道他们将要做什么。有些房间可能看起来已经完工,但它们很可能会在任何时候进行翻新。天花板可能折叠,地板可能消失,只有当它已经发生时你才会知道。这所房子目前居住不安全。
Gradle 是第一所房子。
Gradle-experimental 是第二个房子。

我认为现阶段比较它们没有多大用处。如果您出于某种原因绝对不需要使用 gradle-experimental,请坚持使用当前稳定的 gradle。

关于android - gradle 和 gradle-experimental 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32902959/

相关文章:

android - 找不到默认 Activity ,即使它在 list 中已声明

java - 无法解析相应的 JNI 函数 - jsqlite

Android共享库完整性保护

Android .ogg 文件在几秒钟后停止播放

android - 我们可以在 Android 警报对话框中使用垂直按钮吗?

java - 是否可以在不同的 Activity 中使用多个 AsyncTask 将数据发布到服务器(Android)?

Android.mk : How to check if a module already exists

android - 触摸事件 : when finger is removed from the item

android - 从 Gradle 4.1 上的解析配置中获取依赖项

gradle - 在gradle中使用fmpp生成java文件