File tree Expand file tree Collapse file tree 4 files changed +21
-5
lines changed
super_native_extensions/cargokit Expand file tree Collapse file tree 4 files changed +21
-5
lines changed Original file line number Diff line number Diff line change 7777 shell : bash
7878 working-directory : ${{ env.EXAMPLE_DIR }}
7979 run : |
80- export JAVA_HOME=$JAVA_HOME_11_X64
80+ if [[ $(sysctl hw.optional.arm64) == *"hw.optional.arm64: 1"* ]]; then
81+ export JAVA_HOME=$JAVA_HOME_17_arm64
82+ else
83+ export JAVA_HOME=$JAVA_HOME_11_X64
84+ fi
8185 flutter build apk --${{ matrix.build_mode }} -v
8286
Original file line number Diff line number Diff line change 4949 fi
5050done
5151
52- " $BASEDIR /run_build_tool.sh" build-pod " $@ "
52+ sh " $BASEDIR /run_build_tool.sh" build-pod " $@ "
5353
5454# Make a symlink from built framework to phony file, which will be used as input to
5555# build script. This should force rebuild (podspec currently doesn't support alwaysOutOfDate
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ function(apply_cargokit target manifest_dir lib_name any_symbol_name)
5050 else ()
5151 set (SCRIPT_EXTENSION ".sh" )
5252 set (IMPORT_LIB_EXTENSION "" )
53+ execute_process (COMMAND chmod +x "${cargokit_cmake_root} /run_build_tool${SCRIPT_EXTENSION} " )
5354 endif ()
5455
5556 # Using generators in custom command is only supported in CMake 3.20+
@@ -75,6 +76,7 @@ function(apply_cargokit target manifest_dir lib_name any_symbol_name)
7576 )
7677 endif ()
7778
79+
7880 set_source_files_properties ("${CMAKE_CURRENT_BINARY_DIR} /_phony_" PROPERTIES SYMBOLIC TRUE )
7981
8082 if (TARGET ${target} )
@@ -94,4 +96,4 @@ function(apply_cargokit target manifest_dir lib_name any_symbol_name)
9496 # Allow adding the output library to plugin bundled libraries
9597 set ("${target} _cargokit_lib" ${OUTPUT_LIB} PARENT_SCOPE)
9698
97- endfunction ()
99+ endfunction ()
Original file line number Diff line number Diff line change @@ -55,7 +55,13 @@ abstract class CargoKitBuildTask extends DefaultTask {
5555 def manifestDir = Paths . get(project. buildscript. sourceFile. parent, project. cargokit. manifestDir)
5656
5757 def rootProjectDir = project. rootProject. projectDir
58-
58+
59+ if (! Os . isFamily(Os . FAMILY_WINDOWS )) {
60+ project. exec {
61+ commandLine ' chmod' , ' +x' , path
62+ }
63+ }
64+
5965 project. exec {
6066 executable path
6167 args " build-gradle"
@@ -110,8 +116,12 @@ class CargoKitPlugin implements Plugin<Project> {
110116 }
111117
112118 def cargoBuildDir = " ${ project.buildDir} /build"
119+
120+ // Determine if the project is an application or library
121+ def isApplication = plugin. project. plugins. hasPlugin(' com.android.application' )
122+ def variants = isApplication ? plugin. project. android. applicationVariants : plugin. project. android. libraryVariants
113123
114- plugin . project . android . applicationVariants . all { variant ->
124+ variants . all { variant ->
115125
116126 final buildType = variant. buildType. name
117127
You can’t perform that action at this time.
0 commit comments