diff --git a/platform_device_id/android/build.gradle b/platform_device_id/android/build.gradle index 1ab78e3..f59cfae 100644 --- a/platform_device_id/android/build.gradle +++ b/platform_device_id/android/build.gradle @@ -2,14 +2,14 @@ group 'com.di1shuai.platform_device_id' version '1.0-SNAPSHOT' buildscript { - ext.kotlin_version = '1.3.50' + ext.kotlin_version = '1.7.10' repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath 'com.android.tools.build:gradle:7.3.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -25,13 +25,13 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { - compileSdkVersion 28 + compileSdkVersion 33 sourceSets { main.java.srcDirs += 'src/main/kotlin' } defaultConfig { - minSdkVersion 16 + minSdkVersion 21 } lintOptions { disable 'InvalidPackage' diff --git a/platform_device_id/android/gradle/wrapper/gradle-wrapper.properties b/platform_device_id/android/gradle/wrapper/gradle-wrapper.properties index 01a286e..3c472b9 100644 --- a/platform_device_id/android/gradle/wrapper/gradle-wrapper.properties +++ b/platform_device_id/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/platform_device_id/example/android/app/build.gradle b/platform_device_id/example/android/app/build.gradle index 48fa074..06ffbd8 100644 --- a/platform_device_id/example/android/app/build.gradle +++ b/platform_device_id/example/android/app/build.gradle @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 28 + compileSdkVersion 33 sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -39,8 +39,8 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.di1shuai.platform_device_id_example" - minSdkVersion 16 - targetSdkVersion 28 + minSdkVersion 21 + targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/platform_device_id/example/android/app/src/main/AndroidManifest.xml b/platform_device_id/example/android/app/src/main/AndroidManifest.xml index a0f33a1..57f10af 100644 --- a/platform_device_id/example/android/app/src/main/AndroidManifest.xml +++ b/platform_device_id/example/android/app/src/main/AndroidManifest.xml @@ -6,11 +6,13 @@ additional functionality it is fine to subclass or reimplement FlutterApplication and put your custom class here. --> diff --git a/platform_device_id/example/android/build.gradle b/platform_device_id/example/android/build.gradle index 3100ad2..e0e4f0a 100644 --- a/platform_device_id/example/android/build.gradle +++ b/platform_device_id/example/android/build.gradle @@ -1,12 +1,12 @@ buildscript { - ext.kotlin_version = '1.3.50' + ext.kotlin_version = '1.7.10' repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath 'com.android.tools.build:gradle:7.3.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/platform_device_id/example/android/gradle/wrapper/gradle-wrapper.properties b/platform_device_id/example/android/gradle/wrapper/gradle-wrapper.properties index 296b146..6b66533 100644 --- a/platform_device_id/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/platform_device_id/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/platform_device_id/example/linux/flutter/generated_plugins.cmake b/platform_device_id/example/linux/flutter/generated_plugins.cmake index 4c3abd8..50ddc85 100644 --- a/platform_device_id/example/linux/flutter/generated_plugins.cmake +++ b/platform_device_id/example/linux/flutter/generated_plugins.cmake @@ -6,6 +6,9 @@ list(APPEND FLUTTER_PLUGIN_LIST platform_device_id_linux ) +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + set(PLUGIN_BUNDLED_LIBRARIES) foreach(plugin ${FLUTTER_PLUGIN_LIST}) @@ -14,3 +17,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST}) list(APPEND PLUGIN_BUNDLED_LIBRARIES $) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/platform_device_id/example/windows/flutter/generated_plugin_registrant.h b/platform_device_id/example/windows/flutter/generated_plugin_registrant.h index 9846246..dc139d8 100644 --- a/platform_device_id/example/windows/flutter/generated_plugin_registrant.h +++ b/platform_device_id/example/windows/flutter/generated_plugin_registrant.h @@ -2,6 +2,8 @@ // Generated file. Do not edit. // +// clang-format off + #ifndef GENERATED_PLUGIN_REGISTRANT_ #define GENERATED_PLUGIN_REGISTRANT_ diff --git a/platform_device_id/example/windows/flutter/generated_plugins.cmake b/platform_device_id/example/windows/flutter/generated_plugins.cmake index 7a26568..839b431 100644 --- a/platform_device_id/example/windows/flutter/generated_plugins.cmake +++ b/platform_device_id/example/windows/flutter/generated_plugins.cmake @@ -6,6 +6,9 @@ list(APPEND FLUTTER_PLUGIN_LIST platform_device_id_windows ) +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + set(PLUGIN_BUNDLED_LIBRARIES) foreach(plugin ${FLUTTER_PLUGIN_LIST}) @@ -14,3 +17,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST}) list(APPEND PLUGIN_BUNDLED_LIBRARIES $) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin)