Summary: This makes use of the new no-op package and also structures the app into release and debug flavours that can be built with and without Flipper part of the APK. This was a pretty tedious adventure. I may have missed some corner cases and also restructured a bunch of seemingly unrelated stuff that was necessary to respect buck module boundaries. Reviewed By: jknoxville Differential Revision: D15148004 fbshipit-source-id: bf81f45105f5f16d17daccb3e8050ee00d69fc35
70 lines
1.7 KiB
Groovy
70 lines
1.7 KiB
Groovy
// Copyright (c) Facebook, Inc. and its 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.application'
|
|
|
|
android {
|
|
compileSdkVersion rootProject.compileSdkVersion
|
|
buildToolsVersion rootProject.buildToolsVersion
|
|
defaultConfig {
|
|
minSdkVersion 21
|
|
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
|
applicationId 'com.facebook.flipper.sample'
|
|
targetSdkVersion 28
|
|
}
|
|
|
|
lintOptions {
|
|
abortOnError false
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
manifest.srcFile './AndroidManifest.xml'
|
|
}
|
|
|
|
test {
|
|
java {
|
|
exclude 'com/facebook/flipper/plugins/facebook/**'
|
|
}
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
}
|
|
}
|
|
|
|
|
|
dependencies {
|
|
// Android Support Library
|
|
implementation deps.supportAppCompat
|
|
|
|
// Litho
|
|
implementation deps.lithoCore
|
|
implementation deps.lithoWidget
|
|
implementation deps.lithoAnnotations
|
|
implementation deps.lithoFresco
|
|
annotationProcessor deps.lithoProcessor
|
|
|
|
// Third-party
|
|
implementation deps.soloader
|
|
implementation deps.okhttp3
|
|
implementation deps.fresco
|
|
|
|
// Integration test
|
|
androidTestImplementation deps.testCore
|
|
androidTestImplementation deps.testRules
|
|
|
|
// Unit tests
|
|
testImplementation deps.mockito
|
|
testImplementation deps.robolectric
|
|
testImplementation deps.hamcrest
|
|
testImplementation deps.junit
|
|
|
|
debugImplementation project(':android')
|
|
releaseImplementation project(':noop')
|
|
}
|