Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Mastering Gradle
  • Toc
  • feedback
Mastering Gradle

Mastering Gradle

By : Mitra
3 (4)
close
Mastering Gradle

Mastering Gradle

3 (4)
By: Mitra

Overview of this book

If you are a developer with some experience in build tool and want to become an expert in build tool, then this book is for you. Basic knowledge of Gradle or any other build tool is essential.
Table of Contents (12 chapters)
close
11
Index

Classes, beans, and methods

This section introduces classes, methods, and beans. Groovy classes are similar to Java classes declared with the class keyword. Usually, a class definition starts with the package name, and then import package statements. One key difference with the Java counterpart is that Groovy imports six packages and two classes by default. So, if you create any class, these packages and classes are automatically available to you:

import java.lang.* // this is the only default import in Java
import java.util.*
import java.io.*
import java.net.*
import groovy.lang.*
import groovy.util.*
import java.math.BigInteger
import java.math.BigDecimal

Classes and methods in Groovy by default have public access, whereas in Java it is set to package-private. We will start with a sample Groovy class:

class Order {
  int orderNo
  Customer orderedByCustomer
  String description

  static main(args) {
    Order order1 = new Order();
    order1.orderNo = 1;
    order1.orderedByCustomer = new...
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete