Skip to content

Commit

Permalink
Merge d9acb04 into d96b6d9
Browse files Browse the repository at this point in the history
  • Loading branch information
passy committed Nov 25, 2021
2 parents d96b6d9 + d9acb04 commit 5ca21d6
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/android-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: set up JDK 1.8
- name: set up JDK
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: Compute build cache
run: ./scripts/checksum-android.sh checksum-android.txt
- uses: actions/cache@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
- name: set up JDK
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: Write GPG Sec Ring
run: echo '${{ secrets.GPG_KEY_CONTENTS }}' | base64 -d > /tmp/secring.gpg
- name: Update gradle.properties
Expand Down
19 changes: 12 additions & 7 deletions android/sample/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.facebook.flipper.sample">
xmlns:tools="http://schemas.android.com/tools"
package="com.facebook.flipper.sample">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application
android:name=".FlipperSampleApplication"
android:label="@string/app_name"
android:icon="@drawable/ic_launcher"
android:allowBackup="false"
android:theme="@style/NoTitleBarWhiteBG"
android:debuggable="true">
<activity android:name=".MainActivity">
android:debuggable="true"
tools:ignore="HardcodedDebugMode">
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand All @@ -31,23 +33,26 @@
<data android:scheme="flipper" android:host="demo_page" />
</intent-filter>
</activity>
<activity android:name=".DeepLinkActivity">
<activity android:name=".DeepLinkActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="flipper" android:host="deep_link_activity" />
</intent-filter>
</activity>
<activity android:name=".LayoutTestActivity">
<activity android:name=".LayoutTestActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="flipper" android:host="layout_test_activity" />
</intent-filter>
</activity>
<activity android:name=".FragmentTestActivity">
<activity android:name=".FragmentTestActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
Expand Down
2 changes: 1 addition & 1 deletion android/sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ dependencies {
debugImplementation project(':fresco-plugin')
debugImplementation project(':network-plugin')
debugImplementation project(':litho-plugin')
debugImplementation project(':leakcanary-plugin')
debugImplementation project(':leakcanary2-plugin')
releaseImplementation project(':noop')
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
import com.facebook.flipper.plugins.leakcanary.LeakCanaryFlipperPlugin;
import com.facebook.flipper.plugins.leakcanary2.LeakCanary2FlipperPlugin;
import com.facebook.flipper.plugins.navigation.NavigationFlipperPlugin;
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
Expand Down Expand Up @@ -50,7 +50,7 @@ public static IntializationResult initFlipperPlugins(Context context, FlipperCli
Arrays.asList(
new SharedPreferencesDescriptor("sample", Context.MODE_PRIVATE),
new SharedPreferencesDescriptor("other_sample", Context.MODE_PRIVATE))));
client.addPlugin(new LeakCanaryFlipperPlugin());
client.addPlugin(new LeakCanary2FlipperPlugin());
client.addPlugin(new FrescoFlipperPlugin());
client.addPlugin(new ExampleFlipperPlugin());
client.addPlugin(CrashReporterPlugin.getInstance());
Expand Down
7 changes: 3 additions & 4 deletions android/tutorial/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ android {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.32"
implementation "androidx.appcompat:appcompat:1.3.1"
implementation "androidx.core:core-ktx:1.5.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$KOTLIN_VERSION"
implementation "androidx.appcompat:appcompat:1.4.0"
implementation "androidx.core:core-ktx:1.7.0"

// Flipper
// For simplicity, we use Flipper for both debug and release builds here.
Expand All @@ -50,7 +50,6 @@ dependencies {
implementation project(':fresco-plugin')
implementation project(':network-plugin')
implementation project(':litho-plugin')
implementation project(':leakcanary-plugin')
implementation deps.soloader

// Litho
Expand Down
4 changes: 3 additions & 1 deletion android/tutorial/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@
<application
android:name=".TutorialApplication"
android:allowBackup="true"
android:fullBackupOnly="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ import com.facebook.litho.fresco.FrescoImage
@LayoutSpec
object SingleImageComponentSpec {

@PropDefault val imageAspectRatio = 1f
@get:PropDefault
val imageAspectRatio = 1f

@OnCreateLayout
fun onCreateLayout(
c: ComponentContext,
@Prop image: Uri,
@Prop(optional = true) imageAspectRatio: Float
): Component =
Fresco.newDraweeControllerBuilder().setUri(image).build().let {
FrescoImage.create(c).controller(it).imageAspectRatio(imageAspectRatio).build()
}
@OnCreateLayout
fun onCreateLayout(
c: ComponentContext,
@Prop image: Uri,
@Prop(optional = true) imageAspectRatio: Float
): Component =
Fresco.newDraweeControllerBuilder().setUri(image).build().let {
FrescoImage.create(c).controller(it).imageAspectRatio(imageAspectRatio).build()
}
}
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.android.tools.build:gradle:7.0.3'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.5.31"
Expand All @@ -31,7 +31,6 @@ subprojects {
google()
mavenLocal()
mavenCentral()
jcenter()

if (isSnapshot()) {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
Expand All @@ -46,8 +45,8 @@ subprojects {

ext {
minSdkVersion = 15
targetSdkVersion = 30
compileSdkVersion = 30
targetSdkVersion = 31
compileSdkVersion = 31
buildToolsVersion = '30.0.2'
ndkVersion = '23.0.7599858'
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ POM_DEVELOPER_NAME=facebook
POM_ISSUES_URL=https://github.com/facebook/flipper/issues/

# Shared version numbers
LITHO_VERSION=0.39.0
LITHO_VERSION=0.41.1
ANDROIDX_VERSION=1.3.0
KOTLIN_VERSION=1.3.72
KOTLIN_VERSION=1.6.0

# Gradle internals
org.gradle.internal.repository.max.retries=10
Expand Down

0 comments on commit 5ca21d6

Please sign in to comment.