2016-02-10 02:03:33 +00:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath 'com.android.tools.build:gradle:1.3.1'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
jcenter()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'com.android.library'
|
|
|
|
|
2016-02-22 00:57:05 +00:00
|
|
|
task forwardDebugPort(type: Exec) {
|
|
|
|
commandLine 'adb', 'forward', 'tcp:8082', 'tcp:8082'
|
|
|
|
ignoreExitValue true
|
|
|
|
doLast {
|
|
|
|
if (execResult.getExitValue() != 0) {
|
|
|
|
logger.error(
|
|
|
|
'===========================================================================\n' +
|
|
|
|
'WARNING: Failed to automatically forward port 8082.\n' +
|
|
|
|
'In order to use Realm in Chrome debugging mode, port 8082 must be forwarded\n' +
|
|
|
|
'from localhost to the device or emulator being used to run the application.\n' +
|
|
|
|
'You may need to add the appropriate flags to the command that failed:\n' +
|
|
|
|
' adb forward tcp:8082 tcp:8082\n' +
|
|
|
|
'===========================================================================\n'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-02-10 02:03:33 +00:00
|
|
|
android {
|
|
|
|
compileSdkVersion 23
|
|
|
|
buildToolsVersion "23.0.1"
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
minSdkVersion 16
|
|
|
|
targetSdkVersion 22
|
|
|
|
}
|
2016-02-22 00:57:05 +00:00
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
compileTask -> compileTask.dependsOn forwardDebugPort
|
|
|
|
}
|
2016-02-10 02:03:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile fileTree(dir: 'libs', include: ['*.jar'])
|
|
|
|
compile 'org.nanohttpd:nanohttpd:2.2.0'
|
2016-02-17 22:36:58 +00:00
|
|
|
compile 'com.facebook.react:react-native:0.20.+'
|
2016-02-10 02:03:33 +00:00
|
|
|
}
|