-
Notifications
You must be signed in to change notification settings - Fork 168
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
Separate paywalls into a different package #919
Merged
Merged
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
aaaa3f5
Created new purchases_flutter_ui flutter plugin
tonidero 15e0790
Remove example
tonidero a1ee9f7
Add code to support presentPaywll methods
tonidero d45d245
Update purchase tester to support new library
tonidero b6e46a4
remove paywalls code from the main sdk
tonidero 3b82b96
Fix tests after removing present paywalls from main sdk
tonidero bb4d4dd
Fix pub publish issues
tonidero ae4c136
Fix api tests
tonidero 301e87f
Add CI and fastlane changes to support separate project
tonidero ab29e98
Separate deploying new package into different job
tonidero f181d79
Fix macos compilation
tonidero 26343ca
Fix podspec data
tonidero af019bb
Another macos fix
tonidero ee1098f
Lower compile sdk version to 33 temporarily
tonidero 042e8a7
Anodther macos fix
tonidero de725d9
Fixes from review
tonidero 3405f8b
Update README.md for new package
tonidero f031f5c
Fix linter
tonidero File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
revenuecat_examples | ||
scripts | ||
migrations | ||
fastlane | ||
api_tester | ||
codegen.sh | ||
Dangerfile | ||
Gemfile | ||
Gemfile.lock | ||
pubspec.lock | ||
|
||
# Imported from .gitignore | ||
vendor | ||
.bundle | ||
flutter | ||
**/Podfile.lock | ||
*.bck | ||
**/android/**/gradle-wrapper.jar | ||
**/android/.gradle | ||
**/android/captures/ | ||
**/android/gradlew | ||
**/android/gradlew.bat | ||
**/android/local.properties | ||
**/android/**/GeneratedPluginRegistrant.java | ||
**/android/key.properties | ||
*.jks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
api_tester/lib/api_tests/purchases_flutter_ui_api_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import 'package:purchases_flutter_ui/purchases_flutter_ui.dart'; | ||
|
||
// ignore_for_file: unused_element | ||
// ignore_for_file: unused_local_variable | ||
class _PurchasesFlutterApiTest { | ||
void _checkPresentPaywall() async { | ||
Future<void> future1 = RevenueCatUI.presentPaywall(); | ||
Future<void> future2 = RevenueCatUI.presentPaywallIfNeeded("test"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,10 @@ files_with_version_number = { | |
'./ios/Classes/PurchasesFlutterPlugin.m' => ['return @"{x}"'], | ||
'./android/build.gradle' => ['version \'{x}\''], | ||
'./android/src/main/java/com/revenuecat/purchases_flutter/PurchasesFlutterPlugin.java' => ['PLUGIN_VERSION = "{x}"'], | ||
'./purchases_flutter_ui/pubspec.yaml' => ['version: {x}'], | ||
'./purchases_flutter_ui/ios/purchases_flutter.podspec' => ['s.version = \'{x}\''], | ||
'./purchases_flutter_ui/macos/purchases_flutter.podspec' => ['s.version = \'{x}\''], | ||
'./purchases_flutter_ui/android/build.gradle' => ['version \'{x}\''], | ||
} | ||
|
||
repo_name = 'purchases-flutter' | ||
|
@@ -85,16 +89,35 @@ end | |
|
||
desc "Create release" | ||
lane :release do |options| | ||
# Remove purchases_flutter_ui so it's not included in the release of the main SDK | ||
# Can't use .pubignore because it causes files to not be found when trying to | ||
# deploy purchases_flutter_ui | ||
sh('rm', '-rf', 'purchases_flutter_ui') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not ideal... But didn't want to modify the whole repo architecture right now. We can revisit later. |
||
Dir.chdir('..') do | ||
sh('flutter', 'pub', 'publish', '--dry-run') | ||
end | ||
github_release(version: current_version_number) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Separated this into its own job |
||
setup_credentials_file | ||
setup_credentials_file | ||
Dir.chdir('..') do | ||
sh('flutter', 'pub', 'publish', '--force') | ||
end | ||
end | ||
|
||
desc "Create purchases_flutter_ui release" | ||
lane :release_purchases_flutter_ui do |options| | ||
Dir.chdir('../purchases_flutter_ui') do | ||
sh('flutter', 'pub', 'publish', '--dry-run') | ||
end | ||
setup_credentials_file | ||
Dir.chdir('../purchases_flutter_ui') do | ||
sh('flutter', 'pub', 'publish', '--force') | ||
end | ||
end | ||
|
||
desc "Make github release with current version number" | ||
lane :github_release_current_version do |options| | ||
github_release(version: current_version_number) | ||
end | ||
|
||
desc "Make github release" | ||
lane :github_release do |options| | ||
create_github_release( | ||
|
@@ -141,6 +164,9 @@ lane :update_hybrid_common do |options| | |
'ios/purchases_flutter.podspec' => ['s.dependency \'PurchasesHybridCommon\', \'{x}\''], | ||
'macos/purchases_flutter.podspec' => ['s.dependency \'PurchasesHybridCommon\', \'{x}\''], | ||
'android/build.gradle' => ['ext.common_version = \'{x}\''], | ||
'purchases_flutter_ui/ios/purchases_flutter.podspec' => ['s.dependency \'PurchasesHybridCommon\', \'{x}\''], | ||
tonidero marked this conversation as resolved.
Show resolved
Hide resolved
|
||
'purchases_flutter_ui/macos/purchases_flutter.podspec' => ['s.dependency \'PurchasesHybridCommon\', \'{x}\''], | ||
'purchases_flutter_ui/android/build.gradle' => ['ext.common_version = \'{x}\''], | ||
} | ||
|
||
if dry_run | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were including a bunch of things on the published package that weren't needed... This file removes most of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amazing