Skip to content

Commit

Permalink
Merge pull request #345 from ConnectyCube/feature/update_gradle_plugin
Browse files Browse the repository at this point in the history
FL-28: Update Android app with Plugin DSL
  • Loading branch information
TatankaConCube authored Mar 6, 2024
2 parents 15a86ef + 1eb96f5 commit 5d5518f
Show file tree
Hide file tree
Showing 55 changed files with 96,243 additions and 58,671 deletions.
17 changes: 7 additions & 10 deletions chat_sample/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -6,11 +12,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,10 +22,6 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

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

android {
compileSdkVersion 34
ndkVersion "25.2.9519653"
Expand Down Expand Up @@ -65,7 +62,7 @@ flutter {
}

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

dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
Expand Down
2 changes: 2 additions & 0 deletions chat_sample/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
kotlinVersion=1.8.22
agpVersion=7.3.1
30 changes: 20 additions & 10 deletions chat_sample/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
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 "${agpVersion}" apply false
id "org.jetbrains.kotlin.android" version "${kotlinVersion}" apply false
}

include ":app"
6 changes: 3 additions & 3 deletions chat_sample/build/web/flutter_service_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ const MANIFEST = 'flutter-app-manifest';
const TEMP = 'flutter-temp-cache';
const CACHE_NAME = 'flutter-app-cache';

const RESOURCES = {"version.json": "df4cad5ee5e786163f2aee98caa01a30",
"index.html": "5779225367c03d07121d2160a35af8b4",
"/": "5779225367c03d07121d2160a35af8b4",
const RESOURCES = {"version.json": "c66ef7772c9af823b1216a3864bb639a",
"index.html": "f7e7199cc5285fd03746078c5f1e83f8",
"/": "f7e7199cc5285fd03746078c5f1e83f8",
"firebase-messaging-sw.js": "a43f2eac8588b877b1194cb36242cbae",
"main.dart.js": "b278d51116130ea606c61e5493077e5d",
"flutter.js": "c71a09214cb6f5f8996a531350400a9a",
Expand Down
2 changes: 1 addition & 1 deletion chat_sample/build/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
https://developers.google.com/web/fundamentals/primers/service-workers -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/pica.min.js" ></script>
<script>
const serviceWorkerVersion = "1408506828";
const serviceWorkerVersion = "2771798217";
var scriptLoaded = false;
function loadMainDartJs() {
if (scriptLoaded) {
Expand Down
2 changes: 1 addition & 1 deletion chat_sample/build/web/version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"app_name":"chat_sample","version":"0.9.1","package_name":"chat_sample"}
{"app_name":"chat_sample","version":"0.10.0","package_name":"chat_sample"}
90 changes: 49 additions & 41 deletions chat_sample/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,55 +10,55 @@ PODS:
- FlutterMacOS
- emoji_picker_flutter (0.0.1):
- FlutterMacOS
- Firebase/Auth (10.20.0):
- Firebase/Auth (10.22.0):
- Firebase/CoreOnly
- FirebaseAuth (~> 10.20.0)
- Firebase/CoreOnly (10.20.0):
- FirebaseCore (= 10.20.0)
- Firebase/Messaging (10.20.0):
- FirebaseAuth (~> 10.22.0)
- Firebase/CoreOnly (10.22.0):
- FirebaseCore (= 10.22.0)
- Firebase/Messaging (10.22.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 10.20.0)
- firebase_auth (4.17.5):
- Firebase/Auth (~> 10.20.0)
- Firebase/CoreOnly (~> 10.20.0)
- FirebaseMessaging (~> 10.22.0)
- firebase_auth (4.17.7):
- Firebase/Auth (~> 10.22.0)
- Firebase/CoreOnly (~> 10.22.0)
- firebase_core
- FlutterMacOS
- firebase_core (2.25.4):
- Firebase/CoreOnly (~> 10.20.0)
- firebase_core (2.26.0):
- Firebase/CoreOnly (~> 10.22.0)
- FlutterMacOS
- firebase_messaging (14.7.16):
- Firebase/CoreOnly (~> 10.20.0)
- Firebase/Messaging (~> 10.20.0)
- firebase_messaging (14.7.18):
- Firebase/CoreOnly (~> 10.22.0)
- Firebase/Messaging (~> 10.22.0)
- firebase_core
- FlutterMacOS
- FirebaseAppCheckInterop (10.21.0)
- FirebaseAuth (10.20.0):
- FirebaseAppCheckInterop (10.22.0)
- FirebaseAuth (10.22.0):
- FirebaseAppCheckInterop (~> 10.17)
- FirebaseCore (~> 10.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/Environment (~> 7.8)
- GTMSessionFetcher/Core (< 4.0, >= 2.1)
- RecaptchaInterop (~> 100.0)
- FirebaseCore (10.20.0):
- FirebaseCore (10.22.0):
- FirebaseCoreInternal (~> 10.0)
- GoogleUtilities/Environment (~> 7.12)
- GoogleUtilities/Logger (~> 7.12)
- FirebaseCoreInternal (10.21.0):
- FirebaseCoreInternal (10.22.0):
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- FirebaseInstallations (10.21.0):
- FirebaseInstallations (10.22.0):
- FirebaseCore (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
- PromisesObjC (~> 2.1)
- FirebaseMessaging (10.20.0):
- FirebaseMessaging (10.22.0):
- FirebaseCore (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleDataTransport (~> 9.3)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/Reachability (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
- nanopb (< 2.30910.0, >= 2.30908.0)
- nanopb (< 2.30911.0, >= 2.30908.0)
- flutter_app_badger (1.3.0):
- FlutterMacOS
- flutter_image_compress_macos (1.0.0):
Expand All @@ -72,27 +72,35 @@ PODS:
- FMDB (2.7.9):
- FMDB/standard (= 2.7.9)
- FMDB/standard (2.7.9)
- GoogleDataTransport (9.3.0):
- GoogleDataTransport (9.4.0):
- GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/AppDelegateSwizzler (7.12.0):
- GoogleUtilities/AppDelegateSwizzler (7.13.0):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (7.12.0):
- GoogleUtilities/Privacy
- GoogleUtilities/Environment (7.13.0):
- GoogleUtilities/Privacy
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/Logger (7.12.0):
- GoogleUtilities/Logger (7.13.0):
- GoogleUtilities/Environment
- GoogleUtilities/Network (7.12.0):
- GoogleUtilities/Privacy
- GoogleUtilities/Network (7.13.0):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Privacy
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (7.12.0)"
- GoogleUtilities/Reachability (7.12.0):
- "GoogleUtilities/NSData+zlib (7.13.0)":
- GoogleUtilities/Privacy
- GoogleUtilities/Privacy (7.13.0)
- GoogleUtilities/Reachability (7.13.0):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (7.12.0):
- GoogleUtilities/Privacy
- GoogleUtilities/UserDefaults (7.13.0):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- GTMSessionFetcher/Core (3.3.1)
- just_audio (0.0.1):
- FlutterMacOS
Expand Down Expand Up @@ -215,24 +223,24 @@ SPEC CHECKSUMS:
desktop_webview_auth: 9bba53a29c9bc6a4ff621fd0ebfbb18856c4dada
device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f
emoji_picker_flutter: 533634326b1c5de9a181ba14b9758e6dfe967a20
Firebase: 10c8cb12fb7ad2ae0c09ffc86cd9c1ab392a0031
firebase_auth: fd1d51ad2b50cde2d9cd4499e26774f3dd27df39
firebase_core: 2e1a33fd13fb581f0dc809c18be25cdc1a2e10db
firebase_messaging: 0ea7ba8abbaa3228b36b1e64b5ad5268996b0d1a
FirebaseAppCheckInterop: 69fc7d8f6a1cbfa973efb8d1723651de30d12525
FirebaseAuth: 9c5c400d2c3055d8ae3a0284944c86fa95d48dac
FirebaseCore: 28045c1560a2600d284b9c45a904fe322dc890b6
FirebaseCoreInternal: 43c1788eaeee9d1b97caaa751af567ce11010d00
FirebaseInstallations: 390ea1d10a4d02b20c965cbfd527ee9b3b412acb
FirebaseMessaging: 06c414a21b122396a26847c523d5c370f8325df5
Firebase: 797fd7297b7e1be954432743a0b3f90038e45a71
firebase_auth: 7c693e2314a8b2cd8b925d8e8a4c15f8883863ce
firebase_core: 2dd24517c818d09543dffe1b74daa16fb3f55a81
firebase_messaging: 0ac4593cd5345f9a8166eb914cc45594e204c99b
FirebaseAppCheckInterop: 58db3e9494751399cf3e7b7e3e705cff71099153
FirebaseAuth: bbe4c68f958504ba9e54aee181adbdf5b664fbc6
FirebaseCore: 0326ec9b05fbed8f8716cddbf0e36894a13837f7
FirebaseCoreInternal: bca337352024b18424a61e478460547d46c4c753
FirebaseInstallations: 763814908793c0da14c18b3dcffdec71e29ed55e
FirebaseMessaging: 9f71037fd9db3376a4caa54e5a3949d1027b4b6e
flutter_app_badger: 55a64b179f8438e89d574320c77b306e327a1730
flutter_image_compress_macos: c26c3c13ea0f28ae6dea4e139b3292e7729f99f1
flutter_local_notifications: 3805ca215b2fb7f397d78b66db91f6a747af52e4
flutter_webrtc: cf7dc44d26cbb5c5f1ae5f583dab545871f287f9
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
FMDB: aa44149f6fb634b1ac54f64f47064bb0d0c5a032
GoogleDataTransport: 57c22343ab29bc686febbf7cbb13bad167c2d8fe
GoogleUtilities: 0759d1a57ebb953965c2dfe0ba4c82e95ccc2e34
GoogleDataTransport: bed3a36c04c8552479fbb9b76326e0fc69bddcb2
GoogleUtilities: d053d902a8edaa9904e1bd00c37535385b8ed152
GTMSessionFetcher: 8a1b34ad97ebe6f909fb8b9b77fba99943007556
just_audio: 9b67ca7b97c61cfc9784ea23cd8cc55eb226d489
nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5
Expand Down
2 changes: 1 addition & 1 deletion chat_sample/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: chat_sample
description: Chat Sample

version: 0.9.1
version: 0.10.0

environment:
sdk: '>=2.12.0 <3.0.0'
Expand Down
20 changes: 8 additions & 12 deletions conf_call_sample/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,10 +23,6 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

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

android {
compileSdkVersion 34

Expand Down Expand Up @@ -64,10 +62,8 @@ flutter {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlinVersion}"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}

apply plugin: 'com.google.gms.google-services'
14 changes: 0 additions & 14 deletions conf_call_sample/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
buildscript {
ext.kotlin_version = '1.9.20'
repositories {
google()
jcenter()
}

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

allprojects {
repositories {
google()
Expand Down
2 changes: 2 additions & 0 deletions conf_call_sample/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
kotlinVersion=1.9.20
agpVersion=7.3.1
Loading

0 comments on commit 5d5518f

Please sign in to comment.