Summary:
^
This change makes it clearer the order of tasks for the native libraries.
If unspecified, tasks will run in parallel.
There was an additional issue in which the revision could be written to disk before all dependencies are properly downloaded and packaged.
For reference, we depend on Folly.
Folly depends on:
- Double-Conversion
- Glog
- Boost
- LibEvent
This is now reflected in the tasks graph.
Reviewed By: passy
Differential Revision: D35931187
fbshipit-source-id: ec19a28521ebf318bd1e92feafab1671733679ca
Summary:
I've been really sweating about this one. It looks like Google now removed NDK 21 as it's too old. However, we've been struggling with the upgrade because OpenSSL was built against an old version of the NDK/glibc/LLVM/some other stuff.
I've now managed to create an OpenSSL distribution for 1.1.1k (we had 1.1.0h before) that seems to build with this after some small modifications.
This seems to do the trick, but I wouldn't be shocked if we found some more incompatibilities further down the line.
Pull Request resolved: https://github.com/facebook/flipper/pull/2836
Test Plan:
- Locally: `./gradlew :tutorial:installDebug`. Builds, starts up. Cool.
- Public GitHub CI: Happy.
- Circle CI: Only triggers post-land. We'll see. But the setup is simple, so hopefully it should work there, too.
- Internal CI: Waiting for signal.
Reviewed By: fabiomassimo
Differential Revision: D30839209
Pulled By: passy
fbshipit-source-id: efe599f28cc0edfdf2149f905c3483555239edc0
Summary:
Got really annoyed with Boost *always* downloading the tar ball on every
build. We had some methods annotated to only run whenever our cache
is out of date and for others we relied on a catch-all at the end which
actually didn't do anything.
If anyone knows Gradle better, please give it a shot.
Pull Request resolved: https://github.com/facebook/flipper/pull/2025
Test Plan:
Changed the URL to something that doesn't exist and it still didn't
re-fetch. Haha, got you!
Reviewed By: mweststrate
Differential Revision: D26843903
Pulled By: passy
fbshipit-source-id: 8c8cf60440d6bf6d7a93eebb7871858b1e6c6509
Summary:
Forgot to add it here previously, so it will diverge
from others if there's a global NDK env var set.
Reviewed By: nikoant
Differential Revision: D21061431
fbshipit-source-id: 0a90211a63497bac467b2b9598c7c058145857cc
Summary:
This is in line with the most recent stable Android Studio Release.
Pull Request resolved: https://github.com/facebook/flipper/pull/958
Test Plan:
Used it myself.
Open Source CI required a higher NDK, so let's first check what CI says to that internally now.
Reviewed By: jknoxville
Differential Revision: D20794634
Pulled By: passy
fbshipit-source-id: c32f934634b036ad3c1cad9fc49541e585d64329
Summary: Remove asan checker, we can use `BuildConfig.IS_ASAN_BUILD` to check whether it's a asan build to instead of invoking a JNI api.
Differential Revision: D20088093
fbshipit-source-id: f26d367430a983fbe7b630919a4131fdf2e2d510
Summary:
# Summary
Folly became once again incompatible with the Android NDK, which caused our CI to fail to produce sample APK builds on release. I managed to repro this on my machine and it's working again now.
Sadly, I had to patch another file manually because something about the template parameter inference wasn't working ...
# Notes
This was done by first bumping the version, then going through the compiler errors and simply removing the lines that the C++ compiler in the NDK had trouble inferring the types for. We were lucky in that the exported symbols this affected weren't actually used, so I copied over the file to `overrides/Folly/` and set up another copy rule in Gradle.
# Meta
Pull Request resolved: https://github.com/facebook/flipper/pull/809
Test Plan:
```
./gradlew :sample:assembleDebug
```
Internal, external CI.
Reviewed By: mweststrate
Differential Revision: D19948797
Pulled By: passy
fbshipit-source-id: b2e98d3a5c89b0fc77c157683cde90997232fee0
Summary: It's getting really tedious to turn these off one by one.
Reviewed By: jknoxville
Differential Revision: D17366198
fbshipit-source-id: 25443d7a18c81cd18edea21d75cfa70e4fbf4171
Summary: This got really badly mauled by a codemod I reckon.
Reviewed By: jknoxville
Differential Revision: D17366199
fbshipit-source-id: 6f1863e5e3d3ed26753723cf666b70655601a8de
Summary:
This has been tripping up the release builds, luckily caught by
Circle: https://circleci.com/gh/facebook/flipper/1480
Reviewed By: jknoxville
Differential Revision: D17282130
fbshipit-source-id: a17adb18bc75e4fa5d645a062343622167785fa6
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/538
Upgrades libevent to the August release 2.1.11.
Some notable things:
- The CMake file they ship with is actually broken. It contains a reference to an "uninstall.cmake" script that they don't include in the archive.
- There is some git magic in the CMake script which throws very annoying warnings if you're not in a git repository and if you are, it's still super useless because it assumes it's the libevent repo.
- I've removed the uninstall reference and replaced version detection magic with hardcoded values. The result is the "CMakeLists.txt" in the overrides folder. For future upgraders: You'll have to either remove the override or apply similar steps to the next release.
- The `event-config.h` is simply one of the outputs I found under `android/build/libevent/x86/include/event2/event-config.h`. They seem to be stable across architectures so it's easier to just copy it over than to fix the CMake logic that should actually pick it up from the Android build path.
- The cmake target names have changed and have an underscore in them, now.
- Verified with an SDK 28 x86_64 that this does fix https://github.com/facebook/flipper/issues/482.
Fixes GH482.
Reviewed By: jknoxville
Differential Revision: D17164731
fbshipit-source-id: 642744118065bea2674dbb0e1af91a11598066cc
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/463
Was made aware [here](https://github.com/facebook/flipper/issues/461) that
we currently don't build with NDK 20 because of Folly. The above issue exists only for x86 platform and not for other platform. I have updated the folly and RSocket. Although this diff doesn't solve the issue mentioned above for x86, but it updates the dependencies to the latest version. To mitigate temporarily, I have updated the gradle to not build for x86.
Reviewed By: passy
Differential Revision: D15713205
fbshipit-source-id: 79dd5825b0b876c87a1868fde8f3353a76012267
Summary:
This is because `doLast` may happen after the cleanup came around to undo `createNativeDepsDirectories` specified as dependency.
Pull Request resolved: https://github.com/facebook/flipper/pull/436
Reviewed By: jknoxville
Differential Revision: D15260597
Pulled By: passy
fbshipit-source-id: b752af2b71217ebc1d802b43f1585e858a41fc00
Summary: I hope that this takes care of all the android violations.
Reviewed By: danielbuechele
Differential Revision: D15199150
fbshipit-source-id: 0f5b4edc1bc9d38de0885f88bb2c3e43acfa09cd
Summary:
Without this, running clean as part of a longer build
chain will fail because it tries to write to a directory
which got removed in a previous step.
Reviewed By: jknoxville
Differential Revision: D15197982
fbshipit-source-id: 296f5a30661a6e2138c0e37f0103f1b6a82bcfc9
Summary: Last big batch of adding license headers in Java code where they were missing.
Reviewed By: jknoxville
Differential Revision: D15164860
fbshipit-source-id: 4c0a61eec7b5659fdc674ebed85f2ade60dd0aa0
Summary:
Not sure why, but if we stick this in the build folder,
the artifacts get downloaded every single time despite `onlyIfNewer`.
Reviewed By: jknoxville
Differential Revision: D14132383
fbshipit-source-id: 464e4a6e474877c16a06a6e83ccd1a2e355cbea2
Summary: This was recommended by my Android Studio 3.3 when starting up, so let's do this.
Reviewed By: jknoxville
Differential Revision: D13302768
fbshipit-source-id: c38601659bde4515d62b31efbd907b44304aafba
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/277
Link all dynamically loaded libraries statically with the exception of libevent.
Reviewed By: jknoxville
Differential Revision: D9967422
fbshipit-source-id: b33cec5da0c2b34f47217353f205b9d77f1acae2
Summary:
This soft-breaks Android Studio support because folder names no longer map to package names, but this will be mitigated by future diffs.
Steps taken for rename:
```
cd xplat/sonar/android/;
ambr 'com.facebook.sonar' 'com.facebook.flipper'
```
Reviewed By: danielbuechele
Differential Revision: D9850009
fbshipit-source-id: d26d8ab783e7050e4e2fbdd0c35eae3f97879464
Summary:
See https://github.com/facebook/flipper/issues/230 for a longer
explanation.
It turns out that many of the tasks in `native.gradle` (at least
`prepareGlog` which modifies files inside the source directory, but also
others) cause the cmake cache to invalidate.
Because we run those tasks unconditionally, we need to recompile all our
C++ code even when unmodified.
I fix this by adding a manual cache key to this which simply skips all
the tasks unless an up-to-date `external_cache_revision.txt` is found.
This is a bit hacky, but the alternatives are a) convincing cmake that
these modifications are not recompile-worthy which I have no idea how to
do and which might be impossible to do `mtime` on the files touches, or
b) having fine-grained `onlyIf` rules for every task which can easily
break. This seems the most straight-forward option.
Fixes#230.
Pull Request resolved: https://github.com/facebook/flipper/pull/242
Reviewed By: jknoxville
Differential Revision: D9381340
Pulled By: passy
fbshipit-source-id: a7db55aacac4a29076c29298d6c5b97d8bc91f66
Summary:
I'm "mirroring" the tarball so we can download this from
Java. Even JDK 8 doesn't like LetsEncrypt yet.
Reviewed By: danielbuechele
Differential Revision: D9264373
fbshipit-source-id: abb91fb72d74dccde4775cc852a93d75dd5a48e5
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
Summary:
Compile against a static version of OpenSSL for better compatibility
with apps that already use OpenSSL in some fashion.
Pull Request resolved: https://github.com/facebook/Sonar/pull/149
Reviewed By: priteshrnandgaonkar
Differential Revision: D8804169
Pulled By: passy
fbshipit-source-id: 4de66a77806a3b3f01b2cf5f253916f2cf6f48e8
Summary:
Remove left over from local testing.
Closes https://github.com/facebook/Sonar/pull/127
Reviewed By: danielbuechele
Differential Revision: D8723789
Pulled By: passy
fbshipit-source-id: f08203a441c35860dd5257a0ec147d1bf9c3da60
Summary:
Add the required compiler flag for Folly when building x86_64.
I'll prepare a new release for this shortly.
Depends on #126
Closes https://github.com/facebook/Sonar/pull/128
Reviewed By: danielbuechele
Differential Revision: D8731955
Pulled By: priteshrnandgaonkar
fbshipit-source-id: 9511811b0b51205989a5200ad9d0d8689ca684cb
Summary:
This uses OpenSSL 1.1.0h to build and link against. The `.so`s are
precompiled and hand-patched from [this
repository](https://github.com/passy/android-database-sqlcipher). The
patching was necessary to fix the `SONAME` and corresponding `NEEDED`
flags to *not* contain a `.1.1` version suffix as Gradle will refuse to
bundle those.
We basically only use the headers for the remaining part.
The precompiled version contains ABI support for `arm64-v8a`, `armeabi`,
`armeabi-v7a`, `x86` and most importantly `x86_64`. HOWEVER, `x86_64` is
still excluded for now because folly fails to compile due to a missing
compiler flag:
```
error: needs target feature pclmul
```
This should be easily fixable by ensuring that `-mpclmul` is added to
the CFLAGS if we're compiling for an `x86_64` target in the
`CMakeLists.txt` for Folly.
Closes#113.
Closes https://github.com/facebook/Sonar/pull/125
Reviewed By: priteshrnandgaonkar
Differential Revision: D8723636
Pulled By: passy
fbshipit-source-id: 41c61047d2793ebaef5793a3c937c4d628471d6a
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
Summary: Currently while building thru gradle got the error that armeabi is not supported.The supported ABI's by ndk are x86, x86_64, armeabi-v71, arm64
Reviewed By: danielbuechele
Differential Revision: D8611628
fbshipit-source-id: 80d9449c35a69aab020412b523f5c21fe6661de8