gradle issue fix

master
mobileteam 2 months ago
parent 93a645691a
commit 1198f541b5

@ -3,19 +3,19 @@ package com.ejada.hmg
import io.flutter.app.FlutterApplication import io.flutter.app.FlutterApplication
import io.flutter.plugin.common.PluginRegistry import io.flutter.plugin.common.PluginRegistry
import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback
import io.flutter.plugins.GeneratedPluginRegistrant import io.flutter.plugins.GeneratedPluginRegistrant
import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService
class Application : FlutterApplication(), PluginRegistrantCallback { class Application : FlutterApplication() {
override fun onCreate() { override fun onCreate() {
super.onCreate() super.onCreate()
FlutterFirebaseMessagingService.setPluginRegistrant(this) FlutterFirebaseMessagingService.setPluginRegistrant(this)
} }
override fun registerWith(registry: PluginRegistry) { // override fun registerWith(registry: PluginRegistry) {
io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin.registerWith(registry?.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin")); // io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin.registerWith(registry?.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"));
} // }
} }
//import io.flutter.app.FlutterApplication //import io.flutter.app.FlutterApplication

@ -12,12 +12,12 @@ object FirebaseCloudMessagingPluginRegistrant {
FirebaseMessagingPlugin.registerWith(registry?.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin")) FirebaseMessagingPlugin.registerWith(registry?.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"))
} }
private fun alreadyRegisteredWith(registry: PluginRegistry?): Boolean { // private fun alreadyRegisteredWith(registry: PluginRegistry?): Boolean {
val key: String? = FirebaseCloudMessagingPluginRegistrant::class.java.canonicalName // val key: String? = FirebaseCloudMessagingPluginRegistrant::class.java.canonicalName
if (registry?.hasPlugin(key)!!) { // if (registry?.hasPlugin(key)!!) {
return true // return true
} // }
registry.registrarFor(key) // registry.registrarFor(key)
return false // return false
} // }
} }

@ -1,25 +1,14 @@
def localProperties = new Properties() plugins {
def localPropertiesFile = rootProject.file('local.properties') id "com.android.application"
if (localPropertiesFile.exists()) { id "kotlin-android"
localPropertiesFile.withReader('UTF-8') { reader -> id "com.google.gms.google-services"
localProperties.load(reader) id "dev.flutter.flutter-gradle-plugin"
} id "com.google.firebase.crashlytics"
id "com.huawei.agconnect"
// id("com.mapbox.gradle.application")
// id("com.mapbox.gradle.plugins.ndk")
} }
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'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
def keystoreProperties = new Properties() def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties') def keystorePropertiesFile = rootProject.file('key.properties')
@ -27,63 +16,35 @@ if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
} }
apply plugin: 'com.android.application'
apply plugin: 'com.huawei.agconnect'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services'
//apply plugin: 'com.google.firebase.crashlytics'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
configurations.all {
c ->
c.resolutionStrategy.eachDependency {
DependencyResolveDetails dependency ->
println dependency.requested.group
if (dependency.requested.group == 'org.bouncycastle') {
dependency.useTarget 'org.bouncycastle:bcprov-jdk15to18:1.68'
}
}
}
//configurations.all {
// resolutionStrategy {
// force 'androidx.core:core-ktx:1.6.0'
// }
//}
android { android {
compileSdkVersion 34 namespace 'com.ejada.hmg'
// ndkVersion "24.0.8215888" compileSdk 36
ndkVersion '28.2.13676358'
buildFeatures {
viewBinding true
dataBinding true
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'MissingTranslation'
checkReleaseBuilds false
}
defaultConfig { defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.ejada.hmg" applicationId "com.ejada.hmg"
// minSdk 24
minSdkVersion 26 minSdkVersion 26
targetSdkVersion 34 targetSdkVersion 36
versionCode flutterVersionCode.toInteger() compileSdkVersion 36
versionName flutterVersionName // targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
multiDexEnabled true multiDexEnabled true
} }
sourceSets.main { buildFeatures {
jniLibs.srcDir 'src/main/libs' viewBinding true
jni.srcDirs = [] //disable automatic ndk-build call dataBinding true
}
sourceSets {
main {
java.srcDirs += 'src/main/kotlin'
jniLibs.srcDir 'src/main/libs'
jni.srcDirs = [] // disables automatic ndk-build
}
} }
signingConfigs { signingConfigs {
@ -101,44 +62,42 @@ android {
signingConfig signingConfigs.debug signingConfig signingConfigs.debug
minifyEnabled false minifyEnabled false
shrinkResources false shrinkResources false
// ndk {
// abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
// }
} }
release { release {
debuggable false debuggable false
signingConfig signingConfigs.release signingConfig signingConfigs.release
minifyEnabled true minifyEnabled true
shrinkResources true shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
} }
staging { staging {
// Specifies a sorted list of fallback build types that the
// plugin should try to use when a dependency does not include a
// "staging" build type. You may specify as many fallbacks as you
// like, and the plugin selects the first build type that's
// available in the dependency.
matchingFallbacks = ['debug', 'qa', 'release'] matchingFallbacks = ['debug', 'qa', 'release']
} }
} }
packagingOptions { packagingOptions {
exclude 'META-INF/proguard/androidx-annotations.pro' jniLibs {
pickFirst 'lib/x86/libc++_shared.so' pickFirsts += ['lib/x86/libc++_shared.so', 'lib/x86_64/libc++_shared.so', 'lib/armeabi-v7a/libc++_shared.so', 'lib/arm64-v8a/libc++_shared.so', '**/*.so']
pickFirst 'lib/x86_64/libc++_shared.so' useLegacyPackaging true
pickFirst 'lib/armeabi-v7a/libc++_shared.so' }
pickFirst 'lib/arm64-v8a/libc++_shared.so' resources {
pickFirst '**/*.so' excludes += ['META-INF/proguard/androidx-annotations.pro']
}
} }
// Enable core library desugaring
compileOptions { compileOptions {
// coreLibraryDesugaringEnabled true sourceCompatibility JavaVersion.VERSION_21
sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_1_8 coreLibraryDesugaringEnabled true
} }
kotlinOptions {
jvmTarget = '1.8' // kotlinOptions {
// jvmTarget = '17'
// }
lint {
disable 'MissingTranslation'
checkReleaseBuilds false
} }
} }
@ -146,86 +105,103 @@ flutter {
source '../..' source '../..'
} }
configurations.all {
resolutionStrategy {
force 'androidx.core:core-ktx:1.16.0'
force 'androidx.core:core:1.16.0'
}
}
dependencies { dependencies {
// coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.1.20"
implementation "com.google.firebase:firebase-messaging:24.1.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.google.firebase:firebase-messaging:21.0.0"
// implementation ('com.google.firebase:firebase-inappmessaging-display:19.1.2',{
// exclude group: 'com.google.protobuf',module: 'protobuf-javalite'
// exclude group: 'com.google.protobuf',module: 'protobuf-lite'
// })
implementation 'pub.devrel:easypermissions:3.0.0' implementation 'pub.devrel:easypermissions:3.0.0'
// implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0' implementation 'com.google.guava:guava:33.4.0-android'
// implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0' implementation fileTree(dir: 'libs', include: ['*.jar'], exclude: ['bcprov-jdk16-1.46.jar'])
implementation 'com.google.guava:guava:27.0.1-android'
// Dependency on local binaries
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.code.gson:gson:2.8.6'
// Dependency on a remote binary
// implementation 'com.example.android:app-magic:12.3'
implementation "us.zoom.videosdk:zoomvideosdk-core:1.10.1"
implementation "us.zoom.videosdk:zoomvideosdk-annotation:1.10.1"
implementation "us.zoom.videosdk:zoomvideosdk-videoeffects:1.10.1"
// Native Dependency implementation 'com.google.code.gson:gson:2.12.0'
// implementation "us.zoom.videosdk:ZoomVideoSDK:1.10.11" // Zoom SDKs
// implementation group: 'us.zoom.videosdk', name: 'zoomvideosdk-core', version: '1.10.11' implementation "us.zoom.videosdk:zoomvideosdk-core:1.12.10"
implementation "us.zoom.videosdk:zoomvideosdk-annotation:1.12.10"
implementation "us.zoom.videosdk:zoomvideosdk-videoeffects:1.12.10"
// implementation "us.zoom.videosdk:zoomvideosdk-core:1.10.1" // Networking
// implementation "us.zoom.videosdk:zoomvideosdk-annotation:1.10.1" implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.11'
// implementation "us.zoom.videosdk:zoomvideosdk-videoeffects:1.10.1" implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.11'
implementation 'com.squareup.retrofit2:retrofit:2.11.0'
implementation 'com.squareup.retrofit2:converter-gson:2.11.0'
implementation 'com.squareup.retrofit2:adapter-java8:2.11.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.3' // Google Services
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.retrofit2:adapter-java8:2.4.0'
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'com.google.android.gms:play-services-location:21.3.0' implementation 'com.google.android.gms:play-services-location:21.3.0'
implementation 'com.squareup.okhttp3:okhttp:4.10.0' implementation 'com.google.android.gms:play-services-basement:18.7.0'
implementation 'androidx.test.ext:junit:1.1.5'
implementation 'com.android.volley:volley:1.2.1' implementation 'com.android.volley:volley:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.2.0' implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.8.5' implementation 'androidx.navigation:navigation-fragment-ktx:2.9.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.8.5' implementation 'androidx.navigation:navigation-ui-ktx:2.9.0'
implementation 'androidx.activity:activity:1.9.3' implementation 'androidx.activity:activity-ktx:1.10.1'
def room_version = "2.4.0-alpha04"
def room_version = "2.6.1"
implementation "androidx.room:room-runtime:$room_version" implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version" annotationProcessor "androidx.room:room-compiler:$room_version"
implementation 'net.zetetic:android-database-sqlcipher:4.5.2'
implementation 'net.zetetic:android-database-sqlcipher:4.5.4'
implementation 'com.intuit.ssp:ssp-android:1.1.0' implementation 'com.intuit.ssp:ssp-android:1.1.0'
implementation 'com.intuit.sdp:sdp-android:1.1.0' implementation 'com.intuit.sdp:sdp-android:1.1.0'
implementation 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
// implementation "com.mapbox.maps:android:10.16.6" implementation 'com.github.bumptech.glide:glide:4.16.0'
implementation 'com.mapbox.maps:android:11.3.1' annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0'
implementation 'com.mapbox.maps:android:11.5.0'
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:7.3.1'
// implementation 'com.mapbox.maps:android:11.4.0'
// AARs
implementation files('libs/PenNavUI.aar') implementation files('libs/PenNavUI.aar')
implementation files('libs/Penguin.aar') implementation files('libs/Penguin.aar')
implementation files('libs/PenguinRenderer.aar') implementation files('libs/PenguinRenderer.aar')
// implementation "org.jetbrains.anko:anko-commons:0.10.4" implementation 'com.github.kittinunf.fuel:fuel:2.3.1'
implementation 'com.github.kittinunf.fuel:fuel:2.3.0' //for JVM implementation 'com.github.kittinunf.fuel:fuel-android:2.3.1'
implementation 'com.github.kittinunf.fuel:fuel-android:2.3.0'
implementation 'com.google.android.gms:play-services-location:17.1.0'//for Android implementation "com.opentok.android:opentok-android-sdk:2.25.2"
implementation 'com.google.android.gms:play-services-basement:17.5.0'
implementation "com.opentok.android:opentok-android-sdk:2.21.4" implementation 'com.facebook.stetho:stetho:1.6.0'
implementation 'com.facebook.stetho:stetho:1.5.1' implementation 'com.facebook.stetho:stetho-urlconnection:1.6.0'
implementation 'com.facebook.stetho:stetho-urlconnection:1.5.1'
implementation 'androidx.core:core-ktx:1.6.0' implementation 'androidx.core:core-ktx:1.16.0'
implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'androidx.appcompat:appcompat:1.7.1'
implementation 'com.google.android.material:material:1.9.0' implementation 'com.google.android.material:material:1.12.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.22'
androidTestImplementation "androidx.test:core:1.4.0"
// implementation 'com.airbnb.android:lottie:5.2.0'
// implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.22'
implementation 'com.whatsapp.otp:whatsapp-otp-android-sdk:0.1.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.25'
androidTestImplementation "androidx.test:core:1.6.1"
implementation 'com.whatsapp.otp:whatsapp-otp-android-sdk:0.1.0' implementation 'com.whatsapp.otp:whatsapp-otp-android-sdk:0.1.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
// implementation project(':vitalSignEngine')
}
tasks.whenTaskAdded { task ->
if (task.name.contains("merge") && task.name.contains("NativeLibs")) {
task.doLast {
// Note: project.buildDir is deprecated in newer Gradle;
// layout.buildDirectory.asFile.get() is the modern alternative
def outputDir = new File(project.buildDir, "intermediates/merged_native_libs/release/out/lib")
// Handle both architectures
def abis = ["arm64-v8a", "armeabi-v7a"]
abis.each { abi ->
def targetFile = new File(outputDir, "$abi/libc++_shared.so")
def sourceFile = file("src/main/jniLibs/$abi/libc++_shared.so")
if (sourceFile.exists() && targetFile.exists()) {
println("FORCING: Overwriting $abi version with known-good 1.2MB library")
ant.copy(file: sourceFile, tofile: targetFile, overwrite: true)
}
}
}
}
} }

@ -4,10 +4,10 @@ package com.ejada.hmg
import com.facebook.stetho.Stetho import com.facebook.stetho.Stetho
import io.flutter.app.FlutterApplication import io.flutter.app.FlutterApplication
import io.flutter.plugin.common.PluginRegistry import io.flutter.plugin.common.PluginRegistry
import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback //import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback
//import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService //import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService
class Application : FlutterApplication(), PluginRegistrantCallback { class Application : FlutterApplication() {
override fun onCreate() { override fun onCreate() {
super.onCreate() super.onCreate()
// FlutterFirebaseMessagingService.setPluginRegistrant(this) // FlutterFirebaseMessagingService.setPluginRegistrant(this)
@ -37,9 +37,9 @@ class Application : FlutterApplication(), PluginRegistrantCallback {
Stetho.initialize(initializer) Stetho.initialize(initializer)
} }
override fun registerWith(registry: PluginRegistry) { // override fun registerWith(registry: PluginRegistry) {
// io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin.registerWith(registry?.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin")); // // io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin.registerWith(registry?.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"));
} // }
} }
//import io.flutter.app.FlutterApplication //import io.flutter.app.FlutterApplication

@ -6,20 +6,20 @@ import io.flutter.plugin.common.PluginRegistry
object FirebaseCloudMessagingPluginRegistrant { object FirebaseCloudMessagingPluginRegistrant {
fun registerWith(registry: PluginRegistry?) { fun registerWith(registry: PluginRegistry?) {
if (alreadyRegisteredWith(registry)) { // if (alreadyRegisteredWith(registry)) {
return // return
} // }
// FirebaseMessagingPlugin.registerWith(registry?.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin")) // FirebaseMessagingPlugin.registerWith(registry?.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"))
} }
private fun alreadyRegisteredWith(registry: PluginRegistry?): Boolean { // private fun alreadyRegisteredWith(registry: PluginRegistry?): Boolean {
val key: String? = FirebaseCloudMessagingPluginRegistrant::class.java.canonicalName // val key: String? = FirebaseCloudMessagingPluginRegistrant::class.java.canonicalName
if (key?.let { registry?.hasPlugin(it) }!!) { // if (key?.let { registry?.hasPlugin(it) }!!) {
return true // return true
} // }
if (registry != null) { // if (registry != null) {
registry.registrarFor(key) // registry.registrarFor(key)
} // }
return false // return false
} // }
} }

@ -48,7 +48,7 @@ class HMG_Internet(flutterMainActivity: MainActivity) {
"https://captive.apple.com".httpGet().response { request, response, result -> "https://captive.apple.com".httpGet().response { request, response, result ->
result.fold(success = { result.fold(success = {
val html = String(it).toLowerCase(Locale.ENGLISH) val html = String(it).lowercase()
.replace(" ", "", true) .replace(" ", "", true)
.replace("\n","",true) .replace("\n","",true)
val have = html.contains("<title>success</title>", true) val have = html.contains("<title>success</title>", true)

@ -1,61 +1,32 @@
buildscript { buildscript {
ext.kotlin_version = '1.8.0'
// if (System.properties['os.arch'] == "aarch64") {
// // For M1 Users we need to use the NDK 24 which added support for aarch64
// ndkVersion = "24.0.8215888"
// } else {
// // Otherwise we default to the side-by-side NDK version from AGP.
// ndkVersion = "21.4.7075529"
// }
repositories { repositories {
google()
jcenter()
mavenCentral() mavenCentral()
maven { url 'https://developer.huawei.com/repo/' } google()
maven { url "https://developer.huawei.com/repo/" }
maven { maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven' url = uri("https://api.mapbox.com/downloads/v2/releases/maven")
credentials { credentials {
username = 'mapbox' username = "mapbox"
password = "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg" password = "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg"
// password = "pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ"
if (password == null || password == "") { if (password == null || password == "") {
throw new GradleException("MAPBOX_DOWNLOADS_TOKEN isn't set. Set it to the project properties or to the enviroment variables.") throw new GradleException("MAPBOX_DOWNLOADS_TOKEN isn't set. Set it to the project properties or to the environment variables.")
} }
} }
authentication { authentication {
basic(BasicAuthentication) basic(BasicAuthentication)
} }
} }
// maven {
// url "https://dl.bintray.com/kotlin/kotlin-eap/"
// }
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.1.3' classpath 'com.android.tools.build:gradle:8.1.0'
// classpath 'com.android.tools.build:gradle:8.2.1' classpath 'com.huawei.agconnect:agcp:1.9.1.304'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.8'
// classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
classpath 'com.huawei.agconnect:agcp:1.5.2.300'
classpath("com.android.tools:r8:8.2.42")
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.12'
classpath "com.mapbox.gradle.plugins:access-token:0.4.0"
} }
} }
allprojects { allprojects {
repositories { repositories {
google() google()
// jcenter()
mavenCentral() mavenCentral()
flatDir {
dirs 'libs'
}
maven { maven {
url 'https://developer.huawei.com/repo/' url 'https://developer.huawei.com/repo/'
} }
@ -69,7 +40,7 @@ allprojects {
username = 'mapbox' username = 'mapbox'
password = "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg" password = "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg"
if (password == null || password == "") { if (password == null || password == "") {
throw new GradleException("MAPBOX_DOWNLOADS_TOKEN isn't set. Set it to the project properties or to the enviroment variables.") throw new GradleException("MAPBOX_DOWNLOADS_TOKEN isn't set. Set it to the project properties or to the environment variables.")
} }
} }
authentication { authentication {
@ -77,8 +48,58 @@ allprojects {
} }
} }
} }
// Exclude old BouncyCastle globally to avoid duplicate classes
configurations.all {
exclude group: 'org.bouncycastle', module: 'bcprov-jdk16'
}
tasks.withType(JavaCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = "21"
}
}
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android {
if (namespace == null) {
namespace project.group
}
buildFeatures {
if (buildConfig == null) {
buildConfig true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}
}
}
// Force Java 17 for all JavaCompile tasks in all subprojects (including plugins)
project.tasks.withType(JavaCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
// Force Kotlin JVM target for all subprojects
project.tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = "21"
}
}
}
}
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
@ -88,11 +109,5 @@ subprojects {
} }
tasks.register("clean", Delete) { tasks.register("clean", Delete) {
delete rootProject.buildDir delete rootProject.layout.buildDirectory
}
configurations.all {
resolutionStrategy {
force 'androidx.core:core-ktx:1.6.0'
}
} }

@ -1,6 +1,6 @@
#Mon May 18 15:37:56 AST 2026 #Wed Jul 02 15:26:33 AST 2025
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

@ -1,29 +1,203 @@
//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
// }()
//
// includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
//
// repositories {
// google()
// mavenCentral()
// gradlePluginPortal()
// }
//
// plugins {
// id "dev.flutter.flutter-plugin-loader" version "1.0.0"
// id "com.android.application" version "8.1.0" apply false
// id "org.jetbrains.kotlin.android" version "2.1.10" apply false
// id "com.google.gms.google-services" version "4.4.2" apply false
// id "com.google.firebase.crashlytics" version "3.0.3" apply false
//
// }
//}
//
//
//dependencyResolutionManagement {
// repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
//
// repositories {
// google()
// mavenCentral()
// flatDir {
// dirs 'libs'
// }
// maven {
// url 'https://developer.huawei.com/repo/'
// }
// maven {
// url "https://artifactory.ess-dev.com/artifactory/gradle-dev-local"
// }
// maven {
// url 'https://api.mapbox.com/downloads/v2/releases/maven'
//
// credentials {
// username = 'mapbox'
// password = "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg"
// if (password == null || password == "") {
// throw new GradleException("MAPBOX_DOWNLOADS_TOKEN isn't set. Set it to the project properties or to the environment variables.")
// }
// }
// authentication {
// basic(BasicAuthentication)
// }
// }
// }
//}
//
//
//// Load local properties
//def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
//def properties = new Properties()
//assert localPropertiesFile.exists()
//localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
//
//// Get Flutter SDK path
//def flutterSdkPath = properties.getProperty('flutter.sdk')
//assert flutterSdkPath != null : "flutter.sdk not set in local.properties"
//
//// Get vital-sign-engine path
//def vitalSignEnginePath = properties.getProperty('vital.sign.engine.path')
//assert vitalSignEnginePath != null : "vital.sign.engine.path not set in local.properties"
//
//// Include modules
//include ':app'
////project(':vital-sign-engine').projectDir = file(vitalSignEnginePath)
//// ':vital-sign-engine'
//include ':app'
//
//def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
//
//def plugins = new Properties()
//def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
//if (pluginsFile.exists()) {
// pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
//}
//
//plugins.each { name, path ->
// def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
// include ":$name"
// project(":$name").projectDir = pluginDirectory
//}
//// Load local properties
//def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
//def properties = new Properties()
//assert localPropertiesFile.exists()
//localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
//
//// Get Flutter SDK path
//def flutterSdkPath = properties.getProperty('flutter.sdk')
//assert flutterSdkPath != null : "flutter.sdk not set in local.properties"
//
//// Get vital-sign-engine path
//def vitalSignEnginePath = properties.getProperty('vital.sign.engine.path')
//assert vitalSignEnginePath != null : "vital.sign.engine.path not set in local.properties"
//
pluginManagement { pluginManagement {
def flutterSdkPath = { def flutterSdkPath = {
def properties = new java.util.Properties() def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) } file("local.properties").withInputStream { properties.load(it) }
def sdk = properties.getProperty("flutter.sdk") def flutterSdkPath = properties.getProperty("flutter.sdk")
assert sdk != null : "flutter.sdk not set in local.properties" assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return sdk return flutterSdkPath
}() }()
includeBuild("${flutterSdkPath}/packages/flutter_tools/gradle")
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
// Get vital-sign-engine path
// def vitalSignEngine = {
// def properties = new Properties()
// file("local.properties").withInputStream { properties.load(it) }
// def vitalSignEnginePath = properties.getProperty("vital.sign.engine.path")
// assert vitalSignEnginePath != null, "vital.sign.engine.path not set in local.properties"
// return vitalSignEnginePath
// }()
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
maven { url 'https://developer.huawei.com/repo/' }
gradlePluginPortal() gradlePluginPortal()
maven { url = uri("https://developer.huawei.com/repo/") } }
resolutionStrategy {
eachPlugin {
if (requested.id.id == "com.huawei.agconnect") {
useModule("com.huawei.agconnect:agcp:1.9.1.304")
}
}
}
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
flatDir {
dirs 'libs'
}
maven {
url 'https://developer.huawei.com/repo/'
}
maven {
url "https://artifactory.ess-dev.com/artifactory/gradle-dev-local"
}
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
credentials {
username = 'mapbox'
password = "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg"
if (password == null || password == "") {
throw new GradleException("MAPBOX_DOWNLOADS_TOKEN isn't set. Set it to the project properties or to the environment variables.")
}
}
authentication {
basic(BasicAuthentication)
}
}
}
} }
} }
plugins { plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.9.1" apply false id "com.android.application" version '8.11.0' apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false id("org.jetbrains.kotlin.android") version "2.2.0" apply false
id "com.google.gms.google-services" version "4.4.2" apply false id("com.google.gms.google-services") version "4.4.3" apply false
id("com.google.firebase.crashlytics") version "3.0.4" apply false
id('org.gradle.toolchains.foojay-resolver-convention') version '0.9.0' apply false
id "com.huawei.agconnect" version "1.9.1.304" apply false
} }
include ':app' include ":app"
include ':vital-sign-engine'
project(':vital-sign-engine').projectDir = new java.io.File('/Users/mohamedmekawy/Documents/Work/DiplomaticQuarter_3.16/packages/vital_sign_camera/android/libs') //// Add the following to include vitalSignEngine as a module
//def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
//def properties = new Properties()
//assert localPropertiesFile.exists()
//localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
//def vitalSignEnginePath = properties.getProperty('vital.sign.engine.path')
//assert vitalSignEnginePath != null : "vital.sign.engine.path not set in local.properties"
//
//include ':vitalSignEngine'
//project(':vitalSignEngine').projectDir = file(vitalSignEnginePath)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

@ -21,8 +21,8 @@ var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:2018/'; // var BASE_URL = 'http://10.50.100.198:2018/';
// var BASE_URL = 'https://uat.hmgwebservices.com/'; var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.201.204.103/'; // var BASE_URL = 'http://10.201.204.103/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
@ -354,7 +354,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal
var CHANNEL = 3; var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958'; var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20'; var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 18.7; var VERSION_ID = 20.4;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0; // var PATIENT_OUT_SA = 0;

@ -8,6 +8,8 @@ import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../../theme/colors.dart';
class SliderView extends StatefulWidget { class SliderView extends StatefulWidget {
VoidCallback onLoginClick; VoidCallback onLoginClick;
@ -48,7 +50,7 @@ class _SliderViewState extends State<SliderView> {
children: [ children: [
mFlex(3), mFlex(3),
Container( Container(
decoration: projectViewModel.isArabic ? containerColorRadiusLeft(Color(0xFFFBF2E31), 100) : containerColorRadiusRight(Color(0xFFFBF2E31), 100), decoration: projectViewModel.isArabic ? containerColorRadiusLeft(CustomColors.accentColor, 100) : containerColorRadiusRight(CustomColors.accentColor, 100),
padding: EdgeInsets.only(left: projectViewModel.isArabic ? 16 : 20, right: projectViewModel.isArabic ? 20 : 16, top: 6, bottom: 6), padding: EdgeInsets.only(left: projectViewModel.isArabic ? 16 : 20, right: projectViewModel.isArabic ? 20 : 16, top: 6, bottom: 6),
child: Text( child: Text(
TranslationBase.of(context).medicalFile, TranslationBase.of(context).medicalFile,

@ -7,17 +7,22 @@ import 'package:permission_handler/permission_handler.dart';
import 'package:geolocator/geolocator.dart' as geo; import 'package:geolocator/geolocator.dart' as geo;
class PermissionService extends BaseService { class PermissionService extends BaseService {
final LocalStorage storage = localStorage; PermissionService(){
initLocalStorage();
storage = localStorage;
}
LocalStorage? storage;
geo.LocationPermission? locationPermission; geo.LocationPermission? locationPermission;
AppGlobal appGlobal = new AppGlobal(); AppGlobal appGlobal = new AppGlobal();
setVibrationPermission(flag) async { setVibrationPermission(flag) async {
storage.setItem('isVibration', flag);
storage?.setItem('isVibration', flag);
} }
isVibrationEnabled() { isVibrationEnabled() {
return (storage.getItem('isVibration') == null) || return (storage?.getItem('isVibration') == null) ||
(storage.getItem('isVibration')) == false (storage?.getItem('isVibration')) == false
? false ? false
: true; : true;
} }
@ -35,11 +40,11 @@ class PermissionService extends BaseService {
} }
setTheme(flag) async { setTheme(flag) async {
storage.setItem('isTheme', flag); storage?.setItem('isTheme', flag);
} }
isThemeEnabled() { isThemeEnabled() {
return storage.getItem('isTheme'); return storage?.getItem('isTheme');
} }
cameraPermission() async { cameraPermission() async {

@ -107,7 +107,7 @@ class _SplashScreenState extends State<SplashScreen> {
Padding( Padding(
padding: EdgeInsets.symmetric(horizontal: 53), padding: EdgeInsets.symmetric(horizontal: 53),
child: Image.asset( child: Image.asset(
'assets/images/new/hmg_logo.png', 'assets/images/new/rsg_logo.png',
fit: BoxFit.fitWidth, fit: BoxFit.fitWidth,
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
), ),

@ -1,4 +1,5 @@
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:gif_view/gif_view.dart'; import 'package:gif_view/gif_view.dart';
class GifLoaderContainer extends StatefulWidget { class GifLoaderContainer extends StatefulWidget {
@ -42,10 +43,12 @@ class _GifLoaderContainerState extends State<GifLoaderContainer> with TickerProv
//progress-loading.gif //progress-loading.gif
child: Container( child: Container(
// margin: EdgeInsets.only(bottom: 40), // margin: EdgeInsets.only(bottom: 40),
child: GifView( // child: GifView(
controller: controller, // controller: controller,
image: AssetImage("assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), // image: AssetImage("assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"),
), // )
// ,
child: CircularProgressIndicator(color: Color(0xFF14384B)),
), ),
), ),
); );

@ -17,7 +17,7 @@ dependencies:
flutter_localizations: flutter_localizations:
sdk: flutter sdk: flutter
webview_flutter: 4.8.0 webview_flutter: ^4.8.0
app_links: ^6.4.0 app_links: ^6.4.0
http: ^1.4.0 http: ^1.4.0
connectivity_plus: 6.1.0 connectivity_plus: 6.1.0
@ -40,7 +40,7 @@ dependencies:
maps_launcher: ^3.0.0+1 maps_launcher: ^3.0.0+1
url_launcher: ^6.3.1 url_launcher: ^6.3.1
url_launcher_ios: ^6.3.2 url_launcher_ios: ^6.3.2
shared_preferences: ^2.5.5 shared_preferences: ^2.5.3
# fluttertoast: ^8.0.8 # fluttertoast: ^8.0.8
fluttertoast: ^8.2.12 fluttertoast: ^8.2.12
@ -55,7 +55,7 @@ dependencies:
gif_view: ^1.0.3 gif_view: ^1.0.3
expandable: ^5.0.1 expandable: ^5.0.1
flutter_charts: ^0.5.2 flutter_charts: ^0.5.2
google_maps_flutter: ^2.17.0 google_maps_flutter: ^2.12.3
# huawei_map: ^6.11.2+304 # huawei_map: ^6.11.2+304
huawei_map: huawei_map:
git: git:
@ -72,7 +72,7 @@ dependencies:
# Qr code Scanner # Qr code Scanner
location: ^8.0.1 location: ^8.0.1
barcode_scan2: ^4.7.1 barcode_scan2: ^4.5.1
flutter_rating_bar: ^4.0.1 flutter_rating_bar: ^4.0.1
syncfusion_flutter_calendar: ^29.2.11+1 syncfusion_flutter_calendar: ^29.2.11+1
# timezone: 0.10.1 # timezone: 0.10.1
@ -87,7 +87,7 @@ dependencies:
hijri: ^3.0.0 hijri: ^3.0.0
flutter_datetime_picker_plus: ^2.1.0 flutter_datetime_picker_plus: ^2.1.0
carousel_pro_nullsafety: ^2.0.0 carousel_pro_nullsafety: ^2.0.0
flutter_local_notifications: 21.0.0 flutter_local_notifications: any
device_calendar: ^4.3.3 device_calendar: ^4.3.3
geolocator: ^14.0.2 geolocator: ^14.0.2
geolocator_android: ^5.0.2 geolocator_android: ^5.0.2
@ -95,7 +95,7 @@ dependencies:
jiffy: ^6.2.1 jiffy: ^6.2.1
#Flutter WebRTC #Flutter WebRTC
# screen_brightness: ^2.1.5 screen_brightness: ^2.1.5
map_launcher: ^3.0.1 map_launcher: ^3.0.1
flutter_countdown_timer: ^4.1.0 flutter_countdown_timer: ^4.1.0
carousel_slider: ^5.0.0 carousel_slider: ^5.0.0
@ -105,7 +105,7 @@ dependencies:
wakelock_plus: ^1.3.2 wakelock_plus: ^1.3.2
after_layout: ^1.1.0 after_layout: ^1.1.0
cached_network_image: ^3.4.1 cached_network_image: ^3.4.1
flutter_tts: ^4.2.5 flutter_tts: ^4.2.3
flutter_nfc_kit: ^3.6.0 flutter_nfc_kit: ^3.6.0
#geofencing: any #geofencing: any

Loading…
Cancel
Save