Skip to content

Commit b38a61b

Browse files
committed
Merge branch 'payjoin' into main
2 parents ae80fb3 + faf1219 commit b38a61b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+3819
-1527
lines changed

android/app/build.gradle

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
6+
17
def localProperties = new Properties()
28
def localPropertiesFile = rootProject.file('local.properties')
39
if (localPropertiesFile.exists()) {
@@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
612
}
713
}
814

9-
def flutterRoot = localProperties.getProperty('flutter.sdk')
10-
if (flutterRoot == null) {
11-
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12-
}
13-
1415
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
1516
if (flutterVersionCode == null) {
1617
flutterVersionCode = '1'
@@ -21,9 +22,6 @@ if (flutterVersionName == null) {
2122
flutterVersionName = '1.0'
2223
}
2324

24-
apply plugin: 'com.android.application'
25-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26-
2725
def keystoreProperties = new Properties()
2826
def keystorePropertiesFile = rootProject.file('key.properties')
2927
if (keystorePropertiesFile.exists()) {

android/build.gradle

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,31 @@ rootProject.buildDir = '../build'
2323
subprojects {
2424
project.buildDir = "${rootProject.buildDir}/${project.name}"
2525
}
26+
subprojects {
27+
afterEvaluate { project ->
28+
if (project.extensions.findByName("android") != null) {
29+
Integer pluginCompileSdk = project.android.compileSdk
30+
if (pluginCompileSdk != null && pluginCompileSdk < 31) {
31+
project.logger.error(
32+
"Warning: Overriding compileSdk version in Flutter plugin: "
33+
+ project.name
34+
+ " from "
35+
+ pluginCompileSdk
36+
+ " to 31 (to work around https://issuetracker.google.com/issues/199180389)."
37+
+ "\nIf there is not a new version of " + project.name + ", consider filing an issue against "
38+
+ project.name
39+
+ " to increase their compileSdk to the latest (otherwise try updating to the latest version)."
40+
)
41+
project.android {
42+
compileSdk 31
43+
}
44+
}
45+
}
46+
}
47+
48+
project.buildDir = "${rootProject.buildDir}/${project.name}"
49+
project.evaluationDependsOn(":app")
50+
}
2651
subprojects {
2752
project.evaluationDependsOn(':app')
2853
}

android/settings.gradle

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1-
include ':app'
1+
pluginManagement {
2+
def flutterSdkPath = {
3+
def properties = new Properties()
4+
file("local.properties").withInputStream { properties.load(it) }
5+
def flutterSdkPath = properties.getProperty("flutter.sdk")
6+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7+
return flutterSdkPath
8+
}()
29

3-
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
10+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
411

5-
def plugins = new Properties()
6-
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7-
if (pluginsFile.exists()) {
8-
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
12+
repositories {
13+
google()
14+
mavenCentral()
15+
gradlePluginPortal()
16+
}
917
}
1018

11-
plugins.each { name, path ->
12-
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13-
include ":$name"
14-
project(":$name").projectDir = pluginDirectory
19+
plugins {
20+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21+
id "com.android.application" version "7.3.0" apply false
22+
id "org.jetbrains.kotlin.android" version "1.8.21" apply false
1523
}
24+
25+
include ":app"

0 commit comments

Comments
 (0)