Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance/gradle bump 7.3.1 #17

Merged
merged 5 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions flutter_theolive_sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [Unreleased]

* [Android] Updated Gradle version to 7.3.1
* [Android] Fixed Gradle namespace issue

## 1.0.1

* Updated documentation.
Expand Down
4 changes: 4 additions & 0 deletions flutter_theolive_sdk/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
if (project.android.hasProperty("namespace")) {
namespace 'com.theolive.theolive_example'
}

compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

Expand Down
2 changes: 1 addition & 1 deletion flutter_theolive_sdk/example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
3 changes: 2 additions & 1 deletion flutter_theolive_sdk/lib/theolive.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import 'package:flutter/widgets.dart';
import 'package:theolive/theolive_state.dart';
import 'package:theolive/theolive_view.dart';
import 'package:theolive_platform_interface/debug_helpers.dart';
import 'package:theolive_platform_interface/helpers/debug_helpers.dart';
import 'package:theolive_platform_interface/theolive_event_listener.dart';
import 'package:theolive_platform_interface/theolive_playerconfig.dart';
import 'package:theolive_platform_interface/theolive_view_controller_interface.dart';

export 'package:theolive_platform_interface/theolive_playerconfig.dart';
export 'package:theolive_platform_interface/theolive_event_listener.dart';
export 'package:theolive_platform_interface/helpers/theologger.dart';

typedef PlayerCreatedCallback = void Function();
typedef StateChangeListener = void Function();
Expand Down
14 changes: 5 additions & 9 deletions flutter_theolive_sdk_android/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@ buildscript {
repositories {
google()
mavenCentral()

maven { url 'https://mvn.theoplayer.com/releases' }
// for THEOplayer Android Core dependencies:
maven { url 'https://jitpack.io' }

}

dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -23,11 +19,7 @@ rootProject.allprojects {
repositories {
google()
mavenCentral()

maven { url 'https://mvn.theoplayer.com/releases' }
// for THEOplayer Android Core dependencies:
maven { url 'https://jitpack.io' }

}
}

Expand All @@ -36,6 +28,10 @@ apply plugin: 'kotlin-android'
def theoliveVersion ='3.13.1'

android {
if (project.android.hasProperty("namespace")) {
namespace 'com.theolive.flutter'
}

compileSdkVersion 31

compileOptions {
Expand Down
2 changes: 1 addition & 1 deletion flutter_theolive_sdk_android/lib/theolive_android.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:flutter/widgets.dart';
import 'package:theolive_android/theolive_viewcontroller_android.dart';
import 'package:theolive_platform_interface/theolive_platform_interface.dart';
import 'package:theolive_platform_interface/theolive_playerconfig.dart';
import 'package:theolive_platform_interface/debug_helpers.dart';
import 'package:theolive_platform_interface/helpers/debug_helpers.dart';

class THEOliveAndroid extends TheolivePlatform {
/// Registers this class as the default instance of [TheoplayerPlatform].
Expand Down
2 changes: 1 addition & 1 deletion flutter_theolive_sdk_ios/lib/theolive_ios.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/widgets.dart';
import 'package:theolive_ios/theolive_viewcontroller_ios.dart';
import 'package:theolive_platform_interface/theolive_platform_interface.dart';
import 'package:theolive_platform_interface/theolive_playerconfig.dart';
import 'package:theolive_platform_interface/debug_helpers.dart';
import 'package:theolive_platform_interface/helpers/debug_helpers.dart';

class THEOliveIOS extends TheolivePlatform {
/// Registers this class as the default instance of [TheoplayerPlatform].
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'package:flutter/foundation.dart';

void dprint(Object? object) {
if (kDebugMode) {
print(object);
}
}

Original file line number Diff line number Diff line change
@@ -1,26 +1,5 @@
import 'package:flutter/foundation.dart';

void dprint(Object? object) {
if (kDebugMode) {
print(object);
}
}

void exceptionHandler({required String tag, required Exception exception, String? context = null, StackTrace? stacktrace = null}) {
if (kDebugMode) {
throw exception;
} else {
final prefix = "[$tag]";
final ctx = context != null ? "[C:$context]" : "";
var logMessage = "THEOLogger$prefix$ctx - Exception happened: $exception";
if (!THEOLogger.instance.isListening()) {
logMessage += " - for more info, attach a logger to THEOLogger.instance!";
}
print(logMessage);
THEOLogger.instance._log(exception, stacktrace);
}
}

/**
* Logger class to capture logs and exceptions
* NOTE:
Expand Down Expand Up @@ -54,4 +33,19 @@ class THEOLogger {

abstract class THEOLoggerCallback {
void onException(Exception e, StackTrace stackTrace);
}

void exceptionHandler({required String tag, required Exception exception, String? context = null, StackTrace? stacktrace = null}) {
if (kDebugMode) {
throw exception;
} else {
final prefix = "[$tag]";
final ctx = context != null ? "[C:$context]" : "";
var logMessage = "THEOLogger$prefix$ctx - Exception happened: $exception";
if (!THEOLogger.instance.isListening()) {
logMessage += " - for more info, attach a logger to THEOLogger.instance!";
}
print(logMessage);
THEOLogger.instance._log(exception, stacktrace);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:theolive_platform_interface/debug_helpers.dart';
import 'package:theolive_platform_interface/helpers/theologger.dart';
import 'package:theolive_platform_interface/pigeon/theolive_api.g.dart';
import 'package:theolive_platform_interface/pigeon_multi_instance_wrapper.dart';
import 'package:theolive_platform_interface/theolive_event_listener.dart';
Expand Down
Loading