Skip to content

Commit

Permalink
Merge pull request #74 from suatkeskin/develop
Browse files Browse the repository at this point in the history
Flutter sdk, gradle and customtabslauncher upgrade
  • Loading branch information
droibit authored Aug 26, 2023
2 parents eff797d + 489bd4d commit b59178d
Show file tree
Hide file tree
Showing 22 changed files with 55 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/app_facing_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: flutter pub get
working-directory: ./flutter_custom_tabs
- name: Check for any formatting issues in the code
run: flutter format --set-exit-if-changed .
run: dart format --set-exit-if-changed .
working-directory: ./flutter_custom_tabs
- name: Statically analyze the Dart code for any errors
run: flutter analyze .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/platform_interface_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: flutter pub get
working-directory: ./flutter_custom_tabs_platform_interface
- name: Check for any formatting issues in the code
run: flutter format --set-exit-if-changed .
run: dart format --set-exit-if-changed .
working-directory: ./flutter_custom_tabs_platform_interface
- name: Statically analyze the Dart code for any errors
run: flutter analyze .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/web_implementation_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: flutter pub get
working-directory: ./flutter_custom_tabs_web
- name: Check for any formatting issues in the code
run: flutter format --set-exit-if-changed .
run: dart format --set-exit-if-changed .
working-directory: ./flutter_custom_tabs_web
- name: Statically analyze the Dart code for any errors
run: flutter analyze .
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Intellij project files
*.iml
*.ipr
*.iws
.idea/
5 changes: 4 additions & 1 deletion flutter_custom_tabs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*.iml
*.ipr
*.iws
.idea/*
.idea/
!.idea/codeStyleSettings.xml
!.idea/runConfigurations/*

Expand All @@ -16,3 +16,6 @@ pubspec.lock

# Directory created by dartdoc
doc/api/

# Test Coverage
/coverage/
7 changes: 4 additions & 3 deletions flutter_custom_tabs/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.android.tools.build:gradle:8.1.1'
}
}

Expand All @@ -23,7 +23,8 @@ rootProject.allprojects {
apply plugin: 'com.android.library'

android {
compileSdkVersion 30
namespace "com.github.droibit.plugins.customtabs"
compileSdk 34

defaultConfig {
minSdkVersion 16
Expand All @@ -37,6 +38,6 @@ android {
}

dependencies {
api 'com.github.droibit:customtabslauncher:1.6.0'
api 'com.github.droibit:customtabslauncher:1.7.0'
}
}
1 change: 1 addition & 0 deletions flutter_custom_tabs/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
12 changes: 6 additions & 6 deletions flutter_custom_tabs/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,13 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 30

lintOptions {
disable 'InvalidPackage'
}
namespace "com.github.droibit.flutter.plugins.customtabs.example"
compileSdkVersion 34

defaultConfig {
applicationId "com.github.droibit.flutter.plugins.customtabs.example"
minSdkVersion 16
targetSdkVersion 30
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand All @@ -45,6 +42,9 @@ android {
signingConfig signingConfigs.debug
}
}
lint {
disable 'InvalidPackage'
}
}

flutter {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.droibit.flutter.plugins.customtabs.example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.droibit.flutter.plugins.customtabs.example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<!-- The INTERNET permission is required for development. Specifically,
flutter needs it to communicate with the running application
Expand All @@ -21,12 +20,13 @@
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale"
android:hardwareAccelerated="true"
android:exported="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->

<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.droibit.flutter.plugins.customtabs.example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
4 changes: 2 additions & 2 deletions flutter_custom_tabs/example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:8.1.1'
}
}

Expand All @@ -25,6 +25,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion flutter_custom_tabs/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Demonstrates how to use the flutter_custom_tabs plugin.
publish_to: 'none'

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.12.0 <4.0.0"

dependencies:
cupertino_icons: ^1.0.2
Expand Down
10 changes: 5 additions & 5 deletions flutter_custom_tabs/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ version: 1.0.4
homepage: https://github.com/droibit/flutter_custom_tabs

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.12.0 <4.0.0"
flutter: ">=1.20.0"

dependencies:
flutter:
sdk: flutter
flutter_custom_tabs_platform_interface: ^1.0.1
flutter_custom_tabs_web: ^1.0.0
meta: ^1.3.0
meta: ^1.9.1

dev_dependencies:
flutter_test:
sdk: flutter
mockito: ^5.0.9
pedantic: ^1.11.0
plugin_platform_interface: ^2.0.0
mockito: ^5.4.2
pedantic: ^1.11.1
plugin_platform_interface: ^2.1.5

flutter:
plugin:
Expand Down
6 changes: 2 additions & 4 deletions flutter_custom_tabs/test/launcher_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ void main() {
safariVCOption: anyNamed('safariVCOption'),
)).thenAnswer((_) async => null);

final binding = TestWidgetsFlutterBinding.ensureInitialized()
as TestWidgetsFlutterBinding;
final binding = TestWidgetsFlutterBinding.ensureInitialized();
debugDefaultTargetPlatformOverride = TargetPlatform.iOS;
expect(binding.renderView.automaticSystemUiAdjustment, isTrue);

Expand All @@ -142,8 +141,7 @@ void main() {
safariVCOption: anyNamed('safariVCOption'),
)).thenAnswer((_) async => null);

final binding = TestWidgetsFlutterBinding.ensureInitialized()
as TestWidgetsFlutterBinding;
final binding = TestWidgetsFlutterBinding.ensureInitialized();
debugDefaultTargetPlatformOverride = TargetPlatform.android;
expect(binding.renderView.automaticSystemUiAdjustment, true);

Expand Down
5 changes: 4 additions & 1 deletion flutter_custom_tabs_platform_interface/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*.iml
*.ipr
*.iws
.idea/*
.idea/
!.idea/codeStyleSettings.xml
!.idea/runConfigurations/*

Expand All @@ -16,3 +16,6 @@ pubspec.lock

# Directory created by dartdoc
doc/api/

# Covarage
/coverage/
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:flutter/painting.dart';
import 'package:flutter/services.dart';
import 'package:meta/meta.dart';

Expand Down
10 changes: 5 additions & 5 deletions flutter_custom_tabs_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ version: 1.0.1
homepage: https://github.com/droibit/flutter_custom_tabs

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.12.0 <4.0.0"
flutter: ">=1.20.0"

dependencies:
flutter:
sdk: flutter
plugin_platform_interface: ^2.0.0
meta: ^1.3.0
plugin_platform_interface: ^2.1.5
meta: ^1.9.1

dev_dependencies:
flutter_test:
sdk: flutter
mockito: ^5.0.9
pedantic: ^1.11.0
mockito: ^5.4.2
pedantic: ^1.11.1
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ class _CustomTabsPlatformMock extends Mock
with MockPlatformInterfaceMixin
implements CustomTabsPlatform {}

class _ImplementsCustomTabsPlatform extends Mock implements CustomTabsPlatform {
}
class _ImplementsCustomTabsPlatform extends Mock
implements CustomTabsPlatform {}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ void main() {

const channel =
MethodChannel('plugins.flutter.droibit.github.io/custom_tabs');
channel.setMockMethodCallHandler((methodCall) async => log.add(methodCall));
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(
channel, (methodCall) async => log.add(methodCall));

setUp(() {
log = <MethodCall>[];
Expand Down
2 changes: 1 addition & 1 deletion flutter_custom_tabs_web/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: regular_integration_tests
publish_to: none

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.12.0 <4.0.0"
flutter: ">=2.2.0"

dependencies:
Expand Down
4 changes: 2 additions & 2 deletions flutter_custom_tabs_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 1.0.0
homepage: https://github.com/droibit/flutter_custom_tabs

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.12.0 <4.0.0"
flutter: ">=1.20.0"

dependencies:
Expand All @@ -13,7 +13,7 @@ dependencies:
flutter_web_plugins:
sdk: flutter
flutter_custom_tabs_platform_interface: ^1.0.0
meta: ^1.3.0
meta: ^1.9.1
url_launcher_web: ^2.0.1
url_launcher_platform_interface: ^2.0.3

Expand Down

0 comments on commit b59178d

Please sign in to comment.