Setup fbjni sub-project for maven (#119)
Summary: Set up our fbjni sub-project to be published to Maven Central. This removes a bunch of abiFilters that we no longer make use of, too. Closes https://github.com/facebook/Sonar/pull/119 Reviewed By: priteshrnandgaonkar Differential Revision: D8694537 Pulled By: passy fbshipit-source-id: de246fbda99c02856fbc7806b78df2114cb82acb
This commit is contained in:
committed by
Facebook Github Bot
parent
167792e7d8
commit
0515ddb76e
@@ -195,15 +195,15 @@ android {
|
|||||||
minSdkVersion rootProject.minSdkVersion
|
minSdkVersion rootProject.minSdkVersion
|
||||||
targetSdkVersion rootProject.targetSdkVersion
|
targetSdkVersion rootProject.targetSdkVersion
|
||||||
buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true'
|
buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true'
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters 'arm64-v8a', 'x86', 'armeabi-v7a'
|
abiFilters 'x86', 'armeabi-v7a', 'arm64-v8a'
|
||||||
stl 'c++_shared'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
arguments '-DANDROID_TOOLCHAIN=clang'
|
arguments '-DANDROID_TOOLCHAIN=clang',
|
||||||
arguments '-DANDROID_STL=c++_shared'
|
'-DANDROID_STL=c++_shared'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -236,10 +236,12 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(':fbjni')
|
|
||||||
implementation deps.soloader
|
|
||||||
compileOnly deps.lithoAnnotations
|
compileOnly deps.lithoAnnotations
|
||||||
implementation 'org.glassfish:javax.annotation:10.0-b28'
|
compileOnly 'org.glassfish:javax.annotation:10.0-b28'
|
||||||
|
|
||||||
|
implementation project(':fbjni')
|
||||||
|
|
||||||
|
implementation deps.soloader
|
||||||
implementation deps.guava
|
implementation deps.guava
|
||||||
implementation deps.jsr305
|
implementation deps.jsr305
|
||||||
implementation deps.supportAppCompat
|
implementation deps.supportAppCompat
|
||||||
@@ -253,6 +255,7 @@ android {
|
|||||||
|
|
||||||
project.afterEvaluate {
|
project.afterEvaluate {
|
||||||
preBuild.dependsOn prepareAllLibs
|
preBuild.dependsOn prepareAllLibs
|
||||||
|
}
|
||||||
|
|
||||||
apply from: rootProject.file('gradle/release.gradle')
|
apply from: rootProject.file('gradle/release.gradle')
|
||||||
|
|
||||||
@@ -260,4 +263,5 @@ task sourcesJar(type: Jar) {
|
|||||||
from android.sourceSets.main.java.srcDirs
|
from android.sourceSets.main.java.srcDirs
|
||||||
classifier = 'sources'
|
classifier = 'sources'
|
||||||
}
|
}
|
||||||
artifacts.add('archives', sourcesJar)}
|
|
||||||
|
artifacts.add('archives', sourcesJar)
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ android {
|
|||||||
minSdkVersion rootProject.minSdkVersion
|
minSdkVersion rootProject.minSdkVersion
|
||||||
targetSdkVersion rootProject.targetSdkVersion
|
targetSdkVersion rootProject.targetSdkVersion
|
||||||
buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true'
|
buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true'
|
||||||
ndk {
|
|
||||||
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
|
|
||||||
}
|
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
arguments '-DANDROID_TOOLCHAIN=clang'
|
arguments '-DANDROID_TOOLCHAIN=clang'
|
||||||
|
|||||||
4
android/third-party/Folly/build.gradle
vendored
4
android/third-party/Folly/build.gradle
vendored
@@ -8,10 +8,6 @@ android {
|
|||||||
minSdkVersion rootProject.minSdkVersion
|
minSdkVersion rootProject.minSdkVersion
|
||||||
targetSdkVersion rootProject.targetSdkVersion
|
targetSdkVersion rootProject.targetSdkVersion
|
||||||
buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true'
|
buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true'
|
||||||
ndk {
|
|
||||||
abiFilters 'arm64-v8a', 'x86', 'armeabi-v7a'
|
|
||||||
}
|
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_shared'
|
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_shared'
|
||||||
|
|||||||
4
android/third-party/LibEvent/build.gradle
vendored
4
android/third-party/LibEvent/build.gradle
vendored
@@ -7,10 +7,6 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion rootProject.minSdkVersion
|
minSdkVersion rootProject.minSdkVersion
|
||||||
targetSdkVersion rootProject.targetSdkVersion
|
targetSdkVersion rootProject.targetSdkVersion
|
||||||
ndk {
|
|
||||||
abiFilters 'arm64-v8a', 'x86', 'armeabi-v7a'
|
|
||||||
}
|
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
arguments '-DANDROID_TOOLCHAIN=clang'
|
arguments '-DANDROID_TOOLCHAIN=clang'
|
||||||
|
|||||||
4
android/third-party/OpenSSL/build.gradle
vendored
4
android/third-party/OpenSSL/build.gradle
vendored
@@ -7,10 +7,6 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion rootProject.minSdkVersion
|
minSdkVersion rootProject.minSdkVersion
|
||||||
targetSdkVersion rootProject.targetSdkVersion
|
targetSdkVersion rootProject.targetSdkVersion
|
||||||
ndk {
|
|
||||||
abiFilters 'arm64-v8a', 'x86', 'armeabi-v7a'
|
|
||||||
}
|
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
ndkBuild {
|
ndkBuild {
|
||||||
arguments "NDK_APPLICATION_MK:=$projectDir/jni/Application.mk",
|
arguments "NDK_APPLICATION_MK:=$projectDir/jni/Application.mk",
|
||||||
|
|||||||
4
android/third-party/RSocket/build.gradle
vendored
4
android/third-party/RSocket/build.gradle
vendored
@@ -7,10 +7,6 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion rootProject.minSdkVersion
|
minSdkVersion rootProject.minSdkVersion
|
||||||
targetSdkVersion rootProject.targetSdkVersion
|
targetSdkVersion rootProject.targetSdkVersion
|
||||||
ndk {
|
|
||||||
abiFilters 'arm64-v8a', 'x86', 'armeabi-v7a'
|
|
||||||
}
|
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
arguments '-DANDROID_TOOLCHAIN=clang'
|
arguments '-DANDROID_TOOLCHAIN=clang'
|
||||||
|
|||||||
4
android/third-party/glog/build.gradle
vendored
4
android/third-party/glog/build.gradle
vendored
@@ -8,10 +8,6 @@ android {
|
|||||||
minSdkVersion rootProject.minSdkVersion
|
minSdkVersion rootProject.minSdkVersion
|
||||||
targetSdkVersion rootProject.targetSdkVersion
|
targetSdkVersion rootProject.targetSdkVersion
|
||||||
buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true'
|
buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true'
|
||||||
ndk {
|
|
||||||
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
|
|
||||||
}
|
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
arguments '-DANDROID_TOOLCHAIN=clang'
|
arguments '-DANDROID_TOOLCHAIN=clang'
|
||||||
|
|||||||
@@ -7,11 +7,6 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion rootProject.minSdkVersion
|
minSdkVersion rootProject.minSdkVersion
|
||||||
targetSdkVersion rootProject.targetSdkVersion
|
targetSdkVersion rootProject.targetSdkVersion
|
||||||
|
|
||||||
ndk {
|
|
||||||
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
|
|
||||||
}
|
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_shared'
|
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_shared'
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
apply plugin: 'maven'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.compileSdkVersion
|
compileSdkVersion rootProject.compileSdkVersion
|
||||||
@@ -25,3 +26,15 @@ dependencies {
|
|||||||
compileOnly deps.lithoAnnotations
|
compileOnly deps.lithoAnnotations
|
||||||
implementation deps.soloader
|
implementation deps.soloader
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apply from: rootProject.file('gradle/release.gradle')
|
||||||
|
|
||||||
|
task sourcesJar(type: Jar) {
|
||||||
|
from android.sourceSets.main.java.srcDirs
|
||||||
|
classifier = 'sources'
|
||||||
|
}
|
||||||
|
artifacts.add('archives', sourcesJar)
|
||||||
|
|
||||||
|
tasks.withType(Javadoc).all {
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
|
|||||||
20
libs/fbjni/gradle.properties
Normal file
20
libs/fbjni/gradle.properties
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#
|
||||||
|
# Copyright 2014-present Facebook, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
POM_NAME=SonarFBJNI
|
||||||
|
POM_DESCRIPTION=Sonar-scoped FBJNI distribution
|
||||||
|
POM_ARTIFACT_ID=fbjni
|
||||||
|
POM_PACKAGING=aar
|
||||||
@@ -21,8 +21,6 @@ include ':libevent'
|
|||||||
include ':openssl'
|
include ':openssl'
|
||||||
include ':rsocket'
|
include ':rsocket'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
project(':fbjni').projectDir = file('libs/fbjni')
|
project(':fbjni').projectDir = file('libs/fbjni')
|
||||||
project(':easywsclient').projectDir = file('libs/easywsclient')
|
project(':easywsclient').projectDir = file('libs/easywsclient')
|
||||||
project(':sonarcpp').projectDir = file('xplat')
|
project(':sonarcpp').projectDir = file('xplat')
|
||||||
|
|||||||
@@ -7,11 +7,6 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion rootProject.minSdkVersion
|
minSdkVersion rootProject.minSdkVersion
|
||||||
targetSdkVersion rootProject.targetSdkVersion
|
targetSdkVersion rootProject.targetSdkVersion
|
||||||
|
|
||||||
ndk {
|
|
||||||
abiFilters 'arm64-v8a', 'x86'
|
|
||||||
}
|
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
arguments '-DANDROID_TOOLCHAIN=clang'
|
arguments '-DANDROID_TOOLCHAIN=clang'
|
||||||
|
|||||||
Reference in New Issue
Block a user