unlike Ant/maven, which does not use the XML language, it uses the groovy language, which makes it more concise, flexible, and, more powerful, Gradle fully compatible with Maven and Ivy. More detailed information can be seen on its official website: http://www.gradle.org/First clear Gradle and Maven, there is a configuration file, Maven is called Pom.xml, and in
Gradle 1.12 User Guide translation-Chapter 2. CodeNarc plug-in, gradlecodenarc
For translation of other chapters, see:
Http://blog.csdn.net/column/details/gradle-translation.html
Please pay attention to the address on Github for translation projects:
Https://github.com/msdx/gradledoc/tree/1.12.
To view the bilingual documents directly, visit:
Http://gradledoc.qiniudn.com/1.12/userguide/userguide.html.
In a
This is another javaweb-related blog that covers:
Springboot: Micro-framework that provides the ability to build services quickly
Springmvc:struts's replacement
MyBatis: Database Operations Library
Groovy: A high-level language that can be combined with Java, with Java at the bottom
Maven: For simplifying jar package import and packaging
LOG4J: Log Management
What we're going to do is a simple interface that gets the
Working with Groovy while learning grails is unavoidable, though not too deep, but it's also helpful to know a few features.
1. Get integers after dividingUse the intdiv () method to get an integer, note that this method only applies to dividing two integers , floating-point numbers do notIf,while acceptable type of 2.Groovy
Boolean
Number 0 is false, others are true
String null chara
Content of this article
General
Lists List
Maps maps
Ranges/slices Range/Fragment
Object Access Object
Resources
Groovy is a JVM-based Agile development language that combines many of the powerful features of Python, Ruby, and Smalltalk, and groovy code can be well combined with Java code and can be used to extend existing code. Because of its features running on the JVM,
One place where the groovy language is easier to use than the Java language is that the groovy language introduces the operation of the size number. Of course, the number of sizes we're talking about here is that the precision exceeds the float and double decimal. We may have to deal with the size of the number of cases, if it is in the Java language, we can only be or use Java.math.BigDecimal to deal with,
waits for the input file to change, once it changes, it executes the build again, tries to change a groovy file, and then sees the following output:
Continuous build is an incubating feature.
BUILD successful in 0s
4 actionable tasks:4 up-to-date
waiting for changes to input files of the tasks ... (Ctrl-d to exit)
Modified:/users/apple/documents/mydream/groovy/studygroovy/src/main/
1. Create a Build.gradle file
qianhuis-mac-mini:1225 qianhui$ Touch Build.gradle
2. Open Build.gradle
VI Build.gradle
3.add a task
Defines a task hello that prints Hello world! after the task has finished executing
4. Run Task
5. If you want to see the details of the execution, you can omit-Q
6. Another way to define tasks
7. Building tasks using the Groovy language
Perform tasks
qianhuis-mac-mini:1225 qianhui$
Article from: http://www.ciandcd.com the code from can be downloaded from github: HTTPS://GITHUB.COM/CIANDCD installation:wget Https://dl.bintray.com/groovy/maven/apache-groovy-binary-2.4.7.zipUnzip Apache-groovy-binary-2.4.7.zipsudo ln-s/home/osboxes/downloads/groovy-2.4.7/bin/gro
First, IntroductionGroovy is a dynamic language that can be run on the Java platform in the same way that Java is used, and groovy and Java are basically seamlessly integrated, with some of the following features:
is an agile dynamic language based on a Java virtual machine.
Built on the powerful Java language and added many features learned from languages such as Python,ruby and Smalltalk.
Provides Java developers with modern, most p
Groovy 1.6 introduces call site optimization. Call site optimization is actually the cache of method selection.
Method selection
In a static language (such as Java), the binding of a method call is done at compile time (not exactly, such as a virtual function, but in general, the method invocation of a static language is very efficient). In a dynamic language such as groovy, the method invoked is selected
Groovy language is most proud of the characteristics of the DSL, the definition of DSL and classification, advantages, etc., it is not to be elaborated in this article, you can access the Internet, there is a large number of this convenient introduction. The groovy language is a great way to design your internal DSL, and in this context, my Groovy Discovery serie
7.1 defining classes and scripts 7.1.1 defining attributes and declaring attributes of local variables and local variables must be declared before use (except for scripts ), this helps to implement scope rules and prevent programmers from misspelling by mistake.
The script allows undeclared variables. In this case, the variables are obtained from the binding attribute of the script. If no corresponding variables are found in the binding, the variables are added to the binding, binding is a data
The tutorial on configuring groovy environments under Windows is easy to find, I refer to this article, the installation process is smooth, however, when you run the groovy-v command in CMD, the error:java_home is set to an invalid directory , the first reaction is that there is a problem with my java_home variable configuration, but running java-version in CMD is normal and should not be the problem of thi
I heard that Spock is a reinforced version of JUnit, today specifically installed, and then the process to share with you. First of all, my Java project is managed with Maven. The eclipse I used was kelper, Kepler.Before you use Spock, you first need to match the groovy environment. Search the Internet, found the groovy Eclipse plugin: http://dist.springsource.org/snapshot/GRECLIPSE/e4.3/index.html Just thi
In the previous it used the Gmaven plugin compiled groovy/spock, this time using the Gmavenplus plugin, more convenient.Specific steps1. Import Spock and Groovy dependenciesDependency> groupId>Org.codehaus.groovygroupId> Artifactid>Groovy-allArtifactid> version>2.4.1version> Scope>TestScope> Dependency> De
Metaprogramming gives full play to the features of groovy Dynamic Language (metaprogramming is writing code that has the ability to dynamicallychange its behavior at runtime .)
The following is a summary of this knowledge.
1. Class discovering the class
Def S = "hello"Printlns. ClassPrintlns. getclass ()String. constructors. Each {println it}Println ""String. Interfaces. Each {println it}Println ""
2. Domain discovering t
Wrote a lot of reptile applet, the previous several times mainly with C # + Html Agility Pack to complete the work. Because the. NET FCL provides only "bottom-level" HttpWebRequest and "middle" WebClient, there is a lot of code to be written about HTTP operations. Plus, writing C # requires Visual Studio, a "heavy" tool that has long been a low-performance development.Recent projects have come into contact with a magical language, groovy, a dynamic la
In the process of webservice testing with SOAPUI, it is necessary to use SOAPUI encapsulated code. Let's study together:)SoapUI 5.1.2 api:http://www.soapui.org/apidocs/index.htmlWe often use groovy script in Soapui, and when we can't think of a way to groovy, go to its class library and find it:)Groovy api:http://groovy
Finally, I talked about the mop features of the groovy language, and I talked about it sporadically in the previous chapters, but I never systematically talked about it. This is because the mop features of the groovy language are too flexible, such as the "InvokeMethod" and "methodmissing" approaches in this section, their functions are very similar, but the differences are quite subtle. However, in any cas
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.