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

Remove the need to update the version in two places #80

Merged
merged 7 commits into from
Feb 2, 2021

Conversation

amit-nayar
Copy link
Contributor

@amit-nayar amit-nayar commented Feb 1, 2021

Details

When doing a version bump, we should keep the values in pubspec.yaml and config.gradle for android the same.
This PR uses a gradle Yaml library to parse the pubspec version and use it in the gradle config step.

I am also updating the gradle version and have applied some auto generated android studio fixes (commented) related to migrating to AndroidX.

Acceptance Criteria

  • Before merging retest all the examples to make sure that they work on both Android and iOS.

@amit-nayar amit-nayar self-assigned this Feb 1, 2021
@@ -1,2 +1,17 @@
## For more details on how to configure your build environment visit
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 changes in this file were added by Android Studio automatically to fix some warnings.

Copy link
Contributor

Choose a reason for hiding this comment

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

Those changes look good and are sensible.

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Upping the gradle version because there appears to be no side effects from doing so.

@amit-nayar amit-nayar added the READY TO REVIEW Pull request ready to review label Feb 2, 2021
@amit-nayar amit-nayar marked this pull request as ready for review February 2, 2021 08:51
@@ -44,7 +44,7 @@ flutter {
}

dependencies {
compile 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:multidex:1.0.3'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

compile is deprecated

@amit-nayar amit-nayar changed the title Remove the need to update the version in 2 places Remove the need to update the version in two places Feb 2, 2021
android/config.gradle Outdated Show resolved Hide resolved
@@ -1,2 +1,17 @@
## For more details on how to configure your build environment visit
Copy link
Contributor

Choose a reason for hiding this comment

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

Those changes look good and are sensible.

example/android/gradle.properties Outdated Show resolved Hide resolved
amit-nayar and others added 3 commits February 2, 2021 15:37
Co-authored-by: David Schreiber-Ranner <davidschreiber@users.noreply.github.com>

- Fixes versioning system to not require a manual update in two places. (#80)
- Updates Gradle version and enable AndroidX for Android plugin and example. (#80)
- Changes open source license to modified BSD instead of Apache. (#79)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated but missing from the changelog.

@@ -31,10 +43,17 @@ if (pspdfkitVersion == null || pspdfkitVersion == '') {

ext.pspdfkitMavenModuleName = 'pspdfkit'

ext.pspdfkitFlutterVersion = '1.10.3'
// Get our library version from the top level pubspec.yaml file.
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

@amit-nayar amit-nayar merged commit c8fbdba into master Feb 2, 2021
@amit-nayar amit-nayar deleted the amit/import-version branch February 2, 2021 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android READY TO REVIEW Pull request ready to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants