I will only be able to write multiple articles, and each one will be around 7000-8000 words. Writing Gradle is really the most difficult for me, and the better the structure of the article and the order of the chapters will be adjusted several times, and I hope you guys understand better with your hard work, and the better you understand the better the article structure and chapter order will be

Gradle has an extraordinary amount of content. Before writing this article, I thought it would be enough to have a 10000 words, but as I read more and more, I found that I could write even a book if I wanted to

Because of the content, I can only split into many articles, hope to write all

I write articles are like to small white as a starting point, hope for those who do not know Gralde friends can all help, but also hope to greatly shorten the time cost of learning Gralde. Gradle is really hard for the average person to understand. Relevant technical articles did not start to emerge until 18 years later, and the previous articles (especially when AS appeared in 15 years) were very, very few, which shows the great difficulty. I think that only those who are proficient in the back end, Ant and Maven build tools, and have moved to Android will be able to play Gradle (੭ ᵕ,)੭*ଘ

preface

To look at the long march has been the world as a miracle, really can’t imagine how to have perseverance to bridge these human area, I think only: go on, way, the only light, encourage each other, support each other in order to the people to do the first ┗ | ` O ‘| ┛ ao ~ ~

Perhaps because of the more emotional and daydreaming nature of the ape, I have always seen software development as a new era version of the long March: the future is bright, the road is long, and the present is difficult. Who can say that every obstacle on the programming learning route is not a mountain of snow or grass? The difficulty of the past is very big, too many people linger in the pass groan, or it is the head broken blood that is touched, but as long as the past, the scenery behind how wonderful. Even if there are thousands of suffering ahead, but I have become a warrior, perseverance is my blood, clenched the hand of the sword, I can lift the sky.

Once upon a time, everyone can remember the agony of leaning over the desk, the sadness of scratching their heads, the grief of suspecting their own abilities? Gradle watched it several times, several times for a week, but couldn’t understand it, couldn’t understand it, couldn’t get the gist. While others a week, Gradle all kinds of tricks, all kinds of black technology, can you not envy? Why other people can do it and I can’t? Why is the difference so big? The reason is: inefficient learning! How can the foundation is weak to help him climb the peak, with no pork has not seen the pig run mood, how can cook a good braised pork in brown sauce? The reason why Quanjude duck is famous in China is that it not only understands and masters the whole growth process of ingredients, but also selects the best duck shoots from the best among the best. Only by mastering the whole growth process of duck shoots can we have a clear goal and make the best roast duck

Amway: Plus-one item for one Android project: An introduction to Android Foundation (o≖ extract ≖)

Thanks to their tireless output, I was able to cut Gradle off, thanks very much (̀ㅂ•́)و✧

Write a little verbose, hope a little verbose gradle to explain clearly, grasp the appropriate learning context, in fact, gradle is not difficult to start

Gradle ✧(≖ smooth ≖✿)

The word

The first obstacle to learning Gradle is that there are a lot of words I don’t know. I always see the words I don’t know and I don’t understand what they mean. In fact, it’s quite discouraging, at least that’s how I feel. Here are some words you should be familiar with:

  • Script— > script (build. Gradle)
  • Plugin–> plugin (‘com.android.application’)
  • generic–> General, general
  • task– > task (cleanBuildCache)
  • graph–> Charts, graphs
  • assemble–> Collection, collection, packaging
  • compile— > compilation
  • Evaluate–> Evaluate and build
  • resolve— > the decision
  • Execution— > implementation
  • Closure–> Closure, termination (Android {… })
  • confuse— > confusion
  • Script Block— > script block
  • delegate— > the entrusted
  • transform— > transform
  • channel– > channel
  • flavor–> Taste, difference, channel
  • dimension— > dimension
  • variant— > variations
  • annotationprocessor–> Annotation handler
  • ProGuard— > confusion
  • console— > the console
  • company— > warehouse

The resources

  • Official:

    • Groovy – the official document | Gradle – the official document | Gradle – literature
    • Plug-in library – can inquire | | maven POM maven central warehouse – document
  • B Station video:

    • Gradle development team from Gradle introduction tutorial
    • Gradle quick start
    • Gradle system in detail
    • Customize Gradle plugins
    • Use Artifactory and Retryofit to help Gradle improve development efficiency
    • Gradle principle animation explanation
  • Moocs video:

    • 199 yuan –Gradle3.0 automation project construction technology intensive + actual combat –> money can see
  • Blog:

    • Getting Groovy closures done is enough
    • Mastering Gradle
    • Gradle starts with init. Gradle
    • Android Gradle custom Task
    • Start building Gradle with Android
      • This article from Baidu team is really Nice for the introduction of dependency, it is worth reading
    • I was finally driven crazy by implementation and APIS
  • Nuggets -jsonchao’s series – good, comprehensive and deep

    • Gradle core Configuration
    • Gradle Automated build Technology
    • Gradle core decrypt (Gradle core decrypt)
    • Create Gradle plugin for Gradle
    • Deep exploration of Gradle automatic building technology (five, Gradle plug-in architecture implementation principle analysis – first)
    • Deep exploration of Gradle automatic building technology (five, Gradle plug-in architecture implementation principle analysis – next)
    • Deep Exploration of Gradle Automatic building technology (9, Gradle plug-in platform framework ByteX Exploration journey)
  • Gradle packaging accelerated look at this –>

    • Gradle core Configuration

Open this link, go in and search directly for the third frame we want to see, you can see all versions of the information, click on the maven center warehouse can see the maven address

My study article

Systematic things, especially your sister has been exposed to, I think in the learning stage must write articles, to record down, even if there are too many online such articles, you must write their own articles. After writing, you can sort out what you have learned, move the keyboard to start the code word, you know how much you did not actually learn to understand, write down you can remember clearly, forget to look back

The first stage

The purpose of this stage is to understand Gradle building tools, Groovy syntax, concepts, what is Task, Plugin, Gradle built-in objects, life cycle Hook function, and building process. These are coarse grained Gradle knowledge system, only to understand these you can get started, Gradle

  • Gradle Pit Climbing Guide – An introduction
  • Gradle Pit climbing guide – first concepts, Grovvy syntax, common apis
  • Gradle Pit Climbing Guide – Understand Plugins, Tasks, build processes
  • Gradle Core model, Hook function, Ext extension properties, Project API

The second stage

This stage is to deeply learn Gradle details, and based on the custom plug-in to achieve a variety of functions, learn here basically can start, Gradle will not be a problem, see new content can also understand, learn will be able to keep up with the mainstream level of Gradle industry

  • Gradle Pit Climbing Guide – Dependency management
  • Gradle Pit Climbing Guide — Variant

Gradle Study Guide

1. Gradle Basic learning route

  1. What is Gradle and Groovy
  2. Get familiar with Groovy syntax
  3. What are plugins and tasks
  4. Familiar with Gradle core objects: Gradle, Setting, Project, Gradle building process, life cycle, and its hook hook subfunctions
  5. Familiar with Android project building, application plugin
  6. Learn about customizing tasks, customizing plugins, uploading maven and using maven
  7. Various custom plugin designs

This is the basic idea of learning, combined with the materials I have provided, I think it will at least save you a lot of time to search for information, to clarify the process, and to toss around. Here are the specific study guides

2. Gradle Learning Materials guide

Gradle is very complex and difficult to learn. It is not enough to study once. Please watch it patiently for several times <(~ ~)/

  1. First of all, I hope you can read this article first, first have some basic understanding of Gradle and then look at the back, especially the students who have no foundation of Gradle. I really suggest you to read this article first. I always start from small white when I write articles
  2. Gradle development team Gradle introduction tutorial –> priority to recommend everyone to see this, from Gradle management team promotion really is not cover, clear concept explanation, concise and comprehensive, logical Nice, will help you understand Gradle the whole picture, although the specific content is not a lot. But looking at other materials with an official understanding can reduce the ambiguity of many concepts and help improve your learning efficiency
  3. Gradle system detailed explanation –> this 4 to hours, try to Gradle all speak again, but the effect is not very good, recommend everyone to go over, increase understanding
  4. Gradle quickstart | custom written gradle plug-in – > 2 this article is about the plugin plug-in, task, after you see the 2 pieces will have a deeper understanding
  5. With Artifactory and Retryofit help Gradle improve development efficiency –> This is to explain Gradle automated packaging, uploading, publishing, suitable for the needs of friends to see
  6. Mastering Gradle –> The Mastering Gradle is really a beginner’s killer, a retreat guide. Although the content of the article is chaotic, the quality is good. I recommend you to read it after you have a systematic understanding of Gradle
  7. Gradle– official documents –> management documents are recommended to look at the last, combined with Google chrome automatic translation plug-in, is still able to see, no problem
  8. The rest is the principle of Gradle plugin application, this is recommended to see the nuggetsjsonchaoStudent’s series of articles, both comprehensive, and in-depth

After this, Gradle is not a big problem for everyone. All that is left is to use Gradle in your projects. Have black science and technology article to come out again gold also won’t read not to understand, won’t use. It will take a little longer, but you can really learn it once, for life, and you don’t have to do it over and over again

Android plug-in packaging flowchart