Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ jobs:
working-directory: purchasely
run: flutter pub get

- name: Override purchasely_flutter dependency to local path
run: |
echo "dependency_overrides:" > purchasely_google/pubspec_overrides.yaml
echo " purchasely_flutter:" >> purchasely_google/pubspec_overrides.yaml
echo " path: ../purchasely" >> purchasely_google/pubspec_overrides.yaml

- name: Install dependencies (purchasely_google)
working-directory: purchasely_google
run: flutter pub get
Expand Down Expand Up @@ -90,6 +96,12 @@ jobs:
working-directory: purchasely
run: flutter test --coverage || echo "No tests found, skipping..."

- name: Override purchasely_flutter dependency to local path
run: |
echo "dependency_overrides:" > purchasely_google/pubspec_overrides.yaml
echo " purchasely_flutter:" >> purchasely_google/pubspec_overrides.yaml
echo " path: ../purchasely" >> purchasely_google/pubspec_overrides.yaml

- name: Install dependencies (purchasely_google)
working-directory: purchasely_google
run: flutter pub get
Expand Down
53 changes: 45 additions & 8 deletions RELEASE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,24 @@ This script will automatically:
- Add a changelog entry for the new version in all `CHANGELOG.md` files (if not already present)
- Run `flutter pub publish --dry-run` to validate

> **Note:** The `--dry-run` for `purchasely_google` will fail because it depends on `purchasely_flutter ^{VERSION}` which isn't published yet. This is expected.

> **Known issues with publish.sh:**
> - The changelog URL is hardcoded to `/changelog/56`. You must manually update it to match the version (e.g., `/changelog/57` for 5.7.0).
> - The bridge version lines use tab indentation, but the codebase uses spaces. Fix the indentation in `SwiftPurchaselyFlutterPlugin.swift` and `PurchaselyFlutterPlugin.kt` after running the script.
> - The changelog entries only contain the link. Add a brief package-specific summary of changes (see Step 1b).

### Step 1b: Update Changelogs

After running `publish.sh`, update each `CHANGELOG.md` with:
1. The correct changelog URL for this version
2. A brief summary of changes relevant to each package

For example:
- `purchasely/CHANGELOG.md`: mention iOS SDK, Android SDK, and bridge version updates
- `purchasely_google/CHANGELOG.md`: mention Google Play SDK update only
- `purchasely_android_player/CHANGELOG.md`: mention Player SDK update only


### Step 2: Update iOS SDK Version (if needed)

Expand All @@ -70,16 +88,26 @@ s.dependency 'Purchasely', '5.6.4'

### Step 3: Update Android SDK Version (if needed)

If the Android Purchasely SDK version needs to be updated, edit the `build.gradle` file in **each package folder**:
If the Android Purchasely SDK version needs to be updated, edit the `build.gradle` file in **each package folder** and the example app:

**Plugin files to update:**
- `purchasely/android/build.gradle` — `io.purchasely:core`
- `purchasely_google/android/build.gradle` — `io.purchasely:google-play`
- `purchasely_android_player/android/build.gradle` — `io.purchasely:player`

**Example app file to update:**
- `purchasely/example/android/app/build.gradle` — `io.purchasely:google-play` and `io.purchasely:player`

### Step 3b: Check Android minSdkVersion (if needed)

When bumping the native Android SDK, check if the new version requires a higher `minSdkVersion`. If so, update it in **all** `build.gradle` files:

**Files to update:**
- `purchasely/android/build.gradle`
- `purchasely_google/android/build.gradle`
- `purchasely_android_player/android/build.gradle`
- `purchasely/example/android/app/build.gradle`

```gradle
implementation 'io.purchasely:purchasely:5.6.0'
```
> **Example:** `io.purchasely:core:5.7.0` raised the minimum from 21 to 23.

### Step 4: Update VERSIONS.md

Expand Down Expand Up @@ -181,9 +209,13 @@ git push origin v{VERSION}
|------|----------------|
| `VERSIONS.md` | Always - add new version row |
| `purchasely/ios/purchasely_flutter.podspec` | When iOS SDK version changes |
| `purchasely/android/build.gradle` | When Android SDK version changes |
| `purchasely_google/android/build.gradle` | When Android SDK version changes |
| `purchasely_android_player/android/build.gradle` | When Android SDK version changes |
| `purchasely/android/build.gradle` | When Android SDK version changes (dependency + minSdkVersion) |
| `purchasely_google/android/build.gradle` | When Android SDK version changes (dependency + minSdkVersion) |
| `purchasely_android_player/android/build.gradle` | When Android SDK version changes (dependency + minSdkVersion) |
| `purchasely/example/android/app/build.gradle` | When Android SDK version changes (google-play + player deps, minSdkVersion) |
| All `CHANGELOG.md` files | Fix URL and add package-specific summaries after publish.sh |
| `SwiftPurchaselyFlutterPlugin.swift` | Fix tab→space indentation after publish.sh |
| `PurchaselyFlutterPlugin.kt` | Fix tab→space indentation after publish.sh |

---

Expand Down Expand Up @@ -225,8 +257,13 @@ flutter pub get

```
□ Run: sh publish.sh {VERSION}
□ Fix changelog URLs (publish.sh hardcodes /changelog/56)
□ Add package-specific changelog summaries
□ Fix tab→space indentation in SwiftPurchaselyFlutterPlugin.swift and PurchaselyFlutterPlugin.kt
□ Update purchasely/ios/purchasely_flutter.podspec (iOS SDK version, if needed)
□ Update all build.gradle files (Android SDK version, if needed)
□ Update purchasely/example/android/app/build.gradle (Android SDK deps, if needed)
□ Check Android minSdkVersion requirements (if Android SDK version changed)
□ Update VERSIONS.md with new version row
□ Run: flutter pub get && pod update (in example/ios)
□ Run: flutter test && flutter analyze lib/
Expand Down
1 change: 1 addition & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ This file provides the underlying native SDK versions that the React Native SDK
| 5.6.0 | 5.6.0 | 5.6.0 |
| 5.6.1 | 5.6.2 | 5.6.0 |
| 5.6.2 | 5.6.4 | 5.6.0 |
| 5.7.0 | 5.7.0 | 5.7.0 |
6 changes: 6 additions & 0 deletions purchasely/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 5.7.0
- Updated iOS Purchasely SDK to 5.7.0.
- Updated Android Purchasely Core SDK to 5.7.0.
- Updated bridge version to 5.7.0.
Full changelog available at https://docs.purchasely.com/changelog/57

## 5.6.2
- Updated iOS Purchasely SDK to 5.6.4

Expand Down
4 changes: 2 additions & 2 deletions purchasely/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ android {
}

defaultConfig {
minSdkVersion 21
minSdkVersion 23
}

testOptions {
Expand All @@ -58,7 +58,7 @@ dependencies {

api 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.0'

api 'io.purchasely:core:5.6.0'
api 'io.purchasely:core:5.7.0'

// Test dependencies
testImplementation 'junit:junit:4.13.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ class PurchaselyFlutterPlugin: FlutterPlugin, MethodCallHandler, ActivityAware,
.userId(userId)
.build()

Purchasely.sdkBridgeVersion = "5.6.2"
Purchasely.sdkBridgeVersion = "5.7.0"
Purchasely.appTechnology = PLYAppTechnology.FLUTTER

Purchasely.start { isConfigured, error ->
Expand Down
6 changes: 3 additions & 3 deletions purchasely/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.purchasely.demo"
minSdkVersion flutter.minSdkVersion
minSdkVersion 23
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand All @@ -62,6 +62,6 @@ flutter {
}

dependencies {
implementation 'io.purchasely:google-play:5.6.0'
implementation 'io.purchasely:player:5.6.0'
implementation 'io.purchasely:google-play:5.7.0'
implementation 'io.purchasely:player:5.7.0'
}
8 changes: 4 additions & 4 deletions purchasely/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
PODS:
- Flutter (1.0.0)
- Purchasely (5.6.4)
- Purchasely (5.7.0)
- purchasely_flutter (1.2.4):
- Flutter
- Purchasely (= 5.6.4)
- Purchasely (= 5.7.0)

DEPENDENCIES:
- Flutter (from `Flutter`)
Expand All @@ -21,8 +21,8 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
Purchasely: f7640277e49e305c5d625d2142b060893d1001de
purchasely_flutter: bcc070c1ef951b345edc809f2024c84ea4cff8c8
Purchasely: 1e0f35fc73e9a28c10baee670ba0c88d95469075
purchasely_flutter: 2cab85d5f58e91a75bc23a59fe0a51ea4a25aa86

PODFILE CHECKSUM: 4a5d3c75c41739c31c5593a2d45e26f203a0b464

Expand Down
2 changes: 1 addition & 1 deletion purchasely/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ packages:
path: ".."
relative: true
source: path
version: "5.6.2"
version: "5.7.0"
sky_engine:
dependency: transitive
description: flutter
Expand Down
2 changes: 1 addition & 1 deletion purchasely/ios/Classes/SwiftPurchaselyFlutterPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public class SwiftPurchaselyFlutterPlugin: NSObject, FlutterPlugin {
return
}

Purchasely.setSdkBridgeVersion("5.6.2")
Purchasely.setSdkBridgeVersion("5.7.0")
Purchasely.setAppTechnology(PLYAppTechnology.flutter)

let logLevel = PLYLogger.PLYLogLevel(rawValue: (arguments["logLevel"] as? Int) ?? PLYLogger.PLYLogLevel.debug.rawValue) ?? .debug
Expand Down
2 changes: 1 addition & 1 deletion purchasely/ios/purchasely_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Flutter Plugin for Purchasely SDK
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
s.swift_version = '5.0'

s.dependency 'Purchasely', '5.6.4'
s.dependency 'Purchasely', '5.7.0'
s.static_framework = true

end
2 changes: 1 addition & 1 deletion purchasely/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: purchasely_flutter
description: Purchasely is a solution to ease the integration and boost your In-App Purchase & Subscriptions on the App Store, Google Play Store and Huawei App Gallery.
version: 5.6.2
version: 5.7.0
homepage: https://www.purchasely.com/

environment:
Expand Down
4 changes: 4 additions & 0 deletions purchasely_android_player/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 5.7.0
- Updated Android Purchasely Player SDK to 5.7.0.
Full changelog available at https://docs.purchasely.com/changelog/57

## 5.6.2
- Updated iOS Purchasely SDK to 5.6.4

Expand Down
4 changes: 2 additions & 2 deletions purchasely_android_player/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ android {
}

defaultConfig {
minSdkVersion 16
minSdkVersion 23
}
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

api 'io.purchasely:player:5.6.0'
api 'io.purchasely:player:5.7.0'
}
2 changes: 1 addition & 1 deletion purchasely_android_player/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: purchasely_android_player
description: Purchasely Player dependency for Android
version: 5.6.2
version: 5.7.0
homepage: https://www.purchasely.com/

environment:
Expand Down
4 changes: 4 additions & 0 deletions purchasely_google/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 5.7.0
- Updated Android Purchasely Google Play SDK to 5.7.0.
Full changelog available at https://docs.purchasely.com/changelog/57

## 5.6.2
- Updated iOS Purchasely SDK to 5.6.4

Expand Down
4 changes: 2 additions & 2 deletions purchasely_google/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ android {
}

defaultConfig {
minSdkVersion 16
minSdkVersion 23
}
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

api 'io.purchasely:google-play:5.6.0'
api 'io.purchasely:google-play:5.7.0'
}
2 changes: 1 addition & 1 deletion purchasely_google/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: purchasely_google
description: Purchasely Google Play Billing dependency for Android
version: 5.6.2
version: 5.7.0
homepage: https://www.purchasely.com/

environment:
Expand Down
Loading