Skip to content

Commit fb0716c

Browse files
authored
Merge pull request #477 from oddbit/chore/toolchain-and-quality-improvements
Update toolchain versions and build quality config
2 parents ebc501e + 06d1299 commit fb0716c

File tree

11 files changed

+27
-16
lines changed

11 files changed

+27
-16
lines changed

analysis_options.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include: package:flutter_lints/flutter.yaml

android/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ group = "id.oddbit.flutter.facebook_app_events"
22
version = "1.0-SNAPSHOT"
33

44
buildscript {
5-
ext.kotlin_version = "1.9.24"
5+
ext.kotlin_version = "2.3.10"
66
repositories {
77
google()
88
mavenCentral()
99
}
1010

1111
dependencies {
12-
classpath("com.android.tools.build:gradle:8.5.2")
12+
classpath("com.android.tools.build:gradle:8.9.2")
1313
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
1414
}
1515
}
@@ -27,7 +27,7 @@ apply plugin: "kotlin-android"
2727
android {
2828
namespace "id.oddbit.flutter.facebook_app_events"
2929

30-
compileSdk = 34
30+
compileSdk = 35
3131

3232
compileOptions {
3333
sourceCompatibility = JavaVersion.VERSION_17
@@ -48,6 +48,7 @@ android {
4848

4949
defaultConfig {
5050
minSdk = 21
51+
consumerProguardFiles 'consumer-proguard-rules.pro'
5152
}
5253

5354
dependencies {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Preserve Facebook App Events classes used by this plugin.
2+
# Without this rule, R8 in the host app may strip App Events classes that are
3+
# only referenced reflectively by the Facebook App Events SDK, causing runtime crashes.
4+
-keep class com.facebook.appevents.** { *; }

android/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
org.gradle.parallel=true
2+
org.gradle.caching=true
3+
android.nonTransitiveRClass=true

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
# AGP 8.5.x pairs with Gradle 8.7
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
5+
# AGP 8.9.x pairs with Gradle 8.11.1
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip

example/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
3-
ext.kotlin_version = "1.9.24"
3+
ext.kotlin_version = "2.3.10"
44
repositories {
55
google()
66
mavenCentral()
77
}
88

99
dependencies {
10-
classpath 'com.android.tools.build:gradle:8.5.2'
10+
classpath 'com.android.tools.build:gradle:8.9.2'
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1212
}
1313
}

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
66

7-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
7+
# AGP 8.9.x pairs with Gradle 8.11.1
8+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip

ios/facebook_app_events.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Flutter plugin for Facebook Analytics and App Events
1212
s.source_files = 'facebook_app_events/Sources/facebook_app_events/**/*.{swift}'
1313
s.static_framework = true
1414
s.dependency 'Flutter'
15-
s.swift_version = '5.0'
16-
s.ios.deployment_target = '12.0'
15+
s.swift_version = '5.9'
16+
s.ios.deployment_target = '13.0'
1717

1818
# Do not specify PATCH version of FBSDKCoreKit. See README file for explanation
1919
# https://github.com/oddbit/flutter_facebook_app_events#dependencies-on-facebook-sdk

ios/facebook_app_events/Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ import PackageDescription
1111
let package = Package(
1212
name: "facebook_app_events",
1313
platforms: [
14-
.iOS(.v12)
14+
.iOS(.v13)
1515
],
1616
products: [
1717
// If the plugin name contains "_", the library name must use "-".
1818
.library(name: "facebook-app-events", targets: ["facebook_app_events"])
1919
],
2020
dependencies: [
21-
.package(url: "https://github.com/facebook/facebook-ios-sdk.git", from: "18.0.0")
21+
.package(url: "https://github.com/facebook/facebook-ios-sdk.git", "18.0.0"..<"19.0.0")
2222
],
2323
targets: [
2424
.target(

ios/facebook_app_events/Sources/facebook_app_events/FacebookAppEventsPlugin.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public class FacebookAppEventsPlugin: NSObject, FlutterPlugin {
6767
case "logPurchase":
6868
handlePurchased(call, result: result)
6969
case "getAnonymousId":
70-
handleHandleGetAnonymousId(call, result: result)
70+
handleGetAnonymousId(call, result: result)
7171
case "setAdvertiserTracking":
7272
handleSetAdvertiserTracking(call, result: result)
7373
case "setGraphApiVersion":
@@ -127,7 +127,7 @@ public class FacebookAppEventsPlugin: NSObject, FlutterPlugin {
127127
result(appId)
128128
}
129129

130-
private func handleHandleGetAnonymousId(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
130+
private func handleGetAnonymousId(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
131131
result(AppEvents.shared.anonymousID)
132132
}
133133

0 commit comments

Comments
 (0)