Skip to content

Commit

Permalink
Merge pull request #383 from qonversion/release/9.3.0
Browse files Browse the repository at this point in the history
Release 9.3.0
  • Loading branch information
SpertsyanKM authored Feb 20, 2025
2 parents d9c72c8 + 802d557 commit 43012ef
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 51 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 9.3.0
* Flutter version 3.29 supported.
* Deprecated Android Embedding v1 is no longer supported.
* Sample app gradle versions upgraded.

## 9.2.1
* Fixed update policy issue for purchase with options.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package com.qonversion.flutter.sdk.qonversion_flutter_sdk

import com.google.gson.Gson
import io.flutter.embedding.engine.plugins.FlutterPlugin
import io.flutter.plugin.common.BinaryMessenger
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugin.common.PluginRegistry
import io.qonversion.sandwich.AutomationsEventListener
import io.qonversion.sandwich.AutomationsSandwich
import io.qonversion.sandwich.BridgeData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
import io.flutter.plugin.common.MethodChannel.Result
import io.flutter.plugin.common.PluginRegistry.Registrar
import io.qonversion.sandwich.ActivityProvider
import io.qonversion.sandwich.BridgeData
import io.qonversion.sandwich.QonversionEventsListener
Expand Down Expand Up @@ -49,15 +48,6 @@ class QonversionPlugin : MethodCallHandler, FlutterPlugin, ActivityAware {
private const val METHOD_CHANNEL = "qonversion_plugin"
private const val EVENT_CHANNEL_PROMO_PURCHASES = "promo_purchases"
private const val EVENT_CHANNEL_UPDATED_ENTITLEMENTS = "updated_entitlements"

// Used for compatibility with the apps, which don't use Android Embedding v2.
@Suppress("DEPRECATION", "unused")
@JvmStatic
fun registerWith(registrar: Registrar) {
val instance = QonversionPlugin()
instance.setup(registrar.messenger(), registrar.context().applicationContext as Application)
instance.activity = registrar.activity()
}
}

override fun onAttachedToEngine(binding: FlutterPlugin.FlutterPluginBinding) {
Expand Down
25 changes: 14 additions & 11 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
id "com.google.gms.google-services"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -6,11 +13,6 @@ if (localPropertiesFile.exists()) {
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand All @@ -21,11 +23,6 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.google.gms.google-services'

android {
compileSdk 34

Expand Down Expand Up @@ -67,6 +64,13 @@ android {
debuggable true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
lint {
disable 'InvalidPackage'
}
Expand All @@ -78,7 +82,6 @@ flutter {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
Expand Down
14 changes: 0 additions & 14 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
buildscript {
ext.kotlin_version = '1.8.22'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.10'
}
}

allprojects {
repositories {
google()
Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
31 changes: 21 additions & 10 deletions example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
include ':app'
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()

def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.7.3" apply false
id "org.jetbrains.kotlin.android" version "1.9.25" apply false
id "com.google.gms.google-services" version "4.3.14" apply false
}

include ":app"
2 changes: 1 addition & 1 deletion lib/src/internal/qonversion_internal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:qonversion_flutter/src/internal/utils/string.dart';
import 'constants.dart';

class QonversionInternal implements Qonversion {
static const String _sdkVersion = "9.2.1";
static const String _sdkVersion = "9.3.0";

final MethodChannel _channel = MethodChannel('qonversion_plugin');

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: qonversion_flutter
description: Flutter plugin to implement in-app subscriptions and purchases. Validate user receipts and manage cross-platform access to paid content on your app. Android & iOS.
version: 9.2.1
version: 9.3.0
homepage: 'https://qonversion.io'
repository: 'https://github.com/qonversion/flutter-sdk'

Expand Down

0 comments on commit 43012ef

Please sign in to comment.