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

Feature/Moving main url out of strings.xml #27

Conversation

VarunBarad
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Documentation Update

Description

As per the discussion in issue #20 I have moved the main-url from string-resource to a build-config field in build.gradle.

Related Tickets & Documents

Issue #20

@CLAassistant
Copy link

CLAassistant commented May 4, 2019

CLA assistant check
All committers have signed the CLA.

release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
resValue("string", "baseUrl", "\"https://dev.to\"")
Copy link

Choose a reason for hiding this comment

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

Is resValue needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The resValue has been added so that when in future the baseUrl needs to be referred from resource files, it is already available to do so.

release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
resValue("string", "baseUrl", "\"https://dev.to\"")
buildConfigField("String", "baseUrl", "\"https://dev.to\"")
Copy link

Choose a reason for hiding this comment

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

I think this can be made cleaner with:

Suggested change
buildConfigField("String", "baseUrl", "\"https://dev.to\"")
buildConfigField("String", "baseUrl", '"https://dev.to"')

Copy link
Contributor

@maestromac maestromac left a comment

Choose a reason for hiding this comment

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

LGTM!

@Glennmen thanks for your input here. Those are valid points but since there are no code here that's a deal breaker I'm going to merge it first. You are welcome to submit follow-up PR though!

@VarunBarad
Copy link
Contributor Author

@Glennmen @maestromac if the suggested changes are required then I can submit another PR for those, but I do suggest that we keep the baseUrl in resValue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants