diff --git a/cargokit/.github/workflows/test_example_plugin_build.yml b/cargokit/.github/workflows/test_example_plugin_build.yml index 698ea7e..fb97538 100644 --- a/cargokit/.github/workflows/test_example_plugin_build.yml +++ b/cargokit/.github/workflows/test_example_plugin_build.yml @@ -80,7 +80,7 @@ jobs: if [[ $(sysctl hw.optional.arm64) == *"hw.optional.arm64: 1"* ]]; then export JAVA_HOME=$JAVA_HOME_17_arm64 else - export JAVA_HOME=$JAVA_HOME_11_X64 + export JAVA_HOME=$JAVA_HOME_17_X64 fi flutter build apk --${{ matrix.build_mode }} -v diff --git a/cargokit/build_tool/lib/src/options.dart b/cargokit/build_tool/lib/src/options.dart index b2c0f7a..7937dca 100644 --- a/cargokit/build_tool/lib/src/options.dart +++ b/cargokit/build_tool/lib/src/options.dart @@ -298,10 +298,7 @@ class CargokitUserOptions { } userProjectDir = userProjectDir.parent; } - return CargokitUserOptions( - usePrecompiledBinaries: true, - verboseLogging: false, - ); + return CargokitUserOptions._(); } final bool usePrecompiledBinaries; diff --git a/cargokit/cmake/resolve_symlinks.ps1 b/cargokit/cmake/resolve_symlinks.ps1 index 3d10d28..2ac593a 100644 --- a/cargokit/cmake/resolve_symlinks.ps1 +++ b/cargokit/cmake/resolve_symlinks.ps1 @@ -14,14 +14,21 @@ function Resolve-Symlinks { if ($realPath -and !$realPath.EndsWith($separator)) { $realPath += $separator } - $realPath += $part + + $realPath += $part.Replace('\', '/') + + # The slash is important when using Get-Item on Drive letters in pwsh. + if (-not($realPath.Contains($separator)) -and $realPath.EndsWith(':')) { + $realPath += '/' + } + $item = Get-Item $realPath - if ($item.Target) { - $realPath = $item.Target.Replace('\', '/') + if ($item.LinkTarget) { + $realPath = $item.LinkTarget.Replace('\', '/') } } $realPath } -$path=Resolve-Symlinks -Path $args[0] +$path = Resolve-Symlinks -Path $args[0] Write-Host $path diff --git a/cargokit/gradle/plugin.gradle b/cargokit/gradle/plugin.gradle index 37dd086..fdf94c4 100644 --- a/cargokit/gradle/plugin.gradle +++ b/cargokit/gradle/plugin.gradle @@ -55,13 +55,13 @@ abstract class CargoKitBuildTask extends DefaultTask { def manifestDir = Paths.get(project.buildscript.sourceFile.parent, project.cargokit.manifestDir) def rootProjectDir = project.rootProject.projectDir - + if (!Os.isFamily(Os.FAMILY_WINDOWS)) { project.exec { commandLine 'chmod', '+x', path } } - + project.exec { executable path args "build-gradle" @@ -92,7 +92,7 @@ class CargoKitPlugin implements Plugin { private Plugin _findFlutterPlugin(Map projects) { for (project in projects) { for (plugin in project.value.getPlugins()) { - if (plugin.class.name == "FlutterPlugin") { + if (plugin.class.name == "com.flutter.gradle.FlutterPlugin") { return plugin; } } @@ -116,7 +116,7 @@ class CargoKitPlugin implements Plugin { } def cargoBuildDir = "${project.buildDir}/build" - + // Determine if the project is an application or library def isApplication = plugin.project.plugins.hasPlugin('com.android.application') def variants = isApplication ? plugin.project.android.applicationVariants : plugin.project.android.libraryVariants @@ -129,7 +129,7 @@ class CargoKitPlugin implements Plugin { def jniLibs = project.android.sourceSets.maybeCreate(buildType).jniLibs; jniLibs.srcDir(new File(cargoOutputDir)) - def platforms = plugin.getTargetPlatforms().collect() + def platforms = com.flutter.gradle.FlutterPluginUtils.getTargetPlatforms(project).collect() // Same thing addFlutterDependencies does in flutter.gradle if (buildType == "debug") { diff --git a/example/.gitignore b/example/.gitignore index 2aa6653..5b2a1d4 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -5,9 +5,11 @@ *.swp .DS_Store .atom/ +.build/ .buildlog/ .history .svn/ +.swiftpm/ migrate_working_dir/ # IntelliJ related diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 5e31d3d..9c12df5 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit" shouldUseLaunchSchemeArgsEnv = "YES"> diff --git a/example/pubspec.lock b/example/pubspec.lock index b52476f..181e4d9 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -34,10 +34,10 @@ packages: dependency: transitive description: name: async - sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" url: "https://pub.dev" source: hosted - version: "2.12.0" + version: "2.13.0" bdk_flutter: dependency: "direct main" description: @@ -153,10 +153,10 @@ packages: dependency: transitive description: name: fake_async - sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.3.3" ffi: dependency: transitive description: @@ -250,10 +250,10 @@ packages: dependency: transitive description: name: leak_tracker - sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" url: "https://pub.dev" source: hosted - version: "10.0.8" + version: "10.0.9" leak_tracker_flutter_testing: dependency: transitive description: @@ -455,10 +455,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 url: "https://pub.dev" source: hosted - version: "14.3.1" + version: "15.0.0" watcher: dependency: transitive description: @@ -479,10 +479,10 @@ packages: dependency: transitive description: name: webdriver - sha256: "3d773670966f02a646319410766d3b5e1037efb7f07cc68f844d5e06cd4d61c8" + sha256: "2f3a14ca026957870cfd9c635b83507e0e51d8091568e90129fbf805aba7cade" url: "https://pub.dev" source: hosted - version: "3.0.4" + version: "3.1.0" yaml: dependency: transitive description: