Gradle notes -- about gradle 1.12

Source: Internet
Author: User

If you can read this article, I believe you have a simple understanding of gradle. Here we will not describe its advantages over other build tools, but introduce gradle 1.12.

So far, gradle has been available in version 2.1. Why does it start from version 1.12? The main reason is that I use gradle for Android development. Android studio is used in the company for Android project development, while Android studio 0.8.4 and earlier versions are commonly used in the company, it cannot be updated to version 2.0 or later. In addition, gradle1.12 is the last version of gradle 1.x, which is also the longest version I have used. Maybe this is the reason for this kind of complex. It makes me feel necessary to start with gradle 1.12.

This article briefly introduces gradle 1.12 updates, including but not covering all updates. Later articles will detail the use of gradle's specific functions. Of course, it mainly introduces version 1.12. For gradle 2.0 and later versions, the updated content will be supplemented after this version is introduced.


Gradle 1.12 updates 1. gradle is integrated with IDE through the tooling API. In this version, the tooling API is optimized, so importing the gradle project will become faster. This may be one of the reasons why importing and opening a project becomes faster since Android studio 0.6.0, because Android studio uses gradle 1.12 from this version.
2. This is good news for people who use it to build C Projects. The integration of clang and Visual Studio was improved in 1.12, And the native code was supported through cunit. Clang updates include other content. Because my focus is on the android project, I will not describe it any more. If you are interested, read the clang chapter in the user manual.
3. Improvements have also been made in dependency management. You can use combined metadata rules to determine whether a version is of the same version as Maven snapshot. For example, the following code:
dependencies {    components {        eachComponent { ComponentMetadataDetails details ->            details.changing =                details.id.group == "my.company" &&                    details.id.version.endsWith("-dev")        }    }}

It will think that the library whose group is "My. Company" and whose version number ends with "-dev" is constantly updated. In this way, the database will be updated when building, instead of using the old cache.
4. For skip tests, specific labels are included in the generated test report.
5. You can build a large ZIP file that exceeds the standard ZIP format. In earlier versions, an invalid ZIP file is generated. However, starting with this version, you can set the zip64 attribute to true to generate a large ZIP file. If this parameter is not set, and the zip file size or number of files exceeds the limit, the build fails.
6. The pom configuration is used by default. This version fully complies with attributes such as dependency management defined in the POM file. 7. Add the -- debug-JVM parameter to debug the test and javaexec processes of JVM. This parameter enables the JVM to start in debug mode for debugging. 8. Now graddle-wrapper uses HTTPS protocol for download. Gradle Wrapper can be seen as an encapsulation of gradle, which allows you to build on a computer without gradle installed. You can see the gradlew. bat or gradlew. Sh file in your project. A lot of problems have been fixed. I will not talk about it here. Outdated content changes to obsolete in version 1.12 and will be removed after version 2.0. So if you use Android studio, pay attention to the correspondence between your gradle version and the gradle Android plug-in version and your ide version. In addition, regarding tooling API version compatibility, this is a concern for developers who integrate the IDE. We do not develop the IDE. This may be a big change. 1. Added incremental compilation for Scala. Scala compiler zinc is upgraded to version 0.3.0, which may be a big change for early users. Of course, there may not be many such users. 2. The dependency order will be re-organized when ant builds is imported. Therefore, the execution sequence of the task imported from ANT builds may be different from that of the previous version. 3. For the gradle plug-in writing, you may need to note that both methods test. Filter and ideamodule. singleentrylibraries have been modified. There are other changes, so I will not talk about them much. For details, see http://www.gradle.org/docs/1.12/release-notes.html.
The above is a brief introduction to this version. Since most of the documents are in English, the blogger's level of English is also relatively general. If you have a wrong expression or understanding, please refer to the following. Recently, I am also working hard to learn English and translation. I want to make contributions and may mislead others. It is difficult for passers-by to learn and translate, accept all comments and corrections from people who have made mistakes.
This article is original. retained the original article address.

Gradle notes -- about gradle 1.12

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.