Skip to content

Commit 81f3032

Browse files
authored
feat(app_check, windows): add support for AppCheck for Windows (#18140)
* feat(app_check, windows): add support for AppCheck for Windows * format * fixes * fixes * fix * format * clean * clean * adding * windows example * format * fix * fix
1 parent f503961 commit 81f3032

91 files changed

Lines changed: 3464 additions & 1301 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

melos.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ command:
2121
dart run scripts/generate_dataconnect_version.dart && \
2222
dart run scripts/generate_versions_web.dart && \
2323
dart run scripts/generate_versions_spm.dart && \
24-
git add packages/firebase_data_connect/firebase_data_connect/lib/src/dataconnect_version.dart && git add packages/*/*_web/lib/src/*_version.dart && git add packages/*/*/ios/*/Package.swift packages/*/*/macos/*/Package.swift
24+
git add packages/firebase_data_connect/firebase_data_connect/lib/src/dataconnect_version.dart && git add packages/*/*_web/lib/src/*_version.dart && git add packages/*/*/ios/*/Package.swift packages/*/*/macos/*/Package.swift && git add packages/*/*/ios/*/Sources/*/Constants.swift
25+
post: |
26+
dart run scripts/generate_tag_spm_firebase_core.dart
2527
2628
bootstrap:
2729
# It seems so that running "pub get" in parallel has some issues (like

packages/firebase_app_check/firebase_app_check/android/build.gradle

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@ apply plugin: 'com.android.library'
55
apply from: file("local-config.gradle")
66

77
buildscript {
8+
ext.kotlin_version = "1.8.22"
89
repositories {
910
google()
1011
mavenCentral()
1112
}
12-
13-
dependencies {
14-
classpath 'com.android.tools.build:gradle:8.3.0'
15-
}
1613
}
1714

1815
rootProject.allprojects {
@@ -22,6 +19,12 @@ rootProject.allprojects {
2219
}
2320
}
2421

22+
// AGP 9+ has built-in Kotlin support; older versions need the plugin explicitly.
23+
def agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0] as int
24+
if (agpMajor < 9) {
25+
apply plugin: 'kotlin-android'
26+
}
27+
2528
def firebaseCoreProject = findProject(':firebase_core')
2629
if (firebaseCoreProject == null) {
2730
throw new GradleException('Could not find the firebase_core FlutterFire plugin, have you added it as a dependency in your pubspec?')
@@ -48,11 +51,22 @@ android {
4851
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4952
}
5053

54+
if (agpMajor < 9) {
55+
kotlinOptions {
56+
jvmTarget = project.ext.javaVersion
57+
}
58+
}
59+
5160
compileOptions {
5261
sourceCompatibility project.ext.javaVersion
5362
targetCompatibility project.ext.javaVersion
5463
}
5564

65+
sourceSets {
66+
main.java.srcDirs += "src/main/kotlin"
67+
test.java.srcDirs += "src/test/kotlin"
68+
}
69+
5670
buildFeatures {
5771
buildConfig true
5872
}
@@ -67,7 +81,6 @@ android {
6781
implementation 'com.google.firebase:firebase-appcheck-debug'
6882
implementation 'com.google.firebase:firebase-appcheck-playintegrity'
6983
implementation 'androidx.annotation:annotation:1.7.0'
70-
7184
}
7285
}
7386

packages/firebase_app_check/firebase_app_check/android/src/main/java/io/flutter/plugins/firebase/appcheck/FlutterFirebaseAppCheckPlugin.java

Lines changed: 0 additions & 280 deletions
This file was deleted.

packages/firebase_app_check/firebase_app_check/android/src/main/java/io/flutter/plugins/firebase/appcheck/FlutterFirebaseAppRegistrar.java

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)