Commit Graph

46 Commits

Author SHA1 Message Date
Pascal Hartig
43530e3bbf Upgrade compose deps (#5247)
Summary:
[android][sample] Upgrade compose deps
Was dependent on SDK 34.

Pull Request resolved: https://github.com/facebook/flipper/pull/5247

Test Plan:
 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/flipper/pull/5247).
* __->__ https://github.com/facebook/flipper/issues/5247
* https://github.com/facebook/flipper/issues/5246
* https://github.com/facebook/flipper/issues/5245

Reviewed By: lblasa

Differential Revision: D50599220

Pulled By: passy

fbshipit-source-id: 54038274ba894264c4027e48799ce6d0ceda4e82
2023-11-01 03:38:11 -07:00
Pascal Hartig
b0f9da8ed7 Bump fresco to 3.1.0 (#5158)
Summary:
[android] Bump fresco to 3.1.0

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/flipper/pull/5158).
* https://github.com/facebook/flipper/issues/5160
* https://github.com/facebook/flipper/issues/5159
* __->__ https://github.com/facebook/flipper/issues/5158

Pull Request resolved: https://github.com/facebook/flipper/pull/5158

Reviewed By: antonk52

Differential Revision: D49411899

Pulled By: passy

fbshipit-source-id: b3a7a02a61665425c5c59a04d82941d0cbbea254
2023-09-19 06:15:20 -07:00
Alexander Oprisnik
79e3abf6eb Migrate Flipper samples to use Fresco Vito (#4861)
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/4861

Reviewed By: steelrooter

Differential Revision: D46149846

fbshipit-source-id: 3b2a89da2a4e5ea2ee325e035e793ee18c5ce86d
2023-06-27 09:28:59 -07:00
Pascal Hartig
820cf6a75e Add jetpack compose to sample app
Summary: Add an entry to the sample app to showcase Jetpack compose support. Note that you need to enable View Attribute Debugging in the Android Debug settings for this to work.

Reviewed By: lblasa

Differential Revision: D46933645

fbshipit-source-id: fbe2ddd50ef0e7917ef873959db5b3f35b833cf0
2023-06-23 14:42:14 -07:00
Pascal Hartig
65f28ecdbe Upgrade Kotlin to 1.8.20 (#4753)
Summary:
[android] Upgrade Kotlin to 1.8.20
The additional source/target settings should hopefully no longer be necessary with
AGP 8.1:

https://kotlinlang.org/docs/gradle-configure-project.html#gradle-java-toolchains-support

Pull Request resolved: https://github.com/facebook/flipper/pull/4753

Test Plan:
- CI
- Build sample app
- AS sync

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/flipper/pull/4753).
* https://github.com/facebook/flipper/issues/4759
* https://github.com/facebook/flipper/issues/4758
* https://github.com/facebook/flipper/issues/4757
* https://github.com/facebook/flipper/issues/4756
* https://github.com/facebook/flipper/issues/4755
* https://github.com/facebook/flipper/issues/4754
* __->__ https://github.com/facebook/flipper/issues/4753
* https://github.com/facebook/flipper/issues/4752
* https://github.com/facebook/flipper/issues/4751

Reviewed By: ivanmisuno

Differential Revision: D46068906

Pulled By: passy

fbshipit-source-id: 93da60ebfe2ec590ef88ea1936fcfd5257699cc7
2023-05-23 10:16:38 -07:00
Pascal Hartig
4e0bbb62fe Upgrade gradle plugin (#4751)
Summary:
[android] Upgrade gradle project
Makes us compatible with Android Studio Flamingo and unlocks upgrades to Kotlin
(which we need to be in sync with fbsource).

Pull Request resolved: https://github.com/facebook/flipper/pull/4751

Test Plan:
- ./gradlew :android:assembleDebug
- Android Studio Sync
- CI

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/flipper/pull/4751).
* https://github.com/facebook/flipper/issues/4759
* https://github.com/facebook/flipper/issues/4758
* https://github.com/facebook/flipper/issues/4757
* https://github.com/facebook/flipper/issues/4756
* https://github.com/facebook/flipper/issues/4755
* https://github.com/facebook/flipper/issues/4754
* https://github.com/facebook/flipper/issues/4753
* https://github.com/facebook/flipper/issues/4752
* __->__ https://github.com/facebook/flipper/issues/4751

Reviewed By: aigoncharov

Differential Revision: D46068236

Pulled By: passy

fbshipit-source-id: 707422134b49c0d940b663f6f40937fe6561a038
2023-05-23 08:48:24 -07:00
Sachin Tewari
2e31247486 Move flipper-fresco-plugin to fresco's repo from flipper's repo (#4546)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/4546

Move flipper-fresco-plugin to fresco's repo from flipper's repo

Reviewed By: passy

Differential Revision: D43467895

fbshipit-source-id: efea88563cf931baf4bda0c8bbdfbe41d0f769c5
2023-02-23 04:44:41 -08:00
Andres Suarez
79023ee190 Update copyright headers from Facebook to Meta
Reviewed By: bhamodi

Differential Revision: D33331422

fbshipit-source-id: 016e8dcc0c0c7f1fc353a348b54fda0d5e2ddc01
2021-12-27 14:31:45 -08:00
Pascal Hartig
8ccae8a7ac Upgrade Android build infra (#3095)
Summary:
This includes a bunch of different things which I wanted to do separately, but it's all a massive Jenga Tower and you cannot remove a single piece.

- Litho upgrade
- Gradle plugin upgrade
- Remove storage permission as it apparently doesn't do anything above Android 10
- Upgraded build target to Android 12 because the new support lib/Kotlin stdlib required this which then caused the issue below to pop up
- Added "export=true" everywhere as this is now a blocking issue if you don't have it
- Upgraded to the LeakCanary2 plugin as version one no longer builds with an Android 12 target for the export reason
- Make CI run on JRE 11 because that's required by the new Gradle plugin
- Update internal CI to no longer define the SDK twice and use Java 11

Pull Request resolved: https://github.com/facebook/flipper/pull/3095

Test Plan: Built Android Sample and Tutorial app, connected to Flipper.

Reviewed By: lblasa

Differential Revision: D32644410

Pulled By: passy

fbshipit-source-id: 8978f158d9c642b3bbd9dbbd7321eb20098a7a53
2021-11-25 12:21:59 -08:00
Pascal Hartig
d676f8f0a6 Bump AndroidX/Kotlin setup
Summary:
Just a few tweaks to bring AndroidX up-to-date. Required
some fixes to the Kotlin Tutorial as it was throwing
errors about JRE incompatibilities.

Reviewed By: fabiomassimo

Differential Revision: D29761484

fbshipit-source-id: 10cb76115fe7542a60b6e5d14be9c0434e85171c
2021-07-19 03:54:06 -07:00
Pascal Hartig
51e7ce3566 Fragment sample test (#1328)
Summary:
Wanted to have a way to test fragment support in open source for https://github.com/facebook/flipper/issues/1209.

Stacked on https://github.com/facebook/flipper/issues/1327.
Pull Request resolved: https://github.com/facebook/flipper/pull/1328

Test Plan: ![Screenshot 2020-07-02 12 10 17](https://user-images.githubusercontent.com/9906/86352544-dc2ae300-bc5d-11ea-91f8-f6b06437f7bc.png)

Reviewed By: jknoxville

Differential Revision: D22356283

Pulled By: passy

fbshipit-source-id: 2ad84df0aae85634c8245e71f18b803ce8dd6ca0
2020-07-03 04:02:31 -07:00
Pascal Hartig
99a4884fad Bump Gradle plugin to 3.6.1 (#958)
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
2020-04-06 06:43:43 -07:00
Andres Suarez
0675dd924d Tidy up Flipper license headers [1/2]
Reviewed By: passy

Differential Revision: D17863711

fbshipit-source-id: 259dc77826fb803ff1b88c88529d7f679d3b74d8
2019-10-11 13:46:45 -07:00
Chaiwat Ekkaewnumchai
053cfc09f3 Make LeakCanary a Separate Plugin
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/559

Reviewed By: passy

Differential Revision: D17546936

fbshipit-source-id: dce128a771b73e8b18dfc2b78ee99502c3f1ce86
2019-09-25 03:05:56 -07:00
Pascal Hartig
2baadf9867 Make litho/sections a separate plugin
Summary:
Breaking Litho/Sections off. Doesn't really make sense to have
two deps for this especially since they're pretty tightly coupled.

This makes our core already quite slim.

Reviewed By: jknoxville

Differential Revision: D17420118

fbshipit-source-id: 9a03911f4af6410745b9aefd0e6a75bdf106660f
2019-09-19 03:02:51 -07:00
Pascal Hartig
c4a9b603e2 Make network a separate plugin
Summary: Per title.

Reviewed By: jknoxville

Differential Revision: D17419678

fbshipit-source-id: aee00f077b7ed955c60884853dc1128d27366ee8
2019-09-19 03:02:51 -07:00
Pascal Hartig
7ac82bec4e Make fresco a stand-alone gradle project (#548)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/548

First project to pull out of the "fat distribution" we currently have.
Still needs setup for Maven and registration in Bintray.

Reviewed By: jknoxville

Differential Revision: D17395660

fbshipit-source-id: 6244495a2e25d705dd930ef87c7e5e1f038eb921
2019-09-19 03:02:51 -07:00
Pascal Hartig
f584eb05dd Another round of header updates
Summary: I hope that this takes care of all the android violations.

Reviewed By: danielbuechele

Differential Revision: D15199150

fbshipit-source-id: 0f5b4edc1bc9d38de0885f88bb2c3e43acfa09cd
2019-05-03 09:59:33 -07:00
Pascal Hartig
2e65ab7133 Reorganise sample into debug/release flavours
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
2019-05-01 08:38:22 -07:00
Pascal Hartig
b7fff23700 Move example plugin out of core
Summary:
We should not ship this as part of our distribution.
Just meant we had to bifurcate our unit tests which
is a bit awkward, but it works now.

Reviewed By: jknoxville

Differential Revision: D15146980

fbshipit-source-id: 496b000630bbfcaa663cddacb00550e1499a1279
2019-05-01 08:38:22 -07:00
Pascal Hartig
c5e77220fc Remove dangling TODO comment
Summary: No longer relevant.

Reviewed By: jknoxville

Differential Revision: D15146917

fbshipit-source-id: 830a8193b128a8177610269b6e7f37fb8f1ee74e
2019-04-30 13:13:00 -07:00
Pascal Hartig
8ba4feba66 Add gradle license headers
Summary: Some more will follow.

Reviewed By: jknoxville

Differential Revision: D15146750

fbshipit-source-id: b78331b1fb00f357812e598165d6def62e2a89c8
2019-04-30 05:34:59 -07:00
John Knox
6f8d6ddd85 Sample app requires API 21+
Summary:
Currently running the sample app on a pre-21 device produces a runtime error. This is because it includes OkHttp which requires 21+.

So this change just stops the sample app from being installable on pre-21 devices.

```
FATAL EXCEPTION: main
Process: com.facebook.flipper.sample, PID: 19629
java.lang.ExceptionInInitializerError
	at okhttp3.OkHttpClient.newSslSocketFactory(OkHttpClient.java:263)
	at okhttp3.OkHttpClient.<init>(OkHttpClient.java:229)
	at okhttp3.OkHttpClient$Builder.build(OkHttpClient.java:1015)
	at com.facebook.flipper.sample.FlipperSampleApplication.onCreate(FlipperSampleApplication.java:54)
	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4344)
	at android.app.ActivityThread.access$1500(ActivityThread.java:135)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:136)
	at android.app.ActivityThread.main(ActivityThread.java:5017)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:515)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
	at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: Expected Android API level 21+ but was 19
	at okhttp3.internal.platform.AndroidPlatform.buildIfSupported(AndroidPlatform.java:238)
	at okhttp3.internal.platform.Platform.findPlatform(Platform.java:202)
	at okhttp3.internal.platform.Platform.<clinit>(Platform.java:79)
	... 16 more
```

Reviewed By: passy

Differential Revision: D14953859

fbshipit-source-id: 8289c19e837f1d3739e120dc5a0f53111b800ca0
2019-04-17 06:55:48 -07:00
Pascal Hartig
9389a8e919 Bump some more dependencies (#414)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/414

Some more minor upgrades.

Reviewed By: jknoxville

Differential Revision: D14933687

fbshipit-source-id: 35bfcbb2ab3e552e430d8a2e3e30fb3568fab6c9
2019-04-15 09:57:59 -07:00
Pascal Hartig
59881f1888 Bump okhttp
Summary:
Requires some compile options as it uses newer Java features.
Post here: https://github.com/square/okhttp/issues/4597#issuecomment-461204144

Reviewed By: jknoxville

Differential Revision: D14933502

fbshipit-source-id: 265c43f2d9ae61fa9f6f42516fc6eb899af7f072
2019-04-15 06:55:21 -07:00
Pascal Hartig
fbe9e3a086 Prepare for Fresco stable release (#385)
Summary:
This unblocks our open source releases.

Pull Request resolved: https://github.com/facebook/flipper/pull/385

Reviewed By: danielbuechele

Differential Revision: D14299867

Pulled By: passy

fbshipit-source-id: d9ce29d0d0713cd54f6d8bed03e7a919f443f44b
2019-03-04 09:03:10 -08:00
Pascal Hartig
d371a211a8 Set up Fresco in sample app
Summary:
This looks bad. There are two things I want to follow up on in future
diffs before landing this:

- Make loading the image conditional by adding another button.
- Add a default constructor to the plugin that avoids this crazy bit of boilerplate.

Reviewed By: oprisnik

Differential Revision: D14165569

fbshipit-source-id: 25c5fbaee32e72c6469979cda694cc9f13a92166
2019-02-22 02:51:33 -08:00
Pascal Hartig
7eb1546f25 Move version specifier
Summary: Android Studio keeps loudly complaining about this.

Reviewed By: priteshrnandgaonkar

Differential Revision: D13376394

fbshipit-source-id: 6163977bb013dff214aa684662e4879a19a7a786
2018-12-07 06:50:47 -08:00
Pascal Hartig
a7fd546f0e Add basic integration test
Summary:
Just a quick startup test that can save you the time of manually
opening the app.

I don't have any plans of hooking this up in Circle, but it's
still kinda useful to have.

Reviewed By: jknoxville

Differential Revision: D12901590

fbshipit-source-id: a16a1814574d9f27770dcf98c6b238517c589930
2018-11-02 07:09:51 -07:00
Pascal Hartig
c495c53cd4 Fix sample app build
Summary:
Two fixes included in this one. The debug flag is obvious, the annotations
less so. I'll try and find the right place to document this, but the reason
we need this here is because we reflect on `Prop.class`, so these need to be
available at runtime.

Reviewed By: jknoxville

Differential Revision: D9766713

fbshipit-source-id: 269b5a60c0df644f4fda0ea289ef9dc392ee352b
2018-09-11 07:57:16 -07:00
Pascal Hartig
cded1ceead Switch to Litho snapshot releases
Summary:
This allows breaking changes in Litho to be landed.
I'm also adding some helpers to determine if Flipper itself
is currently in a release or snapshot release train.

N.B. We don't publish snapshot releases for Flipper
right now, but will in the future where this will come in
handy.

Reviewed By: jknoxville

Differential Revision: D9359035

fbshipit-source-id: d21b607eca5d57caf4cc34234f6ba3cb0d8f307d
2018-08-16 06:56:30 -07:00
Pritesh Nandgaonkar
07d75ce848 Rename Sample app from Sonar to Flipper
Summary: Renamed sonar sample app with flipper

Reviewed By: passy

Differential Revision: D9050608

fbshipit-source-id: 4e76e4c6cc8febb997ce32b4f78a2fab9792310d
2018-07-31 14:02:58 -07:00
Pascal Hartig
07b083e570 Move sample source and resources to gradle dirs
Summary: Follow standard Gradle paths.

Reviewed By: priteshrnandgaonkar

Differential Revision: D8890133

fbshipit-source-id: 062331b6b3d5f118f07cb5ca14cdec871f75867b
2018-07-19 09:50:04 -07:00
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
Pascal Hartig
fcd1b1e773 Clean up dependencies (#153)
Summary:
Remove unused dependencies and centralise the remaining ones in the
global project config.
Pull Request resolved: https://github.com/facebook/Sonar/pull/153

Reviewed By: priteshrnandgaonkar

Differential Revision: D8820462

Pulled By: passy

fbshipit-source-id: 1c845898930eb62942379fddec6da39dbdc426d0
2018-07-12 09:05:55 -07:00
Pascal Hartig
0515ddb76e 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
2018-07-02 01:19:35 -07:00
Pascal Hartig
167792e7d8 Remove NDK build from fbjni sub-project (#116)
Summary:
We're already building this as dependency via CMake of sonar itself and
bundle the resulting `.so` files in there.

This project only contains the java files so we can ship them as
separate JAR.

Importantly, this avoids having to use `pickFirst` as we bundle multiple
incompatible `.so` files in both AARs.
Closes https://github.com/facebook/Sonar/pull/116

Reviewed By: priteshrnandgaonkar

Differential Revision: D8691119

Pulled By: passy

fbshipit-source-id: 82303d6c2b5d7e12dcd8f49300090ce8e4570e47
2018-06-29 06:47:31 -07:00
Pritesh Nandgaonkar
110ff1c353 Package prebuilt libraries in android target (#105)
Summary:
package prebuilt libraries in `:android` rather than in sample app
Closes https://github.com/facebook/Sonar/pull/105

Reviewed By: passy

Differential Revision: D8639064

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 4da20b046e2e55f0f605f91bf8809a4efd6848d9
2018-06-26 07:32:46 -07:00
Pritesh Nandgaonkar
64a61a37d4 Fix Broken sample app (#103)
Summary:
With this fix the entire android setup builds with gradle . To try out the sample app, run `./gradlew :sample:installDebug`
Closes https://github.com/facebook/Sonar/pull/103

Reviewed By: danielbuechele

Differential Revision: D8618622

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 62a038f95c37cbadf48636a58ca222c8162e256e
2018-06-25 11:33:44 -07:00
Pritesh Nandgaonkar
edfdd64950 [WIP] gradle builds but app freezes, updated fbjni so file is the possible culprit 2018-06-21 16:27:18 +01:00
Pritesh Nandgaonkar
7405cd268a Merge branch 'master' of https://github.com/facebook/Sonar into Fix-Android 2018-06-19 14:13:59 +01:00
Pritesh Nandgaonkar
88ecb9b494 app builds but not with sonarfb 2018-06-18 18:45:37 +01:00
Pascal Hartig
e820beba83 Centralize sample dependencies (#77)
Summary:
The support libraries where out of sync between the projects, causing
the sample build to fail with

```
> Android dependency 'com.android.support:appcompat-v7' has different version for the compile (26.1.0) and runtime (27.1.1) classpath. You should manually set the same version via DependencyResolution
```

This makes sure that the sample submodule uses the top-level
dependencies and same versions.
Closes https://github.com/facebook/Sonar/pull/77

Reviewed By: emilsjolander

Differential Revision: D8447186

Pulled By: passy

fbshipit-source-id: e391501edd97fdbe6456b32cd7305d8be26e20db
2018-06-15 09:40:22 -07:00
Pritesh Nandgaonkar
4cbaeb3e32 Android target and sample builds 👏 2018-06-15 16:53:58 +01:00
Daniel Buchele
6f95ad512f fbshipit-source-id: b14273e883aba6de7b817801a1b04e54a29a6366 2018-06-15 02:23:48 -07:00
Daniel Büchele
fbbf8cf16b Initial commit 🎉
fbshipit-source-id: b6fc29740c6875d2e78953b8a7123890a67930f2
Co-authored-by: Sebastian McKenzie <sebmck@fb.com>
Co-authored-by: John Knox <jknox@fb.com>
Co-authored-by: Emil Sjölander <emilsj@fb.com>
Co-authored-by: Pritesh Nandgaonkar <prit91@fb.com>
2018-06-01 11:03:58 +01:00