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: solve foss source sets and dependencies statically 🍒 #3083

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 6, 2024

This PR was automatically cherry-picked based on the following PR:

Original PR description:



PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

When developing F-Droid flavor, the IDE doesn't provide autocompletion and pretty much any other support.

Causes

We're relying on explicit environment variables or invoked task name to figure out whether we should configure F-Droid or not.

The IDE doesn't se these when communicating with Gradle.

Solutions

Just set everything so it works statically, without depending on env variables or tasks being run.

F-Droid flavor is always dependent on prod and foss source sets.
Each other non-free flavor is always dependent on nonfree.

So it looks like this:

%%{init: { "flowchart": { "curve": "linear" } } }%%
flowchart TD
    F(fdroid flavor) --> foss
    F --> p
    P(prod flavor) --> p(prod)
    P --> nonfree
    B(beta flavor) --> beta
    B --> nonfree
    I(internal flavor) --> internal
    I --> nonfree
    D(dev flavor) --> dev
    D --> nonfree
    S(staging flavor) --> nonfree
    S --> staging
Loading

Logs during Gradle configuration:

Adding non-free sourceSets to 'prod' flavor
Adding non-free sourceSets to 'internal' flavor
Adding non-free sourceSets to 'staging' flavor
Adding non-free sourceSets to 'beta' flavor
Adding non-free sourceSets to 'dev' flavor
Adding FOSS sourceSets to 'fdroid' flavor
Adding nonfree libraries to 'prod' flavor
Adding nonfree libraries to 'internal' flavor
Adding nonfree libraries to 'staging' flavor
Adding nonfree libraries to 'beta' flavor
Adding nonfree libraries to 'dev' flavor
Skipping nonfree libraries for 'fdroid' flavor

Attachments

When selecting prodDebug build type in the IDE:

image


When selecting fdroidDebug build type in the IDE:

image


PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@github-actions github-actions bot added cherry-pick PR is cherry-picking changes from another banch size/XS labels Jun 6, 2024
@AndroidBob
Copy link
Collaborator

Build 5212 failed.

@vitorhugods vitorhugods enabled auto-merge June 6, 2024 12:30
Copy link

sonarqubecloud bot commented Jun 6, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@AndroidBob
Copy link
Collaborator

Build 5225 failed.

@vitorhugods vitorhugods added this pull request to the merge queue Jun 7, 2024
Merged via the queue into develop with commit 8bc646b Jun 7, 2024
10 of 11 checks passed
@vitorhugods vitorhugods deleted the chore/solve-foss-source-sets-and-dependencies-statically-cherry-pick branch June 7, 2024 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick PR is cherry-picking changes from another banch size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants