Skip to content

Commit 142af4a

Browse files
committed
1.1.0-chat-flutter
1 parent 40de597 commit 142af4a

35 files changed

+208
-161
lines changed

chat_sample/android/app/build.gradle

Lines changed: 26 additions & 28 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,40 +12,21 @@ 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-
14-
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15-
if (flutterVersionCode == null) {
16-
flutterVersionCode = '1'
17-
}
18-
19-
def flutterVersionName = localProperties.getProperty('flutter.versionName')
20-
if (flutterVersionName == null) {
21-
flutterVersionName = '1.0'
22-
}
23-
24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
15+
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') ?: '1'
16+
def flutterVersionName = localProperties.getProperty('flutter.versionName') ?: '1.0'
2717

2818
android {
29-
compileSdkVersion 33
19+
namespace 'com.quickblox.chat'
20+
compileSdk 34
3021

3122
sourceSets {
3223
main.java.srcDirs += 'src/main/kotlin'
3324
}
3425

35-
lintOptions {
36-
disable 'InvalidPackage'
37-
}
38-
3926
defaultConfig {
4027
applicationId "com.quickblox.flutter.chat"
41-
minSdkVersion 21
42-
targetSdkVersion 33
28+
minSdk 26
29+
targetSdk 34
4330
versionCode flutterVersionCode.toInteger()
4431
versionName flutterVersionName
4532
}
@@ -73,12 +60,23 @@ android {
7360
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
7461
}
7562
}
63+
64+
compileOptions {
65+
sourceCompatibility = JavaVersion.VERSION_17
66+
targetCompatibility = JavaVersion.VERSION_17
67+
}
68+
69+
kotlinOptions {
70+
jvmTarget = '17'
71+
}
72+
73+
lint {
74+
disable 'InvalidPackage'
75+
}
7676
}
7777

7878
flutter {
7979
source '../..'
8080
}
8181

82-
dependencies {
83-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
84-
}
82+
dependencies {}
Lines changed: 31 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,53 @@
11
# Add project specific ProGuard rules here.
2-
# You can control the set of applied configuration files using the
3-
# proguardFiles setting in build.gradle.
2+
# By default, the flags in this file are appended to flags specified
3+
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
46
#
57
# For more details, see
6-
# http://developer.android.com/guide/developing/tools/proguard.html
8+
# http://developer.android.com/guide/developing/tools/proguard.html
79

810
# If your project uses WebView with JS, uncomment the following
911
# and specify the fully qualified class name to the JavaScript interface
1012
# class:
1113
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
1214
# public *;
1315
#}
16+
#-dontusemixedcaseclassnames
17+
#-dontskipnonpubliclibraryclasses
18+
#-verbose
19+
#
1420

15-
# Uncomment this to preserve the line number information for
16-
# debugging stack traces.
17-
#-keepattributes SourceFile,LineNumberTable
18-
19-
# If you keep the line number information, uncomment this to
20-
# hide the original source file name.
21-
#-renamesourcefileattribute SourceFile
21+
##---------------Begin: proguard configuration for Gson ----------
22+
# Gson uses generic type information stored in a class file when working with fields. Proguard
23+
# removes such information by default, so configure it to keep all of it.
24+
-keepattributes EnclosingMethod
25+
-keepattributes InnerClasses
2226
-keepattributes Signature
27+
-keepattributes Exceptions
2328

2429
# For using GSON @Expose annotation
2530
-keepattributes *Annotation*
2631

27-
# Gson specific classes
28-
-keep class sun.misc.Unsafe { *; }
29-
#-keep class com.google.gson.stream.** { *; }
30-
31-
# Application classes that will be serialized/deserialized over Gson
32-
-keep class com.quickblox.core.account.model.** { *; }
33-
34-
-keep class com.quickblox.auth.parsers.** { *; }
35-
-keep class com.quickblox.auth.model.** { *; }
36-
-keep class com.quickblox.core.parser.** { *; }
37-
-keep class com.quickblox.core.model.** { *; }
38-
-keep class com.quickblox.core.server.** { *; }
39-
-keep class com.quickblox.core.rest.** { *; }
40-
-keep class com.quickblox.core.error.** { *; }
41-
-keep class com.quickblox.core.Query { *; }
42-
43-
-keep class com.quickblox.content.model.** { *; }
32+
#quickblox sdk
33+
-keep class com.quickblox.** { *; }
4434

45-
-keep class com.quickblox.users.parsers.** { *; }
46-
-keep class com.quickblox.users.model.** { *; }
47-
48-
-keep class com.quickblox.messages.parsers.** { *; }
49-
-keep class com.quickblox.messages.QBPushNotifications { *; }
50-
-keep class com.quickblox.messages.model.** { *; }
51-
-keep class com.quickblox.messages.services.** { *; }
35+
#smack xmpp library
36+
-keep class org.jxmpp.** { *; }
37+
-keep class org.jivesoftware.** { *; }
38+
-dontwarn org.jivesoftware.**
5239

53-
-keep class com.quickblox.chat.parser.** { *; }
54-
-keep class com.quickblox.chat.model.** { *; }
40+
-keep class org.xmlpull.** { *; }
41+
-dontwarn org.xmlpull.v1.**
5542

56-
-keep class org.jivesoftware.** { *; }
57-
-keep class org.jxmpp.** { *; }
43+
#webrtc
5844
-keep class org.webrtc.** { *; }
59-
-keep class com.quickblox.conference.** { *; }
6045

61-
-keep class com.bumptech.** { *; }
46+
#google gms
47+
-keep class com.google.android.gms.** { *; }
48+
49+
#json
50+
-keep class org.json.** { *; }
6251

63-
-dontwarn org.jivesoftware.smackx.**
52+
#flutter file picker library
53+
-keep class androidx.lifecycle.DefaultLifecycleObserver

chat_sample/android/app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.quickblox.chat">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32
<!-- Flutter needs it to communicate with the running application
43
to allow setting breakpoints, to provide hot reload, etc.
54
-->

chat_sample/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.quickblox.chat">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
43
calls FlutterMain.startInitialization(this); in its onCreate method.
54
In most cases you can leave this as-is, but you if you want to provide

chat_sample/android/app/src/profile/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.quickblox.chat">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32
<!-- Flutter needs it to communicate with the running application
43
to allow setting breakpoints, to provide hot reload, etc.
54
-->

chat_sample/android/build.gradle

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,7 @@
1-
buildscript {
2-
ext.kotlin_version = '1.5.31'
3-
repositories {
4-
google()
5-
jcenter()
6-
}
7-
8-
dependencies {
9-
classpath 'com.android.tools.build:gradle:4.2.2'
10-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11-
}
12-
}
13-
141
allprojects {
152
repositories {
163
google()
17-
jcenter()
4+
mavenCentral()
185
}
196
}
207

@@ -26,6 +13,6 @@ subprojects {
2613
project.evaluationDependsOn(':app')
2714
}
2815

29-
task clean(type: Delete) {
16+
tasks.register("clean", Delete) {
3017
delete rootProject.buildDir
3118
}

chat_sample/android/gradle.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
org.gradle.jvmargs=-Xmx1536M
22
android.useAndroidX=true
33
android.enableJetifier=true
4-
android.enableR8=true
4+
android.defaults.buildfeatures.buildconfig=true
5+
android.nonTransitiveRClass=false
6+
android.nonFinalResIds=false
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Jun 23 08:50:38 CEST 2017
1+
#Mon Oct 21 18:41:33 EEST 2024
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip

chat_sample/android/settings.gradle

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +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 localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4-
def properties = new Properties()
10+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
511

6-
assert localPropertiesFile.exists()
7-
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
12+
repositories {
13+
google()
14+
mavenCentral()
15+
gradlePluginPortal()
16+
}
17+
}
818

9-
def flutterSdkPath = properties.getProperty("flutter.sdk")
10-
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11-
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
19+
plugins {
20+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21+
id "com.android.application" version "8.2.2" apply false
22+
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
23+
}
24+
25+
include ":app"

chat_sample/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>11.0</string>
24+
<string>12.0</string>
2525
</dict>
2626
</plist>

0 commit comments

Comments
 (0)