Skip to content

Commit 9b3ee88

Browse files
authored
chore(examples): Update examples (#264)
Update examples to the latest settings and codegen.
1 parent 106f0c6 commit 9b3ee88

File tree

77 files changed

+716
-146
lines changed

Some content is hidden

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

77 files changed

+716
-146
lines changed

examples/firebase/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
12+
.swiftpm/
1113
migrate_working_dir/
1214

1315
# IntelliJ related

examples/firebase/android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
.cxx/
89

910
# Remember to never publicly share your keystore.
1011
# See https://flutter.dev/to/reference-keystore

examples/firebase/android/app/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
plugins {
22
id "com.android.application"
3+
// START: FlutterFire Configuration
4+
id 'com.google.gms.google-services'
5+
// END: FlutterFire Configuration
36
id "kotlin-android"
47
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
58
id "dev.flutter.flutter-gradle-plugin"
@@ -24,7 +27,7 @@ android {
2427
applicationId = "dev.celest.firebase_test"
2528
// You can update the following values to match your application needs.
2629
// For more information, see: https://flutter.dev/to/review-gradle-config.
27-
minSdk = flutter.minSdkVersion
30+
minSdk = 23
2831
targetSdk = flutter.targetSdkVersion
2932
versionCode = flutter.versionCode
3033
versionName = flutter.versionName
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"project_info": {
3+
"project_number": "438379435794",
4+
"project_id": "prj-n-firebase-test",
5+
"storage_bucket": "prj-n-firebase-test.firebasestorage.app"
6+
},
7+
"client": [
8+
{
9+
"client_info": {
10+
"mobilesdk_app_id": "1:438379435794:android:52f5bb6d5762612b1245cb",
11+
"android_client_info": {
12+
"package_name": "dev.celest.firebase_test"
13+
}
14+
},
15+
"oauth_client": [],
16+
"api_key": [
17+
{
18+
"current_key": "AIzaSyCsXbfOCSSzN5g93X33DfrVSiNwPX-b4HI"
19+
}
20+
],
21+
"services": {
22+
"appinvite_service": {
23+
"other_platform_oauth_client": []
24+
}
25+
}
26+
},
27+
{
28+
"client_info": {
29+
"mobilesdk_app_id": "1:438379435794:android:8960ca1dc816fd971245cb",
30+
"android_client_info": {
31+
"package_name": "dev.celest.firebase_test_nonprod"
32+
}
33+
},
34+
"oauth_client": [],
35+
"api_key": [
36+
{
37+
"current_key": "AIzaSyCsXbfOCSSzN5g93X33DfrVSiNwPX-b4HI"
38+
}
39+
],
40+
"services": {
41+
"appinvite_service": {
42+
"other_platform_oauth_client": []
43+
}
44+
}
45+
}
46+
],
47+
"configuration_version": "1"
48+
}

examples/firebase/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip

examples/firebase/android/settings.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ pluginManagement {
1818

1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version "8.1.0" apply false
21+
id "com.android.application" version "8.5.1" apply false
22+
// START: FlutterFire Configuration
23+
id "com.google.gms.google-services" version "4.3.15" apply false
24+
// END: FlutterFire Configuration
2225
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
2326
}
2427

examples/firebase/celest/client/lib/firebase_test_client.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ enum CelestEnvironment {
2727

2828
Uri get baseUri => switch (this) {
2929
local => _$celest.kIsWeb || !Platform.isAndroid
30-
? Uri.parse('http://localhost:62915')
31-
: Uri.parse('http://10.0.2.2:62915'),
30+
? Uri.parse('http://localhost:53733')
31+
: Uri.parse('http://10.0.2.2:53733'),
3232
};
3333
}
3434

examples/firebase/celest/client/pubspec.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: The Celest client for firebase_test.
33
publish_to: none
44

55
environment:
6-
sdk: ^3.4.0
6+
sdk: ^3.5.0
77

88
dependencies:
99
celest: ^1.0.0
@@ -25,3 +25,6 @@ dependency_overrides:
2525
path: ../../../../packages/celest_cloud
2626
celest_core:
2727
path: ../../../../packages/celest_core
28+
dev_dependencies:
29+
lints: ^5.0.0
30+
test: ^1.25.0

examples/firebase/celest/lib/src/generated/cloud.celest.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// it can be checked into version control.
33
// ignore_for_file: type=lint, unused_local_variable, unnecessary_cast, unnecessary_import, deprecated_member_use, invalid_use_of_internal_member
44

5-
library;
5+
library; // ignore_for_file: no_leading_underscores_for_library_prefixes
66

7-
import 'package:celest/src/core/context.dart';
7+
import 'package:celest/src/core/context.dart' as _$celest;
88
import 'package:celest_backend/src/generated/config.celest.dart';
99

1010
/// The interface to your Celest backend.
@@ -16,7 +16,7 @@ const CelestCloud celest = CelestCloud._();
1616

1717
/// A per-request context object which propogates request information and common
1818
/// accessors to the Celest server environment.
19-
CelestContext get context => CelestContext._(context);
19+
CelestContext get context => CelestContext._(_$celest.context);
2020

2121
/// The interface to your Celest backend.
2222
///
@@ -42,4 +42,5 @@ class CelestCloud {
4242

4343
/// A per-request context object which propogates request information and common
4444
/// accessors to the Celest server environment.
45-
extension type CelestContext._(Context _context) implements Context {}
45+
extension type CelestContext._(_$celest.Context _context)
46+
implements _$celest.Context {}

examples/firebase/celest/lib/src/generated/config.celest.dart

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
// it can be checked into version control.
33
// ignore_for_file: type=lint, unused_local_variable, unnecessary_cast, unnecessary_import, deprecated_member_use, invalid_use_of_internal_member
44

5-
library;
5+
library; // ignore_for_file: no_leading_underscores_for_library_prefixes
66

7-
import 'package:celest/celest.dart';
8-
import 'package:celest/src/core/context.dart';
7+
import 'package:celest/celest.dart' as _$celest;
8+
import 'package:celest/src/core/context.dart' as _$celest;
99

1010
/// An environment of a deployed Celest service.
1111
///
1212
/// Celest services can have multiple isolated branches, for example
1313
/// a `development` and `production` environment.
1414
extension type const CelestEnvironment._(String _env)
15-
implements Environment, String {
15+
implements _$celest.Environment, String {
1616
/// The local Celest environment, used to delineate when a
1717
/// Celest service is running on a developer machine as opposed
1818
/// to the cloud.
@@ -41,9 +41,10 @@ class CelestVariables {
4141
///
4242
/// This is set by the deployment environment and is used to
4343
/// determine the current environment of the Celest service.
44-
String get currentEnvironment => context.expect(env.environment);
44+
String get currentEnvironment =>
45+
_$celest.context.expect(_$celest.env.environment);
4546

4647
/// The value of the `FIREBASE_PROJECT_ID` environment variable.
4748
String get firebaseProjectId =>
48-
context.expect(const env('FIREBASE_PROJECT_ID'));
49+
_$celest.context.expect(const _$celest.env('FIREBASE_PROJECT_ID'));
4950
}

0 commit comments

Comments
 (0)