Skip to content
Open
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
9 changes: 7 additions & 2 deletions cargokit/gradle/plugin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin

import java.nio.file.Paths
import javax.inject.Inject
import org.apache.tools.ant.taskdefs.condition.Os
import org.gradle.process.ExecOperations

CargoKitPlugin.file = buildscript.sourceFile

Expand All @@ -15,6 +17,9 @@ class CargoKitExtension {

abstract class CargoKitBuildTask extends DefaultTask {

@Inject
abstract ExecOperations getExecOperations()

@Input
String buildMode

Expand Down Expand Up @@ -60,12 +65,12 @@ abstract class CargoKitBuildTask extends DefaultTask {
def rootProjectDir = project.rootProject.projectDir

if (!Os.isFamily(Os.FAMILY_WINDOWS)) {
project.exec {
execOperations.exec {
commandLine 'chmod', '+x', path
}
}

project.exec {
execOperations.exec {
executable path
args "build-gradle"
environment "CARGOKIT_ROOT_PROJECT_DIR", rootProjectDir
Expand Down