Skip to content

Instantly share code, notes, and snippets.

@chepsi
Created April 11, 2022 11:39
Show Gist options
  • Select an option

  • Save chepsi/67b72cd92500f3d37ea65bc3fec82777 to your computer and use it in GitHub Desktop.

Select an option

Save chepsi/67b72cd92500f3d37ea65bc3fec82777 to your computer and use it in GitHub Desktop.
Apply gradle settings to all submodules/feature-modules.
// Use this in project level gradle
subprojects {
apply from: rootProject.file('tools/jacoco/jacoco.gradle')
afterEvaluate { project ->
// use the line below if you want to apply the config to dynamic features only.
// if (project.plugins.hasPlugin("com.android.dynamic-feature")) {
if (project.hasProperty('android')) {
android.buildFeatures {
viewBinding true
dataBinding = true
}
android {
buildToolsVersion "30.0.3"
compileSdkVersion(AndroidSDK.compile)
defaultConfig {
minSdkVersion(AndroidSDK.min)
targetSdkVersion(AndroidSDK.target)
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
}
android.kotlinOptions.jvmTarget = JavaVersion.VERSION_11
android.compileOptions {
sourceCompatibility 11
targetCompatibility 11
}
android.buildTypes {
debug {}
release {}
staging {}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment