Skip to content

Commit 05b2ea4

Browse files
Merge branch 'refs/heads/refactor/monorepo' into refactor/monorepo-dio-package
# Conflicts: # .circleci/config.yml
2 parents 9d60292 + 63a2bc1 commit 05b2ea4

File tree

75 files changed

+3027
-4
lines changed

Some content is hidden

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

75 files changed

+3027
-4
lines changed

.circleci/config.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,14 @@ jobs:
318318
- run: chmod +x packages/Instabug-Dio-Interceptor/release.sh
319319
- run: ./packages/Instabug-Dio-Interceptor/release.sh
320320

321+
release_http_adapter_plugin:
322+
executor: flutter-executor
323+
steps:
324+
- advanced-checkout/shallow-checkout
325+
- setup_flutter
326+
- run: chmod +x packages/Instabug-Dart-http-Adapter/release.sh
327+
- run: ./packages/Instabug-Dart-http-Adapter/release.sh
328+
321329
release_instabug_flutter:
322330
macos:
323331
xcode: 15.2.0
@@ -410,6 +418,20 @@ workflows:
410418
filters:
411419
branches:
412420
only: master
421+
- hold_release_http_adapter_plugin:
422+
type: approval
423+
requires:
424+
- test_flutter-stable
425+
filters:
426+
branches:
427+
only: master
428+
- release_http_adapter_plugin:
429+
requires:
430+
- hold_release_http_adapter_plugin
431+
- verify_pub
432+
filters:
433+
branches:
434+
only: master
413435
- release_instabug_flutter:
414436
requires:
415437
- hold_release_instabug_flutter

packages/instabug_flutter/example/pubspec.lock

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,9 @@ packages:
111111
instabug_http_client:
112112
dependency: "direct main"
113113
description:
114-
name: instabug_http_client
115-
sha256: "7d52803c0dd639f6dddbe07333418eb251ae02f3f9f4d30402517533ca692784"
116-
url: "https://pub.dev"
117-
source: hosted
114+
path: "../../instabug_http_client"
115+
relative: true
116+
source: path
118117
version: "2.4.0"
119118
leak_tracker:
120119
dependency: transitive
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Changelog
2+
3+
## [2.5.0] - 18/11/2024
4+
5+
### Added
6+
7+
- Add support for tracing network requests from Instabug to services like Datadog and New Relic ([#21](https://github.com/Instabug/Instabug-Dart-http-Adapter/pull/21)).
8+
9+
## [2.4.0] - 7/05/2024
10+
11+
### Added
12+
13+
- Add support for Instabug Flutter SDK v12 and v13 ([#17](https://github.com/Instabug/Instabug-Dart-http-Adapter/pull/17)).
14+
15+
## [2.3.0] - 3/11/2022
16+
17+
- Adds support for MultipartRequest.
18+
19+
## [2.2.1] - 2/8/2022
20+
21+
- Bumps [instabug_flutter](https://pub.dev/packages/instabug_flutter) to v11
22+
23+
## [2.2.0] - 11/4/2022
24+
25+
- Adds support for logging network requests using `send` method.
26+
27+
## [2.1.0] - 5/1/2022
28+
29+
- Fixes network log compilation error.
30+
- Adds payload size for network log.
31+
32+
## [2.0.0] - 30/11/2021
33+
34+
- Upgrades to null safety.
35+
36+
## [1.0.0] - 29/7/2019
37+
38+
- Adds implementation for the instabug_http_client library which supports Instabug network logging for the dart library: http.

packages/instabug_http_client/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Instabug
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# instabug_http_client
2+
3+
A dart package to support Instabug network logging for the external dart [http](https://pub.dev/packages/http) package.
4+
5+
## Getting Started
6+
7+
You can choose to attach all your network requests data to the Instabug reports being sent to the dashboard. See the details below on how to enable the feature for the `http` package.
8+
9+
### Installation
10+
11+
1. Add the dependency to your project `pubspec.yml`:
12+
13+
```yaml
14+
dependencies:
15+
instabug_http_client:
16+
```
17+
18+
2. Install the package by running the following command.
19+
20+
```bash
21+
flutter packages get
22+
```
23+
24+
### Usage
25+
26+
To enable logging, use the custom http client provided by Instabug:
27+
28+
```dart
29+
final client = InstabugHttpClient();
30+
```
31+
32+
Then proceed to use the package normally:
33+
34+
```dart
35+
final response = await client.get(Uri.parse(URL));
36+
```
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: 7e9793dee1b85a243edd0e06cb1658e98b077561
8+
channel: stable
9+
10+
project_type: app
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# example
2+
3+
A new Flutter project.
4+
5+
## Getting Started
6+
7+
This project is a starting point for a Flutter application.
8+
9+
A few resources to get you started if this is your first Flutter project:
10+
11+
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12+
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13+
14+
For help getting started with Flutter, view our
15+
[online documentation](https://flutter.dev/docs), which offers tutorials,
16+
samples, guidance on mobile development, and a full API reference.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at
17+
# https://dart-lang.github.io/linter/lints/index.html.
18+
#
19+
# Instead of disabling a lint rule for the entire project in the
20+
# section below, it can also be suppressed for a single line of code
21+
# or a specific dart file by using the `// ignore: name_of_lint` and
22+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
23+
# producing the lint.
24+
rules:
25+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27+
28+
# Additional information about this file can be found at
29+
# https://dart.dev/guides/language/analysis-options
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
key.properties
12+
**/*.keystore
13+
**/*.jks
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
def localProperties = new Properties()
2+
def localPropertiesFile = rootProject.file('local.properties')
3+
if (localPropertiesFile.exists()) {
4+
localPropertiesFile.withReader('UTF-8') { reader ->
5+
localProperties.load(reader)
6+
}
7+
}
8+
9+
def flutterRoot = localProperties.getProperty('flutter.sdk')
10+
if (flutterRoot == null) {
11+
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12+
}
13+
14+
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15+
if (flutterVersionCode == null) {
16+
flutterVersionCode = '1'
17+
}
18+
19+
def flutterVersionName = localProperties.getProperty('flutter.versionName')
20+
if (flutterVersionName == null) {
21+
flutterVersionName = '1.0'
22+
}
23+
24+
apply plugin: 'com.android.application'
25+
apply plugin: 'kotlin-android'
26+
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27+
28+
android {
29+
compileSdkVersion flutter.compileSdkVersion
30+
31+
compileOptions {
32+
sourceCompatibility JavaVersion.VERSION_1_8
33+
targetCompatibility JavaVersion.VERSION_1_8
34+
}
35+
36+
kotlinOptions {
37+
jvmTarget = '1.8'
38+
}
39+
40+
sourceSets {
41+
main.java.srcDirs += 'src/main/kotlin'
42+
}
43+
44+
defaultConfig {
45+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
46+
applicationId "com.example.example"
47+
minSdkVersion flutter.minSdkVersion
48+
targetSdkVersion flutter.targetSdkVersion
49+
versionCode flutterVersionCode.toInteger()
50+
versionName flutterVersionName
51+
}
52+
53+
buildTypes {
54+
release {
55+
// TODO: Add your own signing config for the release build.
56+
// Signing with the debug keys for now, so `flutter run --release` works.
57+
signingConfig signingConfigs.debug
58+
}
59+
}
60+
}
61+
62+
flutter {
63+
source '../..'
64+
}
65+
66+
dependencies {
67+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
68+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.example.example">
3+
<!-- Flutter needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
</manifest>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.example.example">
3+
<application
4+
android:label="example"
5+
android:name="${applicationName}"
6+
android:icon="@mipmap/ic_launcher"
7+
android:networkSecurityConfig="@xml/network_security_config"
8+
android:usesCleartextTraffic="true">
9+
<activity
10+
android:name=".MainActivity"
11+
android:exported="true"
12+
android:launchMode="singleTop"
13+
android:theme="@style/LaunchTheme"
14+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
15+
android:hardwareAccelerated="true"
16+
android:windowSoftInputMode="adjustResize">
17+
<!-- Specifies an Android theme to apply to this Activity as soon as
18+
the Android process has started. This theme is visible to the user
19+
while the Flutter UI initializes. After that, this theme continues
20+
to determine the Window background behind the Flutter UI. -->
21+
<meta-data
22+
android:name="io.flutter.embedding.android.NormalTheme"
23+
android:resource="@style/NormalTheme"
24+
/>
25+
<intent-filter>
26+
<action android:name="android.intent.action.MAIN"/>
27+
<category android:name="android.intent.category.LAUNCHER"/>
28+
</intent-filter>
29+
</activity>
30+
<!-- Don't delete the meta-data below.
31+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
32+
<meta-data
33+
android:name="flutterEmbedding"
34+
android:value="2" />
35+
</application>
36+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Generated file.
2+
// If you wish to remove Flutter's multidex support, delete this entire file.
3+
4+
package io.flutter.app;
5+
6+
import android.content.Context;
7+
import androidx.annotation.CallSuper;
8+
import androidx.multidex.MultiDex;
9+
10+
/**
11+
* Extension of {@link io.flutter.app.FlutterApplication}, adding multidex support.
12+
*/
13+
public class FlutterMultiDexApplication extends FlutterApplication {
14+
@Override
15+
@CallSuper
16+
protected void attachBaseContext(Context base) {
17+
super.attachBaseContext(base);
18+
MultiDex.install(this);
19+
}
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.example.example
2+
3+
import io.flutter.embedding.android.FlutterActivity
4+
5+
class MainActivity: FlutterActivity() {
6+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="?android:colorBackground" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="@android:color/white" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)