Gradle: Duplicated configuration in `android` block
Some elements within android block are duplicated in each module. Ideally this configuration should be applied only once (and work all the times, even for future modules).
android {
compileSdkVersion(AndroidConfig.COMPILE_SDK_VERSION)
defaultConfig {
minSdkVersion(AndroidConfig.MIN_SDK_VERSION)
targetSdkVersion(AndroidConfig.TARGET_SDK_VERSION)
versionCode = AndroidConfig.VERSION_CODE
versionName = AndroidConfig.VERSION_NAME
testInstrumentationRunner = AndroidConfig.TEST_INSTRUMENTATION_RUNNER
}
...
I would like to do this. My approach would be to create a common gradle file with the android block and apply it in each module. As described in this post. If you prefer any other solution then please let me know.
i'd like to work on this. related to #81
Go ahead @Thanatos23
Go ahead @Thanatos23
Still want to work on that @iam-alamgir ?
I already created a plugin that injects the dependencies into settings.gradle. Currently working on auto generation of related files in buildSrc. @igorwojda
Implemented by using Gradle local plugins https://github.com/igorwojda/android-showcase/pull/330