Skip to content
Open
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
2 changes: 1 addition & 1 deletion cargokit/.github/workflows/test_example_plugin_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

5 changes: 1 addition & 4 deletions cargokit/build_tool/lib/src/options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,7 @@ class CargokitUserOptions {
}
userProjectDir = userProjectDir.parent;
}
return CargokitUserOptions(
usePrecompiledBinaries: true,
verboseLogging: false,
);
return CargokitUserOptions._();
}

final bool usePrecompiledBinaries;
Expand Down
15 changes: 11 additions & 4 deletions cargokit/cmake/resolve_symlinks.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 5 additions & 5 deletions cargokit/gradle/plugin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -92,7 +92,7 @@ class CargoKitPlugin implements Plugin<Project> {
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;
}
}
Expand All @@ -116,7 +116,7 @@ class CargoKitPlugin implements Plugin<Project> {
}

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
Expand All @@ -129,7 +129,7 @@ class CargoKitPlugin implements Plugin<Project> {
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") {
Expand Down
2 changes: 2 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/

# IntelliJ related
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
Expand All @@ -43,11 +44,13 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
20 changes: 10 additions & 10 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down