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

Use includeBuilds for better local development #65

Merged
merged 4 commits into from
Jun 16, 2020

Conversation

vegaro
Copy link
Contributor

@vegaro vegaro commented Jun 15, 2020

Inspired by https://proandroiddev.com/saying-goodbye-to-snapshots-with-gradles-composite-builds-bc98751392f6 and https://galex.co.il/2017/09/12/The_Best_of_Two_worlds_with_Gradle_Composite_Builds.html.

This adds two new gradle tasks enableLocalBuild and disableLocalBuild. By running enableLocalBuild gradle will use the local copy of purchases-hybrid-common instead of the one dowloaded from maven.

Depends on github.com/RevenueCat/purchases-hybrid-common/pull/44

aboedo
aboedo approved these changes Jun 16, 2020
@aboedo
Copy link
Member

aboedo commented Jun 16, 2020

@aboedo aboedo mentioned this pull request Jun 16, 2020
2 tasks

// Run enableLocalBuild task to enable building purchases-hybrid-common from your local copy
if (file(".composite-enable").exists()) {
includeBuild ('../../../../purchases-hybrid-common/android')
Copy link
Member

Choose a reason for hiding this comment

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

is this line assuming the local path of purchases-hybrid-common?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, what could we do to make this easier? maybe an environment variable?

Copy link
Member

Choose a reason for hiding this comment

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

env variable would be the absolute ideal

Copy link
Contributor Author

Choose a reason for hiding this comment

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

let me try that

@vegaro
Copy link
Contributor Author

vegaro commented Jun 16, 2020

@aboedo I changed so the task now accepts a parameter with the path:

./gradlew enableLocalBuild -PcommonPath="$HOME/Development/repos/purchases-hybrid-common/android"

@aboedo
Copy link
Member

aboedo commented Jun 16, 2020

awesome!!

@vegaro vegaro merged commit f985721 into develop Jun 16, 2020
@vegaro vegaro deleted the cesar/feature/local_builds branch June 16, 2020 22:28
Jethro87 pushed a commit to Jethro87/purchases-flutter that referenced this pull request Jan 4, 2025
* creates task to enable local builds

* upgrades versions

* removes purchases dependency

* adds parameter to specify path
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