Files
Vasil Trifonov 243dc98005 Added selectedItemColor and unSelectedItemColor to the TabStrip (#8431)
* chore: add guard for ios

* feat(bottom-nav): adding new properties

* feat(tabs): new property implementation

* feat: new feature implementation in android

Implemented selectedItemColor and unSelectedItemColor properties on TabStrip

* chore: added some comments

* chore: change method return type

* fix: setting icon color

* fix: rendering mode setting

* chore: rename variable

* chore: fixed a typo

* chore: updated log in build gradle

* fix: item color setting in android

* fix: tab styling when no css aplied

* chore: private methods renamed

* tests: added selected-item test pages

* chore: renamed test pages

* chore: move css-tree package to the right place

* tests: added new ui tests

* fix: use renamed function

* fix: set item color

* tests: aded automationText attribute

* tests: trying to fix the tests

Co-authored-by: Dimitar Topuzov <dtopuzov@gmail.com>
2020-03-16 12:54:30 +02:00

100 lines
2.2 KiB
Groovy

import groovy.json.JsonSlurper //used to parse package.json
import groovy.json.JsonBuilder
import groovy.json.JsonOutput
def isWinOs = System.properties['os.name'].toLowerCase().contains('windows')
apply plugin: 'com.android.library'
def computeCompileSdkVersion () {
if(project.hasProperty("compileSdk")) {
return compileSdk
}
else {
return 28
}
}
def computeBuildToolsVersion() {
if(project.hasProperty("buildToolsVersion")) {
return buildToolsVersion
}
else {
return "28.0.2"
}
}
def computeAndroidXVersion() {
if(project.hasProperty("androidxVersion")) {
return androidxVersion
}
else {
return "1.0.0"
}
}
def computeSupportVersion() {
if(project.hasProperty("supportVersion")) {
return supportVersion
}
else {
return "28.0.0"
}
}
def computeTargetSdkVersion() {
if(project.hasProperty("targetSdk")) {
return targetSdk
}
else {
return 28
}
}
android {
compileSdkVersion computeCompileSdkVersion()
buildToolsVersion computeBuildToolsVersion()
defaultConfig {
minSdkVersion 16
targetSdkVersion computeTargetSdkVersion()
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
if(project.hasProperty("useAndroidX")) {
println 'Using android X'
def androidxVersion = computeAndroidXVersion()
implementation 'androidx.viewpager:viewpager:' + androidxVersion
implementation 'androidx.fragment:fragment:' + androidxVersion
implementation 'androidx.transition:transition:' + androidxVersion
} else {
println 'Using support library'
implementation 'com.android.support:support-v4:' + computeSupportVersion()
}
}
task cleanBuildDir (type: Delete) {
delete "../build/"
}
task copyAar << {
copy {
from "build/outputs/aar/widgets-release.aar"
into "../build/"
}
}
assemble.dependsOn(cleanBuildDir)
copyAar.dependsOn(assemble)
build.dependsOn(copyAar)