Skip to content

Commit c9844a4

Browse files
committed
Apply PR from Vydia#320
1 parent c0408b7 commit c9844a4

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

android/build.gradle

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
buildscript {
2+
// Simple helper that allows the root project to override versions declared by this library.
3+
ext.safeExtGet = { prop, fallback ->
4+
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
5+
}
6+
27
ext {
3-
kotlinVersion = '1.7.20'
8+
kotlinVersion = safeExtGet('kotlinVersion', '1.7.20')
49
buildToolsVersion = '29.0.2'
510
compileSdkVersion = 29
611
targetSdkVersion = 29
@@ -25,10 +30,6 @@ def DEFAULT_COMPILE_SDK_VERSION = 28
2530
def DEFAULT_BUILD_TOOLS_VERSION = "28.0.3"
2631
def DEFAULT_TARGET_SDK_VERSION = 28
2732

28-
def safeExtGet(prop, fallback) {
29-
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
30-
}
31-
3233
android {
3334
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
3435
buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)

0 commit comments

Comments
 (0)