Skip to content

Commit 9e56c5e

Browse files
committed
Make Studio can check versions
1 parent b1d46a5 commit 9e56c5e

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
55
## [2.0.2] - 2018-08-31
66
### Changed
77
- iOS: Give `flatHeights` better performace by avoiding multiple creation of NSTextStorage.
8+
- Android: Now Studio can check versions in android/build.gradle
89

910
### Fixed
1011
- Closes #5: Inconsistency in flatHeights between Android and iOS.

android/build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ def safeExtGet(prop, fallback) {
88
rootProject.hasProperty(prop) ? rootProject.ext.get(prop) : fallback
99
}
1010

11-
def DEF_BUILD_TOOLS_VERSION = '26.0.3'
12-
def DEF_COMPILE_SDK_VERSION = 26
13-
def DEF_TARGET_SDK_VERSION = 26
14-
def DEF_MIN_SDK_VERSION = 16
11+
def _buildToolsVersion = safeExtGet('buildToolsVersion', '26.0.3')
12+
def _compileSdkVersion = safeExtGet('compileSdkVersion', 26)
13+
def _targetSdkVersion = safeExtGet('targetSdkVersion', 26)
14+
def _minSdkVersion = safeExtGet('minSdkVersion', 16)
1515

1616
buildscript {
1717
repositories {
@@ -29,12 +29,12 @@ buildscript {
2929
apply plugin: 'com.android.library'
3030

3131
android {
32-
compileSdkVersion safeExtGet('compileSdkVersion', DEF_COMPILE_SDK_VERSION)
33-
buildToolsVersion safeExtGet('buildToolsVersion', DEF_BUILD_TOOLS_VERSION)
32+
compileSdkVersion _compileSdkVersion
33+
buildToolsVersion _buildToolsVersion
3434

3535
defaultConfig {
36-
minSdkVersion safeExtGet('minSdkVersion', DEF_MIN_SDK_VERSION)
37-
targetSdkVersion safeExtGet('targetSdkVersion', DEF_TARGET_SDK_VERSION)
36+
minSdkVersion _minSdkVersion
37+
targetSdkVersion _targetSdkVersion
3838
versionCode 2
3939
versionName getPackageVersion()
4040
}

0 commit comments

Comments
 (0)