Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: support build as a flutter module #70

Merged
merged 4 commits into from
Jun 11, 2024
Merged
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
6 changes: 5 additions & 1 deletion .github/workflows/test_example_plugin_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ jobs:
shell: bash
working-directory: ${{ env.EXAMPLE_DIR }}
run: |
export JAVA_HOME=$JAVA_HOME_11_X64
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
fi
flutter build apk --${{ matrix.build_mode }} -v

6 changes: 5 additions & 1 deletion gradle/plugin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,12 @@ 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

plugin.project.android.applicationVariants.all { variant ->
variants.all { variant ->

final buildType = variant.buildType.name

Expand Down
Loading