1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-16 12:11:39 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee
Files
react-native-update/android/build.gradle
2019-10-06 21:56:58 +08:00

50 lines
1.4 KiB
Groovy

int MILLIS_IN_MINUTE = 1000 * 60
int minutesSinceEpoch = System.currentTimeMillis() / MILLIS_IN_MINUTE
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
apply plugin: 'com.android.library'
android {
compileSdkVersion safeExtGet('compileSdkVersion', 28)
buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3')
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 27)
versionCode 1
versionName "1.0"
consumerProguardFiles "proguard.pro"
}
sourceSets {
main {
// let gradle pack the shared library into apk
jniLibs.srcDirs = ['./lib']
}
}
buildTypes {
release {
buildConfigField("String", "PUSHY_BUILD_TIME", "\"${minutesSinceEpoch}\"")
resValue("string", "pushy_build_time", "${minutesSinceEpoch}")
}
debug {
buildConfigField("String", "PUSHY_BUILD_TIME", "\"0\"")
resValue("string", "pushy_build_time", "0")
}
}
}
repositories {
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
dependencies {
implementation 'com.facebook.react:react-native:+'
}