title: How to read gradle file properties from Android app programatically
body: <p>The build.gradle file has the following section. How to read the <strong>android.defaultConfig.versionCode</strong> from the android app <strong>MainActivity</strong></p>
  
  <pre><code>android {
      defaultConfig {
          applicationId "com.gatta.e.gatta"
          minSdkVersion 11
          targetSdkVersion 21
          versionCode 1
          versionName "1.0"
      }
  }
  </code></pre>