2016-09-07 17:35:04 +00:00
|
|
|
apply plugin: 'com.android.library'
|
|
|
|
|
2018-09-18 12:22:30 +00:00
|
|
|
def getStatusGoVersion = { ->
|
|
|
|
version = new File('../STATUS_GO_VERSION').text
|
|
|
|
return version.replaceAll("\\s","")
|
|
|
|
}
|
|
|
|
|
2016-09-07 17:35:04 +00:00
|
|
|
android {
|
2019-01-24 13:18:34 +00:00
|
|
|
compileSdkVersion 28
|
2016-09-07 17:35:04 +00:00
|
|
|
|
|
|
|
defaultConfig {
|
2019-01-24 13:18:34 +00:00
|
|
|
minSdkVersion 23
|
|
|
|
targetSdkVersion 28
|
2016-09-07 17:35:04 +00:00
|
|
|
versionCode 1
|
|
|
|
versionName "1.0"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2019-01-24 13:18:34 +00:00
|
|
|
implementation 'com.facebook.react:react-native:+' // from node_modules
|
2018-10-09 09:53:49 +00:00
|
|
|
compile 'com.github.status-im:function:0.0.1'
|
2017-12-26 09:56:15 +00:00
|
|
|
|
2018-09-18 12:22:30 +00:00
|
|
|
// 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()
|
2017-12-26 09:56:15 +00:00
|
|
|
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'
|
2018-11-21 17:12:55 +00:00
|
|
|
final File localFile = new File("${localStatusLibOutputDir}/${statusGoGroup}/${statusGoName}/${localVersion}/${statusGoName}-${localVersion}.aar")
|
|
|
|
if ( localFile.exists() ) {
|
2017-12-26 09:56:15 +00:00
|
|
|
// Use the local version
|
2018-11-21 17:12:55 +00:00
|
|
|
logger.warn("Using local build of Android status-go library ${localFile.absolutePath}.")
|
2017-12-26 09:56:15 +00:00
|
|
|
statusGoVersion = localVersion
|
|
|
|
}
|
|
|
|
|
2018-01-18 20:52:24 +00:00
|
|
|
implementation(group: statusGoGroup, name: statusGoName, version: statusGoVersion, ext: 'aar')
|
2016-10-11 14:24:52 +00:00
|
|
|
}
|