Summary: This removes Bintray/JCenter specific code and replaces it with a new plugin recommended by [Chris Banes](https://chris.banes.dev/publishing-to-maven-central/). Pull Request resolved: https://github.com/facebook/flipper/pull/1914 Test Plan: Manually uploaded as snapshot and full release, but with this setup still requires all sorts of manual setup, including GPG. Next PR will include automation for this. CI here should also verify that I didn't split this diff up incorrectly. Reviewed By: jknoxville Differential Revision: D26367350 Pulled By: passy fbshipit-source-id: faa6b488d6c95bc643d2f9328362e29fb4b05ded
126 lines
3.3 KiB
Groovy
126 lines
3.3 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.library'
|
|
apply plugin: 'maven'
|
|
|
|
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++_static'
|
|
targets 'flipper', 'event_shared', 'event_extra_shared', 'event_core_shared'
|
|
}
|
|
}
|
|
}
|
|
|
|
lintOptions {
|
|
abortOnError false
|
|
}
|
|
|
|
configurations {
|
|
extractHeaders
|
|
extractJNI
|
|
}
|
|
|
|
sourceSets {
|
|
test {
|
|
java {
|
|
exclude 'com/facebook/flipper/plugins/facebook/**'
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
path './CMakeLists.txt'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly deps.proguardAnnotations
|
|
implementation 'com.facebook.fbjni:fbjni:0.0.2'
|
|
extractHeaders 'com.facebook.fbjni:fbjni:0.0.2:headers'
|
|
extractJNI 'com.facebook.fbjni:fbjni:0.0.2'
|
|
implementation deps.soloader
|
|
implementation deps.jsr305
|
|
implementation deps.supportAppCompat
|
|
implementation deps.supportSqlite
|
|
|
|
testImplementation deps.mockito
|
|
testImplementation deps.robolectric
|
|
testImplementation deps.testCore
|
|
testImplementation deps.testRules
|
|
testImplementation deps.hamcrest
|
|
testImplementation deps.junit
|
|
|
|
api 'com.parse.bolts:bolts-tasks:1.4.0'
|
|
api 'com.parse.bolts:bolts-applinks:1.4.0'
|
|
}
|
|
}
|
|
|
|
preBuild.dependsOn(tasks.getByPath(':third-party:prepare'))
|
|
|
|
apply plugin: 'com.vanniktech.maven.publish'
|
|
|
|
task sourcesJar(type: Jar) {
|
|
from android.sourceSets.main.java.srcDirs
|
|
classifier = 'sources'
|
|
}
|
|
|
|
artifacts.add('archives', sourcesJar)
|
|
|
|
task extractAARHeaders {
|
|
doLast {
|
|
configurations.extractHeaders.files.each {
|
|
def file = it.absoluteFile
|
|
copy {
|
|
from zipTree(file)
|
|
into "$buildDir/$file.name"
|
|
include "**/*.h"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
task extractJNIFiles {
|
|
doLast {
|
|
configurations.extractJNI.files.each {
|
|
def file = it.absoluteFile
|
|
copy {
|
|
from zipTree(file)
|
|
into "$buildDir/$file.name"
|
|
include "jni/**/*"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.whenTaskAdded { task ->
|
|
if (task.name.contains('externalNativeBuild')) {
|
|
task.dependsOn(extractAARHeaders)
|
|
task.dependsOn(extractJNIFiles)
|
|
}
|
|
}
|