2019-10-06 21:56:58 +08:00
|
|
|
int MILLIS_IN_MINUTE = 1000 * 60
|
|
|
|
int minutesSinceEpoch = System.currentTimeMillis() / MILLIS_IN_MINUTE
|
2019-03-30 14:26:56 +08:00
|
|
|
|
|
|
|
def safeExtGet(prop, fallback) {
|
|
|
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
|
|
}
|
|
|
|
|
2016-03-31 16:22:47 +08:00
|
|
|
apply plugin: 'com.android.library'
|
|
|
|
|
|
|
|
android {
|
2019-03-30 14:26:56 +08:00
|
|
|
compileSdkVersion safeExtGet('compileSdkVersion', 28)
|
|
|
|
buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3')
|
2016-03-31 16:22:47 +08:00
|
|
|
|
|
|
|
defaultConfig {
|
2019-03-30 14:26:56 +08:00
|
|
|
minSdkVersion safeExtGet('minSdkVersion', 16)
|
|
|
|
targetSdkVersion safeExtGet('targetSdkVersion', 27)
|
2016-03-31 16:22:47 +08:00
|
|
|
versionCode 1
|
|
|
|
versionName "1.0"
|
2019-09-18 21:30:52 +08:00
|
|
|
consumerProguardFiles "proguard.pro"
|
2018-07-09 20:40:48 +08:00
|
|
|
}
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
// let gradle pack the shared library into apk
|
|
|
|
jniLibs.srcDirs = ['./lib']
|
2016-03-31 22:54:29 +08:00
|
|
|
}
|
2016-03-31 16:22:47 +08:00
|
|
|
}
|
2019-10-06 21:56:58 +08:00
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
resValue("string", "pushy_build_time", "${minutesSinceEpoch}")
|
|
|
|
}
|
|
|
|
debug {
|
|
|
|
resValue("string", "pushy_build_time", "0")
|
|
|
|
}
|
|
|
|
}
|
2016-03-31 16:22:47 +08:00
|
|
|
}
|
|
|
|
|
2016-06-27 21:02:47 +08:00
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
2016-06-28 12:08:43 +08:00
|
|
|
url "$rootDir/../node_modules/react-native/android"
|
2016-06-27 21:02:47 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-03-31 16:22:47 +08:00
|
|
|
dependencies {
|
2019-03-30 14:26:56 +08:00
|
|
|
implementation 'com.facebook.react:react-native:+'
|
2016-03-31 16:22:47 +08:00
|
|
|
}
|