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

Updating to Gradle plugin 4.1 #168

Closed
wants to merge 1 commit into from
Closed

Updating to Gradle plugin 4.1 #168

wants to merge 1 commit into from

Conversation

mpodwysocki
Copy link
Contributor

Things to consider before you submit the PR:

  • Are tests passing locally?
  • Are the files formatted correctly?
  • Did you add unit tests?
  • Did you test your change with either the sample apps that are included in the repository or with a blank app that uses your change?

Description

A few sentences describing the overall goals of the pull request.

Related PRs or issues

List related PRs and other issues.

Misc

Add what's missing, notes on what you tested, additional thoughts or questions.

@@ -18,6 +18,9 @@ android {
versionName VERSION
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
testInstrumentationRunnerArguments clearPackageData: 'true'

buildConfigField 'int', 'VERSION_CODE', "${versionCode}"
buildConfigField 'String', 'VERSION_NAME', "\"${versionName}\""
Copy link
Member

Choose a reason for hiding this comment

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

Please delete these lines. We can already use gradle provided version information because of the versionCode and versionName fields above. You can see them already in use here:

private static String getUserAgent() {
String apiOrigin = "AndroidSdkV1FcmV" + BuildConfig.VERSION_NAME;
String userAgent = String.format("NOTIFICATIONHUBS/%s (api-origin=%s; os=%s; os_version=%s;)",
API_VERSION, apiOrigin, "Android", Build.VERSION.RELEASE);
return userAgent;
}

}

// https://github.com/gradle/gradle/issues/14889
Copy link
Member

Choose a reason for hiding this comment

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

gross 😆 Thanks for tracking this down and add a work around

@mpodwysocki
Copy link
Contributor Author

No longer necessary as we have upgraded Gradle with another commit.

@mpodwysocki mpodwysocki deleted the gradle-41 branch July 21, 2021 15:02
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.

None yet

2 participants