In groovy,
hello.groovy
println "Hello World"
We can get get the source code as following,
enter image description here
You can get the above code by Ctrl + T in GroovyConsole
So for build.gradle ,
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.emnets.luoly.thirdtest"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
}
Can someone tell me how to get similar code.
For a Java or c program, their entrance is main . So I want to konw what is entrance for build.gradle file,in other words, from where it began to run.Due to gradle is written by groovy code, and groovy is actually translated into the Java binary code for execution. I want to know execution entry of build gradle?
Someone can give me some advice ?