diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 44c9dd0dc..20d5ead25 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -5,7 +5,6 @@ repositories { mavenCentral() flatDir { dirs(project(":spotify_sdk").projectDir.resolve("libs")) - dirs(project(":jl_ota").projectDir.resolve("libs")) } } diff --git a/lib/modules/ota_upgrade/controllers/ota_upgrade_controller.dart b/lib/modules/ota_upgrade/controllers/ota_upgrade_controller.dart index c9c827551..778dc1ddf 100644 --- a/lib/modules/ota_upgrade/controllers/ota_upgrade_controller.dart +++ b/lib/modules/ota_upgrade/controllers/ota_upgrade_controller.dart @@ -7,7 +7,6 @@ import '../model/ota_upgrade_model.dart'; import 'dart:io'; import 'package:dio/dio.dart'; import 'package:path_provider/path_provider.dart'; -import 'package:jl_ota/jl_ota.dart'; import 'package:ota/ota.dart'; import '../../../data/services/ble_manager.dart'; diff --git a/local_plugins/jl_ota/.gitignore b/local_plugins/jl_ota/.gitignore deleted file mode 100644 index e7d347d9d..000000000 --- a/local_plugins/jl_ota/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.build/ -.buildlog/ -.history -.svn/ -.swiftpm/ -migrate_working_dir/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. -/pubspec.lock -**/doc/api/ -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -build/ diff --git a/local_plugins/jl_ota/.metadata b/local_plugins/jl_ota/.metadata deleted file mode 100644 index 6015b831a..000000000 --- a/local_plugins/jl_ota/.metadata +++ /dev/null @@ -1,33 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: "ea121f8859e4b13e47a8f845e4586164519588bc" - channel: "stable" - -project_type: plugin - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: ea121f8859e4b13e47a8f845e4586164519588bc - base_revision: ea121f8859e4b13e47a8f845e4586164519588bc - - platform: android - create_revision: ea121f8859e4b13e47a8f845e4586164519588bc - base_revision: ea121f8859e4b13e47a8f845e4586164519588bc - - platform: ios - create_revision: ea121f8859e4b13e47a8f845e4586164519588bc - base_revision: ea121f8859e4b13e47a8f845e4586164519588bc - - # User provided section - - # List of Local paths (relative to this file) that should be - # ignored by the migrate tool. - # - # Files that are not part of the templates will be ignored by default. - unmanaged_files: - - 'lib/main.dart' - - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/local_plugins/jl_ota/CHANGELOG.md b/local_plugins/jl_ota/CHANGELOG.md deleted file mode 100644 index 41cc7d819..000000000 --- a/local_plugins/jl_ota/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -## 0.0.1 - -* TODO: Describe initial release. diff --git a/local_plugins/jl_ota/LICENSE b/local_plugins/jl_ota/LICENSE deleted file mode 100644 index ba75c69f7..000000000 --- a/local_plugins/jl_ota/LICENSE +++ /dev/null @@ -1 +0,0 @@ -TODO: Add your license here. diff --git a/local_plugins/jl_ota/README.md b/local_plugins/jl_ota/README.md deleted file mode 100644 index 673c7a29a..000000000 --- a/local_plugins/jl_ota/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# jl_ota - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter -[plug-in package](https://flutter.dev/to/develop-plugins), -a specialized package that includes platform-specific implementation code for -Android and/or iOS. - -For help getting started with Flutter development, view the -[online documentation](https://docs.flutter.dev), which offers tutorials, -samples, guidance on mobile development, and a full API reference. - diff --git a/local_plugins/jl_ota/analysis_options.yaml b/local_plugins/jl_ota/analysis_options.yaml deleted file mode 100644 index a5744c1cf..000000000 --- a/local_plugins/jl_ota/analysis_options.yaml +++ /dev/null @@ -1,4 +0,0 @@ -include: package:flutter_lints/flutter.yaml - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/local_plugins/jl_ota/android/.gitignore b/local_plugins/jl_ota/android/.gitignore deleted file mode 100644 index 161bdcdaf..000000000 --- a/local_plugins/jl_ota/android/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea/workspace.xml -/.idea/libraries -.DS_Store -/build -/captures -.cxx diff --git a/local_plugins/jl_ota/android/build.gradle b/local_plugins/jl_ota/android/build.gradle deleted file mode 100644 index dd9b88141..000000000 --- a/local_plugins/jl_ota/android/build.gradle +++ /dev/null @@ -1,68 +0,0 @@ -group = "com.yunqiinnovation.jl_ota" -version = "1.0-SNAPSHOT" - -buildscript { - ext.kotlin_version = "1.8.22" - repositories { - google() - mavenCentral() - } - - dependencies { - classpath("com.android.tools.build:gradle:8.7.0") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -apply plugin: "com.android.library" -apply plugin: "kotlin-android" - -android { - namespace = "com.yunqiinnovation.jl_ota" - - compileSdk = 35 - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_11 - } - - sourceSets { - main.java.srcDirs += "src/main/kotlin" - test.java.srcDirs += "src/test/kotlin" - } - - defaultConfig { - minSdk = 21 - } - - dependencies { - // implementation project(':ble_service') - - testImplementation("org.jetbrains.kotlin:kotlin-test") - testImplementation("org.mockito:mockito-core:5.0.0") - } - - testOptions { - unitTests.all { - useJUnitPlatform() - - testLogging { - events "passed", "skipped", "failed", "standardOut", "standardError" - outputs.upToDateWhen {false} - showStandardStreams = true - } - } - } -} \ No newline at end of file diff --git a/local_plugins/jl_ota/android/libs/jl_bt_ota_V1.9.2-release.aar b/local_plugins/jl_ota/android/libs/jl_bt_ota_V1.9.2-release.aar deleted file mode 100644 index 9ecf85489..000000000 Binary files a/local_plugins/jl_ota/android/libs/jl_bt_ota_V1.9.2-release.aar and /dev/null differ diff --git a/local_plugins/jl_ota/android/settings.gradle b/local_plugins/jl_ota/android/settings.gradle deleted file mode 100644 index 0ff55ddd6..000000000 --- a/local_plugins/jl_ota/android/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'jl_ota' \ No newline at end of file diff --git a/local_plugins/jl_ota/android/src/main/AndroidManifest.xml b/local_plugins/jl_ota/android/src/main/AndroidManifest.xml deleted file mode 100644 index efb57f32c..000000000 --- a/local_plugins/jl_ota/android/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - diff --git a/local_plugins/jl_ota/android/src/main/kotlin/com/yunqiinnovation/jl_ota/JlOtaPlugin.kt b/local_plugins/jl_ota/android/src/main/kotlin/com/yunqiinnovation/jl_ota/JlOtaPlugin.kt deleted file mode 100644 index 9a76c5a11..000000000 --- a/local_plugins/jl_ota/android/src/main/kotlin/com/yunqiinnovation/jl_ota/JlOtaPlugin.kt +++ /dev/null @@ -1,76 +0,0 @@ -package com.yunqiinnovation.jl_ota - -import io.flutter.embedding.engine.plugins.FlutterPlugin -import io.flutter.plugin.common.EventChannel -import io.flutter.plugin.common.MethodCall -import io.flutter.plugin.common.MethodChannel -import io.flutter.plugin.common.MethodChannel.MethodCallHandler -import io.flutter.plugin.common.MethodChannel.Result - -import android.bluetooth.BluetoothGatt; -import android.bluetooth.BluetoothDevice -import android.content.Context -import android.os.Handler -import android.os.Looper -import android.util.Log -import androidx.annotation.NonNull -//import com.yunqiinnovation.ble_service.BleService - -/** JlOtaPlugin */ -class JlOtaPlugin() : FlutterPlugin, MethodCallHandler { - /// The MethodChannel that will the communication between Flutter and native Android - /// - /// This local reference serves to register the plugin with the Flutter Engine and unregister it - /// when the Flutter Engine is detached from the Activity - private lateinit var channel: MethodChannel - private lateinit var context: Context - private lateinit var eventChannel: EventChannel - private var streamSink: EventChannel.EventSink? = null - - companion object { - private const val TAG = "JlOtaPlugin" - private const val CHANNEL_NAME = "com.yunqiinnovation.jl_ota" - private const val EVENT_CHANNEL_NAME = "com.yunqiinnovation.jl_ota/events" - - } - - - override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { - context = flutterPluginBinding.applicationContext - channel = MethodChannel(flutterPluginBinding.binaryMessenger, "jl_ota") - channel.setMethodCallHandler(this) - - eventChannel = EventChannel(flutterPluginBinding.binaryMessenger, EVENT_CHANNEL_NAME) - - eventChannel.setStreamHandler(object : EventChannel.StreamHandler { - override fun onListen(arguments: Any?, events: EventChannel.EventSink?) { - streamSink = events - } - - override fun onCancel(arguments: Any?) { - streamSink = null - } - }) - - } - - override fun onMethodCall(call: MethodCall, result: Result) { - - if (call.method == "getPlatformVersion") { - - // BleService.otaManager?.configureOTA() - - // BleService.otaManager?.startOTA() - result.success("Android ${android.os.Build.VERSION.RELEASE}") - } else { - result.notImplemented() - } - } - - override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) { - channel.setMethodCallHandler(null) - } - - -} - diff --git a/local_plugins/jl_ota/ios/.gitignore b/local_plugins/jl_ota/ios/.gitignore deleted file mode 100644 index 034771fc9..000000000 --- a/local_plugins/jl_ota/ios/.gitignore +++ /dev/null @@ -1,38 +0,0 @@ -.idea/ -.vagrant/ -.sconsign.dblite -.svn/ - -.DS_Store -*.swp -profile - -DerivedData/ -build/ -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m - -.generated/ - -*.pbxuser -*.mode1v3 -*.mode2v3 -*.perspectivev3 - -!default.pbxuser -!default.mode1v3 -!default.mode2v3 -!default.perspectivev3 - -xcuserdata - -*.moved-aside - -*.pyc -*sync/ -Icon? -.tags* - -/Flutter/Generated.xcconfig -/Flutter/ephemeral/ -/Flutter/flutter_export_environment.sh diff --git a/local_plugins/jl_ota/ios/Assets/.gitkeep b/local_plugins/jl_ota/ios/Assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/local_plugins/jl_ota/ios/Classes/JlOtaPlugin.swift b/local_plugins/jl_ota/ios/Classes/JlOtaPlugin.swift deleted file mode 100644 index e5b6434f2..000000000 --- a/local_plugins/jl_ota/ios/Classes/JlOtaPlugin.swift +++ /dev/null @@ -1,19 +0,0 @@ -import Flutter -import UIKit - -public class JlOtaPlugin: NSObject, FlutterPlugin { - public static func register(with registrar: FlutterPluginRegistrar) { - let channel = FlutterMethodChannel(name: "jl_ota", binaryMessenger: registrar.messenger()) - let instance = JlOtaPlugin() - registrar.addMethodCallDelegate(instance, channel: channel) - } - - public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { - switch call.method { - case "getPlatformVersion": - result("iOS " + UIDevice.current.systemVersion) - default: - result(FlutterMethodNotImplemented) - } - } -} diff --git a/local_plugins/jl_ota/ios/Resources/PrivacyInfo.xcprivacy b/local_plugins/jl_ota/ios/Resources/PrivacyInfo.xcprivacy deleted file mode 100644 index a34b7e2e6..000000000 --- a/local_plugins/jl_ota/ios/Resources/PrivacyInfo.xcprivacy +++ /dev/null @@ -1,14 +0,0 @@ - - - - - NSPrivacyTrackingDomains - - NSPrivacyAccessedAPITypes - - NSPrivacyCollectedDataTypes - - NSPrivacyTracking - - - diff --git a/local_plugins/jl_ota/ios/jl_ota.podspec b/local_plugins/jl_ota/ios/jl_ota.podspec deleted file mode 100644 index ebd8d61ed..000000000 --- a/local_plugins/jl_ota/ios/jl_ota.podspec +++ /dev/null @@ -1,29 +0,0 @@ -# -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. -# Run `pod lib lint jl_ota.podspec` to validate before publishing. -# -Pod::Spec.new do |s| - s.name = 'jl_ota' - s.version = '0.0.1' - s.summary = 'A new Flutter project.' - s.description = <<-DESC -A new Flutter project. - DESC - s.homepage = 'http://example.com' - s.license = { :file => '../LICENSE' } - s.author = { 'Your Company' => 'email@example.com' } - s.source = { :path => '.' } - s.source_files = 'Classes/**/*' - s.dependency 'Flutter' - s.platform = :ios, '12.0' - - # Flutter.framework does not contain a i386 slice. - s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } - s.swift_version = '5.0' - - # If your plugin requires a privacy manifest, for example if it uses any - # required reason APIs, update the PrivacyInfo.xcprivacy file to describe your - # plugin's privacy impact, and then uncomment this line. For more information, - # see https://developer.apple.com/documentation/bundleresources/privacy_manifest_files - # s.resource_bundles = {'jl_ota_privacy' => ['Resources/PrivacyInfo.xcprivacy']} -end diff --git a/local_plugins/jl_ota/lib/jl_ota.dart b/local_plugins/jl_ota/lib/jl_ota.dart deleted file mode 100644 index ed1f427bd..000000000 --- a/local_plugins/jl_ota/lib/jl_ota.dart +++ /dev/null @@ -1,8 +0,0 @@ - -import 'jl_ota_platform_interface.dart'; - -class JlOta { - Future getPlatformVersion() { - return JlOtaPlatform.instance.getPlatformVersion(); - } -} diff --git a/local_plugins/jl_ota/lib/jl_ota_method_channel.dart b/local_plugins/jl_ota/lib/jl_ota_method_channel.dart deleted file mode 100644 index aa4647443..000000000 --- a/local_plugins/jl_ota/lib/jl_ota_method_channel.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:flutter/services.dart'; - -import 'jl_ota_platform_interface.dart'; - -/// An implementation of [JlOtaPlatform] that uses method channels. -class MethodChannelJlOta extends JlOtaPlatform { - /// The method channel used to interact with the native platform. - @visibleForTesting - final methodChannel = const MethodChannel('jl_ota'); - - @override - Future getPlatformVersion() async { - final version = await methodChannel.invokeMethod('getPlatformVersion'); - return version; - } -} diff --git a/local_plugins/jl_ota/lib/jl_ota_platform_interface.dart b/local_plugins/jl_ota/lib/jl_ota_platform_interface.dart deleted file mode 100644 index f4c504da7..000000000 --- a/local_plugins/jl_ota/lib/jl_ota_platform_interface.dart +++ /dev/null @@ -1,29 +0,0 @@ -import 'package:plugin_platform_interface/plugin_platform_interface.dart'; - -import 'jl_ota_method_channel.dart'; - -abstract class JlOtaPlatform extends PlatformInterface { - /// Constructs a JlOtaPlatform. - JlOtaPlatform() : super(token: _token); - - static final Object _token = Object(); - - static JlOtaPlatform _instance = MethodChannelJlOta(); - - /// The default instance of [JlOtaPlatform] to use. - /// - /// Defaults to [MethodChannelJlOta]. - static JlOtaPlatform get instance => _instance; - - /// Platform-specific implementations should set this with their own - /// platform-specific class that extends [JlOtaPlatform] when - /// they register themselves. - static set instance(JlOtaPlatform instance) { - PlatformInterface.verifyToken(instance, _token); - _instance = instance; - } - - Future getPlatformVersion() { - throw UnimplementedError('platformVersion() has not been implemented.'); - } -} diff --git a/local_plugins/jl_ota/pubspec.yaml b/local_plugins/jl_ota/pubspec.yaml deleted file mode 100644 index 3684363bf..000000000 --- a/local_plugins/jl_ota/pubspec.yaml +++ /dev/null @@ -1,72 +0,0 @@ -name: jl_ota -description: "A new Flutter project." -version: 0.0.1 -homepage: - -environment: - sdk: ^3.7.0 - flutter: '>=3.3.0' - -dependencies: - flutter: - sdk: flutter - plugin_platform_interface: ^2.0.2 - -dev_dependencies: - flutter_test: - sdk: flutter - flutter_lints: ^5.0.0 - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter packages. -flutter: - # This section identifies this Flutter project as a plugin project. - # The 'pluginClass' specifies the class (in Java, Kotlin, Swift, Objective-C, etc.) - # which should be registered in the plugin registry. This is required for - # using method channels. - # The Android 'package' specifies package in which the registered class is. - # This is required for using method channels on Android. - # The 'ffiPlugin' specifies that native code should be built and bundled. - # This is required for using `dart:ffi`. - # All these are used by the tooling to maintain consistency when - # adding or updating assets for this project. - plugin: - platforms: - android: - package: com.yunqiinnovation.jl_ota - pluginClass: JlOtaPlugin - ios: - pluginClass: JlOtaPlugin - - # To add assets to your plugin package, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - # - # For details regarding assets in packages, see - # https://flutter.dev/to/asset-from-package - # - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/to/resolution-aware-images - - # To add custom fonts to your plugin package, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts in packages, see - # https://flutter.dev/to/font-from-package diff --git a/pubspec.yaml b/pubspec.yaml index ae68da38d..976d65ab9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -79,8 +79,6 @@ dependencies: path: local_plugins/spotify_sdk ota: path: local_plugins/ota - jl_ota: - path: local_plugins/jl_ota ble_service: path: local_plugins/ble_service classic_bluetooth: