Skip to content

Commit 45ee7b2

Browse files
authored
more examples and better explanation for build-extras.gradle (apache#871)
1 parent 6794bce commit 45ee7b2

File tree

1 file changed

+15
-1
lines changed
  • www/docs/en/dev/guide/platforms/android

1 file changed

+15
-1
lines changed

Diff for: www/docs/en/dev/guide/platforms/android/index.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,23 @@ Here's an example:
255255
```groovy
256256
// Example build-extras.gradle
257257
// This file is included at the beginning of `build.gradle`
258+
259+
// special properties (see `build.gradle`) can be set and overwrite the defaults
258260
ext.cdvDebugSigningPropertiesFile = '../../android-debug-keys.properties'
259261
260-
// When set, this function allows code to run at the end of `build.gradle`
262+
// normal `build.gradle` configuration can happen
263+
android {
264+
defaultConfig {
265+
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
266+
}
267+
}
268+
dependencies {
269+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2', {
270+
exclude group: 'com.android.support', module: 'support-annotations'
271+
}
272+
}
273+
274+
// When set, this function `ext.postBuildExtras` allows code to run at the end of `build.gradle`
261275
ext.postBuildExtras = {
262276
android.buildTypes.debug.applicationIdSuffix = '.debug'
263277
}

0 commit comments

Comments
 (0)