Files
flipper/android/build.gradle
Pascal Hartig cd6a5f9ff8 Reorganize native dep download and extraction (#154)
Summary:
This moves the native setup to a separate gradle file and unpacks everything outside the build folder. That way we don't throw everything away on every incremental build.

This is an intermediate step to get to a more declarative setup like Fresco has it and get rid of the individual hacks we have for every download.
Pull Request resolved: https://github.com/facebook/Sonar/pull/154

Reviewed By: jknoxville

Differential Revision: D8833812

Pulled By: passy

fbshipit-source-id: 2424c9d6e22e6092c04af344e06939b4a6aba041
2018-07-16 10:26:10 -07:00

79 lines
2.0 KiB
Groovy

apply plugin: 'com.android.library'
apply plugin: 'maven'
android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true'
ndk {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
externalNativeBuild {
cmake {
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_shared'
}
}
}
lintOptions {
abortOnError false
}
sourceSets {
main {
manifest {
srcFile './AndroidManifest.xml'
}
java {
srcDir 'android'
srcDir 'core'
srcDir 'plugins'
exclude 'console/ConsoleSonarPlugin.java'
exclude 'console/JavascriptEnvironment.java'
exclude 'console/JavascriptSession.java'
}
res {
srcDir 'res'
}
}
}
externalNativeBuild {
cmake {
path './CMakeLists.txt'
}
}
dependencies {
compileOnly deps.lithoAnnotations
implementation project(':fbjni')
implementation project(':third-party')
implementation deps.soloader
implementation deps.guava
implementation deps.jsr305
implementation deps.supportAppCompat
implementation deps.stetho
implementation deps.okhttp3
implementation deps.lithoCore
implementation deps.lithoWidget
implementation deps.rhino
}
}
preBuild.dependsOn(tasks.getByPath(':third-party:prepare'))
apply from: rootProject.file('gradle/release.gradle')
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
artifacts.add('archives', sourcesJar)