Set cargo release profile for different buildTypes

Open
#38 3 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, kotlin, rust

Research direction

Start by reviewing rust-android-gradle's handling of Android build types and its Cargo profile configuration; the issue does not name specific files or tests. Compare the requested behavior with the referenced cargo-ndk-android-gradle project. Done means release and debug build types can select appropriate Cargo profiles, with additional per-buildType configuration supported.

Written by the indexing model from the issue text.

Description

I have two build types release and debug, and I'd like to set the cargo release profile depending on the build type (instead of using debug, which is bad in production, or using release, which is slow when developing or running in CI).

Example of my build types:

android {
    ...
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            applicationIdSuffix ".debug"
        }
    }
}

I noticed that https://github.com/willir/cargo-ndk-android-gradle did what I want by default, and supported additional configuration per-buildType. Is there a way to work around this? Or is the fix to support it easy?

Dominant language
Kotlin
Stars
1.3k
Forks
95
Avg merge
15m
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozilla/rust-android-gradle

All issues in mozilla/rust-android-gradle

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.