Skip to content

Bugfix/issue 1863 update gradle build variants for hello_sdl#1864

Merged
joeygrover merged 8 commits intodevelopfrom
bugfix/issue_1863_gradle_build_variants
Oct 25, 2023
Merged

Bugfix/issue 1863 update gradle build variants for hello_sdl#1864
joeygrover merged 8 commits intodevelopfrom
bugfix/issue_1863_gradle_build_variants

Conversation

@JulianKast
Copy link
Contributor

@JulianKast JulianKast commented Aug 17, 2023

Fixes #1863

This PR is [ready] for review.

Risk

This PR makes [no] API changes.

Testing Plan

  • I have verified that I have not introduced new warnings in this PR (or explain why below)
  • I have run the unit tests with this PR
  • I have tested this PR against Core and verified behavior (if applicable, if not applicable, explain why below).
  • I have tested Android

Unit Tests

n/a

Core Tests

I tested multiple apps including adding a new build variant to hello sdl and having multiple apps connect to sync.

Core version / branch / commit hash / module tested against: Sync 3
HMI name / version / branch / commit hash / module tested against: Sync 3

Summary

NOTE: Gradle PR must be reviewed first
This PR improves the build variants for hello sdl so we can test multiple versions of hello sdl by changing a few values or adding a new build variant.

CLA

Base automatically changed from bugfix/issue_1852_update_gradle to develop October 19, 2023 15:00
Copy link
Member

@joeygrover joeygrover left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to add each of these items to the build flavors and they should be kept into the defaultConfig instead. They are all the same values for each of the flavors currently so it doesn't really make sense to have them in the individual flavors. If during development a dev wanted to make some flavors deploy different package/versions of the app for testing then they should be added ad hoc during that time; they would only need to add them to the specific flavor they want to use as a different package/app.

So this is what the defaultConfig should look like in my opinion (note I added SDL_ to the app name and ID keys):

    defaultConfig {
        applicationId "com.sdl.hellosdlandroid"
        minSdkVersion 16
        targetSdkVersion 33
        versionCode 1
        versionName "1.0"
        resValue "string", "app_name", "Hello Sdl Android"
        buildConfigField 'String', 'APP_TYPE', '"DEFAULT"'
        buildConfigField 'String', 'REQUIRE_AUDIO_OUTPUT', '"FALSE"'
        buildConfigField 'String', 'SDL_APP_NAME', '"Hello Sdl"'
        buildConfigField 'String', 'SDL_APP_ID', '"8678309"'
        manifestPlaceholders = [
                appIcon: "@mipmap/ic_launcher"
        ]
        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
    }

@joeygrover joeygrover merged commit 3e71421 into develop Oct 25, 2023
@joeygrover joeygrover deleted the bugfix/issue_1863_gradle_build_variants branch October 25, 2023 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants