Summary: Added concept of a tree observer which is responsible for listening to the changes for a portion of the UI tree. This structure nests so Tree observers can hold child tree observers which emit events on a different cadence. This structure should allow us to incorporate different UI frameworks down the road as well as native android views. We push the tree updates from the tree observers onto a channel and setup a coroutine to consume this channel, serialize and send down the wire. Reviewed By: lblasa Differential Revision: D39276681 fbshipit-source-id: a4bc23b3578a8a10b57dd11fe88b273e1ce09ad8
102 lines
2.8 KiB
Groovy
102 lines
2.8 KiB
Groovy
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
apply plugin: 'com.android.library'
|
|
apply plugin: 'kotlin-android'
|
|
|
|
|
|
apply plugin: 'kotlinx-serialization'
|
|
|
|
android {
|
|
compileSdkVersion rootProject.compileSdkVersion
|
|
buildToolsVersion rootProject.buildToolsVersion
|
|
ndkVersion rootProject.ndkVersion
|
|
// Uncomment this and enable the database plugin test when roboelectric is upgraded
|
|
// testOptions.unitTests.includeAndroidResources = true
|
|
|
|
defaultConfig {
|
|
minSdkVersion rootProject.minSdkVersion
|
|
targetSdkVersion rootProject.targetSdkVersion
|
|
buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true'
|
|
buildConfigField "boolean", "IS_ASAN_BUILD", 'false'
|
|
buildConfigField "boolean", "LOAD_FLIPPER_EXPLICIT", 'false'
|
|
|
|
ndk {
|
|
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
|
|
}
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_shared'
|
|
targets 'flipper', 'event_shared', 'event_extra_shared', 'event_core_shared'
|
|
}
|
|
}
|
|
}
|
|
|
|
lintOptions {
|
|
abortOnError false
|
|
}
|
|
|
|
sourceSets {
|
|
test {
|
|
java {
|
|
exclude 'com/facebook/flipper/plugins/facebook/**'
|
|
}
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
prefab true
|
|
}
|
|
|
|
packagingOptions {
|
|
exclude("**/libfbjni.so")
|
|
exclude("**/libc++_shared.so")
|
|
}
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
path './CMakeLists.txt'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly deps.proguardAnnotations
|
|
implementation deps.kotlinStdLibrary
|
|
|
|
implementation deps.kotlinCoroutinesAndroid
|
|
implementation deps.openssl
|
|
implementation deps.fbjni
|
|
implementation deps.soloader
|
|
implementation deps.jsr305
|
|
implementation deps.supportAppCompat
|
|
implementation deps.supportSqlite
|
|
implementation deps.websocket
|
|
implementation deps.kotlinxSerializationJson
|
|
|
|
|
|
testImplementation deps.mockito
|
|
testImplementation deps.robolectric
|
|
testImplementation deps.testCore
|
|
testImplementation deps.testRules
|
|
testImplementation deps.hamcrest
|
|
testImplementation deps.junit
|
|
}
|
|
}
|
|
|
|
// Patch below is used in case the 'configureCMake' task
|
|
// gets executed in parallel with the 'preBuild' task.
|
|
// Our CMakeFile expects third-party dependencies to be already
|
|
// in-place and patched.
|
|
tasks.matching { it.name.startsWith("configureCMake") }.all {
|
|
dependsOn(tasks.getByPath(':third-party:prepare'))
|
|
}
|
|
|
|
preBuild.dependsOn(tasks.getByPath(':third-party:prepare'))
|
|
|
|
apply plugin: 'com.vanniktech.maven.publish'
|