You are on page 1of 4

Gradle tasks can also be created and extended dynamically at runtime.

True

Gradle build scripts use a combination of declarative and imperative


statements. True

Gradle build scripts are written in _. Groovy or kotlin

To execute the hello task in the build file, type ___ on the command line.
gradle hello or gradle -q hello

Consider the following gradle build script:

task a {
doLast { println 'A'
}}
task b(dependsOn: a) {
doLast { println 'B'
}}
task c(dependsOn: a){
DoLast { println 'C'
}}

If the task gradle -q c is run, what is the output?


AC

Multiline comments in Gradle build files are included using _ .


/* Multi line
*/

Consider the following gradle build script:

task a{
ext.myProperty = "Hello"
}
task b{
doLast {
println a.myProperty
println c.myProperty
}}
task c(dependsOn: b){
ext.myProperty = "Hey"
println "Hi"}

If the task gradle -q c is run, what is the output?


Hi hello hey

In gradle, a disabled task is labelled as _. Disabled

In gradle, JAR files are published to _. All

Which plugins are configured while integrating gradle with Jenkins?

Gradle Plugin And plugin of repository used

Which are the two types of plugins in gradle? Script binary

Jobs are the unit of execution in Jenkins. True

Which of the following statement is true about Jenkins? All

The plugins provided by jenkins supports ____. All

In Jenkins, a build job performs _. All

Final:

1. Which of the following is Gradle's in-built task? All


2. The first line added in the build script to make the Android plug-in
available for a Gradle build is . apply plugin:'com.android.
application'
3. Gradle tasks can also be created and extended dynamically at
runtime. All
4. In gradle the Java plug-in provides tasks to __. All
5. Which of the following statements are true?
Only Ant script can be migrated to Gradle build script is wrong

6. How to check gradle version?


gradle -v or gradle –version
7. In Gradle, the java plugin searches for java production source code in
the directory ___. src/main/java 
8. Which of the following is a language plugin included in the Gradle
distribution? Groovy and Scala
9. In gradle to specify, which projects belong to the build, and which file
is used? settings.gradle
10. Running Gradle builds with the Daemon executes the build quickly.
True
11. To build Android project, which version of gradle is required? Gradle
2.2.1 and above
12. Gradle build scripts are written in _. Groovy or kotlin
13. In gradle the init task creates a Gradle project, which contains _. All
14. Gradle is an imperative build tool. False
15. Which of the following is a quality plugin of Gradle? All
16. In the android plugin for gradle, which two properties on the android
configuration block are required? Build tools version and compile sdk version
17. Which task is executed to use Gradle Build Init plugin? Init
18. When gradle plugins are applied to a project, it is possible to _. All
19. Gradle build scripts use a combination of declarative and imperative
statements. True
20. The wrapper plugin can be auto-applied to the root project of the
current build without modifying the build.gradle file. True

Questions not answered

1. Lifecycle tasks typically have task actions - False


2. Gradle supports multiple project templates called archetypes – False
3. The war plugin enables the default JAR archive generation of the Java plugin – False
4. The two build files generated by android studio are in : Root Folder
and build directory
5. The scala plugin applied in the gradle can deal with ____________All
the options
6. In gradle it is useful to have a build that is more declarative as
possible , since this -------- Both
7. The external dependencies for the build script are defined using – All
8. Gradle Build Init plugin is an automatically applied plugin – True
9. To build Android project, which version of gradle is required? –
Gradle 2.2.1 and above
10. Gradle is a _______ based build tool. – JVM
11. Which of the following statement is false? – is an imperative build tool
12. In android studio, what is the folder in which the build file is used to
build the Android application? – Gradle
13. Which method is used to attach a predicate to a skipping task? –
onlyif()
14. The build task added by the java plugin ___________performs
assembling of jar files
15. While building a java project with gradle, the JAR files are created in
____ after the execution of gradle build command – build/libs
16. Gradle wrapper makes the execution of the build independent of the
installed Gradle version – True
17. Which plugin facilitates creating an executable JVM application –
Application Plugin
18. Applying the Application plugin also implicitly applies the Java plugin
– True
19. Gradle requires a Java JDK or JRE and Groovy to be installed – True
20. In Gradle , the java plugin searches for java test source code in the
directory ___________src/test/java
21. Finalizer tasks are automatically added to the task graph when the
finalized task is scheduled to run – False
22. Which task is added by wrapper plugin to the project? – Wrapper
23. In gradle a disabled task is labelled as – Skipped
24.

You might also like