Java – some questions about gradle for Android Development

I have some questions about gradle

>What is the difference between buildscript. Dependencies and? Dependency? > What is the difference between classpath and compile? > What applicable plug-ins: what do you mean?

resolvent:

As long as you look at their documents, they have described it well. But that's it: 1:

This is useful for external dependencies (for example, Internet repos. In the buildscript section)

2: Docs, each has a table and description. Dependencies will be obtained at compile time (for example, you can set 'runtime', these dependencies will be used at run time, or testcompile will only be used during compilation and testing). This is very important! Read their documentation. Of course, you can try to compile everything at a time, but that's a bad idea. A good example is JUnit testing. You just need to use JUnit during the compilation test and then use compiletest:

 testCompile "junit:junit:X.YZ"

3: This means you apply plug-ins:) you apply Java, or when you need a spring or spring start, you just need to tell gradle, hey gradle, I'll use it, so it applies. More here

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>