status-mobile/modules/react-native-status/android/build.gradle

39 lines
1.4 KiB
Groovy
Raw Normal View History

apply plugin: 'com.android.library'
def getStatusGoVersion = { ->
version = new File('../STATUS_GO_VERSION').text
return version.replaceAll("\\s","")
}
android {
compileSdkVersion 26
defaultConfig {
minSdkVersion 18
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
}
dependencies {
implementation 'com.facebook.react:react-native:+'
compile 'com.github.status-im:function:0.0.1'
// WARNING: If you change this, make sure the GitHub release of the .aar exists.
// WARNING: status-go is downloaded in Makefile and has a hardcoded version too.
String statusGoVersion = getStatusGoVersion()
final String statusGoGroup = 'status-im', statusGoName = 'status-go'
// Check if the local status-go jar exists, and compile against that if it does
final String localStatusLibOutputDir = "${rootDir}/../modules/react-native-status/android/libs", localVersion = 'local'
final File localFile = new File("${localStatusLibOutputDir}/${statusGoGroup}/${statusGoName}/${localVersion}/${statusGoName}-${localVersion}.aar")
if ( localFile.exists() ) {
// Use the local version
logger.warn("Using local build of Android status-go library ${localFile.absolutePath}.")
statusGoVersion = localVersion
}
implementation(group: statusGoGroup, name: statusGoName, version: statusGoVersion, ext: 'aar')
}