Created
March 3, 2020 09:19
-
-
Save shivam340/4f6b8661d68db682ef0a4518da70213a to your computer and use it in GitHub Desktop.
Gradle Build Life Cycle - Module level build.gradle file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// can create variables | |
private val TAG = "App module build File: " | |
//can't set name here, available as read-only | |
//rootProject.name = "GradleLearning" | |
//can access gradle object | |
val gradleVersion = gradle.gradleVersion | |
println("$TAG gradle version is $gradleVersion") | |
/* In the app module or any sub module: | |
- It should only contain things like configuration, dependency and tasks specific to this module. | |
- Project instance is implicitly available in the file, so we can directly refer properties and methods available on it. | |
*/ | |
println("$TAG project name is ${rootProject.name}") | |
println("$TAG project name is ${project.name}") | |
println("$TAG project name is $name") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment