Skip to content

Commit 7a2930f

Browse files
authored
Merge branch 'main' into patch-1
2 parents b9ee95b + 91b2322 commit 7a2930f

File tree

79 files changed

+1091
-637
lines changed

Some content is hidden

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

79 files changed

+1091
-637
lines changed
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Analytics Flutter Test Code
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build_and_test:
13+
name: Run Test
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- uses: actions/setup-java@v3
20+
with:
21+
distribution: 'zulu'
22+
java-version: "13.0.13+5"
23+
24+
- uses: subosito/flutter-action@v2
25+
with:
26+
channel: stable
27+
flutter-version: 3.19.0
28+
29+
- name: Get dependencies
30+
run: cd packages/core && flutter pub get
31+
32+
- name: Analyze Dart code
33+
run: cd packages/core && flutter analyze
34+
35+
- name: Run unit tests
36+
run: cd packages/core && flutter test --coverage
37+
38+
- name: Upload coverage to codecov
39+
run: curl -s https://codecov.io/bash
40+
shell: bash

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ build/
3636

3737
# VSCode
3838
launch.json
39+
40+
#Coverage
41+
coverage/

example/.mise.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[tools]
22
ruby = "latest"
33
cocoapods = "latest"
4+
java = "17"

example/lib/config.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
const writeKey = 'INSERT WRITE KEY';
1+
const writeKey = 'tUFhPdeE4S9M722Xc44mydRhj0BX9GXB';

example/lib/main.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import 'package:analytics/event.dart';
2-
import 'package:analytics/state.dart';
31
import 'package:analytics_example/config.dart';
2+
import 'package:segment_analytics/event.dart';
3+
import 'package:segment_analytics/state.dart';
44
import 'package:flutter/material.dart';
55
import 'dart:async';
6-
import 'package:analytics/client.dart';
6+
import 'package:segment_analytics/client.dart';
77

88
void main() {
99
runApp(const MyApp());

example/macos/Flutter/GeneratedPluginRegistrant.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
import FlutterMacOS
66
import Foundation
77

8-
import analytics
98
import path_provider_foundation
9+
import segment_analytics
1010
import shared_preferences_foundation
1111

1212
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
13-
AnalyticsPlugin.register(with: registry.registrar(forPlugin: "AnalyticsPlugin"))
1413
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
14+
AnalyticsPlugin.register(with: registry.registrar(forPlugin: "AnalyticsPlugin"))
1515
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
1616
}

example/macos/Podfile.lock

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,36 @@
11
PODS:
2-
- analytics (0.0.1):
3-
- FlutterMacOS
42
- FlutterMacOS (1.0.0)
53
- path_provider_foundation (0.0.1):
64
- Flutter
75
- FlutterMacOS
6+
- segment_analytics (0.0.1):
7+
- FlutterMacOS
8+
- shared_preferences_foundation (0.0.1):
9+
- Flutter
10+
- FlutterMacOS
811

912
DEPENDENCIES:
10-
- analytics (from `Flutter/ephemeral/.symlinks/plugins/analytics/macos`)
1113
- FlutterMacOS (from `Flutter/ephemeral`)
1214
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
15+
- segment_analytics (from `Flutter/ephemeral/.symlinks/plugins/segment_analytics/macos`)
16+
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
1317

1418
EXTERNAL SOURCES:
15-
analytics:
16-
:path: Flutter/ephemeral/.symlinks/plugins/analytics/macos
1719
FlutterMacOS:
1820
:path: Flutter/ephemeral
1921
path_provider_foundation:
2022
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
23+
segment_analytics:
24+
:path: Flutter/ephemeral/.symlinks/plugins/segment_analytics/macos
25+
shared_preferences_foundation:
26+
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
2127

2228
SPEC CHECKSUMS:
23-
analytics: cccd9da15e53ea20a05037b59e6f6534be856e2b
2429
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
2530
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
31+
segment_analytics: f958dfc243c0c66e8f3be016c8cd3c2e7501071f
32+
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
2633

2734
PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7
2835

29-
COCOAPODS: 1.14.3
36+
COCOAPODS: 1.15.2

example/pubspec.lock

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
# Generated by pub
22
# See https://dart.dev/tools/pub/glossary#lockfile
33
packages:
4-
analytics:
5-
dependency: "direct main"
6-
description:
7-
path: "../packages/core"
8-
relative: true
9-
source: path
10-
version: "0.0.1"
114
async:
125
dependency: transitive
136
description:
@@ -263,6 +256,14 @@ packages:
263256
url: "https://pub.dev"
264257
source: hosted
265258
version: "2.1.8"
259+
segment_analytics:
260+
dependency: "direct main"
261+
description:
262+
name: segment_analytics
263+
sha256: fa6e2df7c5703d0d4830c0629ff6af7e2d1a7fd88c051636c5b82f3a8fc88f55
264+
url: "https://pub.dev"
265+
source: hosted
266+
version: "1.0.2"
266267
shared_preferences:
267268
dependency: transitive
268269
description:

example/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ dependencies:
1717
flutter:
1818
sdk: flutter
1919

20-
analytics:
20+
segment_analytics: ^1.0.2
2121
# When depending on this package from a real application you should use:
2222
# analytics: ^x.y.z
2323
# See https://dart.dev/tools/pub/dependencies#version-constraints
2424
# The example app is bundled with the plugin so we use a path dependency on
2525
# the parent directory to use the current plugin's version.
26-
path: ../packages/core/
26+
# path: ../packages/core/
2727

2828
# The following adds the Cupertino Icons font to your application.
2929
# Use with the CupertinoIcons class for iOS style icons.

example/test/widget_test.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import 'package:flutter/material.dart';
99
import 'package:flutter_test/flutter_test.dart';
1010

11-
import 'package:analytics_example/main.dart';
11+
import 'package:segment_analytics_example/main.dart';
1212

1313
void main() {
1414
testWidgets('Verify Platform version', (WidgetTester tester) async {
@@ -18,8 +18,8 @@ void main() {
1818
// Verify that platform version is retrieved.
1919
expect(
2020
find.byWidgetPredicate(
21-
(Widget widget) => widget is Text &&
22-
widget.data!.startsWith('Running on:'),
21+
(Widget widget) =>
22+
widget is Text && widget.data!.startsWith('Running on:'),
2323
),
2424
findsOneWidget,
2525
);

packages/core/CHANGELOG.md

+23-15
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
1-
## 0.0.1
2-
3-
* iOS, Android, Web, and MacOS support
4-
* Firebase, Adjust, and Appsflyer destination plugins
5-
* adverising_id and IDFA enrichment plugins
6-
* All event types supported (track, identify, screen, alias, group)
7-
* Automatic Screen events
8-
* Application life-cycle capture
9-
* Customisable Flushing policies
10-
* Customisable logging and error reporting
11-
* Customisable HTTP (CDN) client
12-
* Unit tested (although not all parts)
13-
* Strongly typed, including User Traits and Context objects and plugin settings
14-
* Fully asynchronous and concurrency safe state and persistence management
15-
* Example app showing off usage of the SDK
1+
## 1.0.1
2+
3+
- Fix cocoapods
4+
5+
## 1.0.0
6+
7+
- iOS, Android, Web, and MacOS support
8+
- Firebase, Adjust, and Appsflyer destination plugins
9+
- adverising_id and IDFA enrichment plugins
10+
- All event types supported (track, identify, screen, alias, group)
11+
- Automatic Screen events
12+
- Application life-cycle capture
13+
- Customisable Flushing policies
14+
- Customisable logging and error reporting
15+
- Customisable HTTP (CDN) client
16+
- Unit tested (although not all parts)
17+
- Strongly typed, including User Traits and Context objects and plugin settings
18+
- Fully asynchronous and concurrency safe state and persistence management
19+
- Example app showing off usage of the SDK
20+
21+
## 1.0.2
22+
23+
- Fixed an issue with EU Workspaces not respecting the proper apiHost

0 commit comments

Comments
 (0)