Skip to content
Open
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
4 changes: 4 additions & 0 deletions pay_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 3.2.1 (2026-09-05)

* Apply Kotlin Gradle Plugin only when AGP built-in Kotlin is inactive.

## 3.2.0 (2025-11-21)

* Add `pix` to the `GooglePayButtonType` enum. This enables the PIX button type on the Google Pay button for Pix integrations.
Expand Down
29 changes: 21 additions & 8 deletions pay_android/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ group 'io.flutter.plugins.pay_android'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.8.21'
ext.kotlin_version = '2.2.21'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.13.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -38,18 +38,20 @@ rootProject.allprojects {
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

def agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0] as int
def builtInKotlin = agpMajor >= 9 &&
project.findProperty('android.builtInKotlin')?.toString() != 'false'
if (!builtInKotlin) {
apply plugin: 'kotlin-android'
}

android {
// Conditional for compatibility with AGP <4.2.
if (project.android.hasProperty("namespace")) {
namespace 'io.flutter.plugins.pay_android'
}
compileSdk 34

kotlinOptions {
jvmTarget = '1.8'
}
compileSdk 36

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -64,6 +66,17 @@ android {
lintOptions {
disable 'InvalidPackage'
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8
}
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion pay_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

name: pay_android
description: A plug-in to add support for payments on the Android side of Flutter applications.
version: 3.2.0
version: 3.2.1
homepage: https://github.com/google-pay/flutter-plugin

environment:
Expand Down