Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 3ea22c3

Browse files
authored
Merge pull request Instabug#28 from Instabug/feature/generalizedGradle
🎨 generalize build.gradle to allow the use of the root project's config
2 parents 0593ef8 + bfb8eec commit 3ea22c3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

android/build.gradle

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11

22
apply plugin: 'com.android.library'
33

4+
def DEFAULT_COMPILE_SDK_VERSION = 26
5+
def DEFAULT_BUILD_TOOLS_VERSION = "26.0.2"
6+
def DEFAULT_TARGET_SDK_VERSION = 26
7+
48
android {
5-
compileSdkVersion 26
6-
buildToolsVersion "26.0.2"
9+
compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
10+
buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
711

812
defaultConfig {
913
minSdkVersion 16
10-
targetSdkVersion 26
14+
targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
1115
versionCode 1
1216
versionName "1.0"
1317
ndk {

0 commit comments

Comments
 (0)