diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 7ca3cd69..00000000 Binary files a/.DS_Store and /dev/null differ diff --git a/flutter-hms-account/android/build.gradle b/flutter-hms-account/android/build.gradle index fb162693..8dd81973 100644 --- a/flutter-hms-account/android/build.gradle +++ b/flutter-hms-account/android/build.gradle @@ -26,6 +26,11 @@ apply plugin: 'com.android.library' android { compileSdkVersion 33 buildToolsVersion "31.0.0" + + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.account' + } + defaultConfig { minSdkVersion 19 targetSdkVersion 33 diff --git a/flutter-hms-ads/android/build.gradle b/flutter-hms-ads/android/build.gradle index e1efbfef..77f2602b 100644 --- a/flutter-hms-ads/android/build.gradle +++ b/flutter-hms-ads/android/build.gradle @@ -26,6 +26,11 @@ apply plugin: 'com.android.library' android { compileSdkVersion 33 buildToolsVersion "31.0.0" + + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.ads' + } + defaultConfig { minSdkVersion 19 targetSdkVersion 33 @@ -48,4 +53,4 @@ dependencies { implementation 'com.huawei.hms:ads-installreferrer:3.4.62.300' implementation 'com.huawei.hms:stats:6.12.0.300' implementation 'com.huawei.agconnect:agconnect-core:1.9.1.301' -} \ No newline at end of file +} diff --git a/flutter-hms-adsprime/android/build.gradle b/flutter-hms-adsprime/android/build.gradle index 3d7051d5..a45af5f9 100644 --- a/flutter-hms-adsprime/android/build.gradle +++ b/flutter-hms-adsprime/android/build.gradle @@ -26,6 +26,11 @@ apply plugin: 'com.android.library' android { compileSdkVersion 33 buildToolsVersion "31.0.0" + + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.ads' + } + defaultConfig { minSdkVersion 19 targetSdkVersion 33 diff --git a/flutter-hms-analytics/android/build.gradle b/flutter-hms-analytics/android/build.gradle index 39c9e610..a63aeb53 100644 --- a/flutter-hms-analytics/android/build.gradle +++ b/flutter-hms-analytics/android/build.gradle @@ -9,7 +9,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.6.0' + classpath 'com.android.tools.build:gradle:8.1.4' } } @@ -25,8 +25,9 @@ apply plugin: 'com.android.library' android { compileSdkVersion 33 - buildToolsVersion "31.0.0" - + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.analytics' + } defaultConfig { minSdkVersion 19 targetSdkVersion 33 @@ -35,8 +36,8 @@ android { disable 'InvalidPackage' } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } } diff --git a/flutter-hms-analytics/android/gradle/wrapper/gradle-wrapper.properties b/flutter-hms-analytics/android/gradle/wrapper/gradle-wrapper.properties index 442d9132..d1a40c70 100644 --- a/flutter-hms-analytics/android/gradle/wrapper/gradle-wrapper.properties +++ b/flutter-hms-analytics/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Wed Jun 05 14:49:32 PYT 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/flutter-hms-analytics/android/gradlew b/flutter-hms-analytics/android/gradlew old mode 100644 new mode 100755 index 2fe81a7d..1b6c7873 --- a/flutter-hms-analytics/android/gradlew +++ b/flutter-hms-analytics/android/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,78 +17,113 @@ # ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -97,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -105,79 +140,95 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=`expr $i + 1` + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/flutter-hms-analytics/android/gradlew.bat b/flutter-hms-analytics/android/gradlew.bat index 62bd9b9c..ac1b06f9 100644 --- a/flutter-hms-analytics/android/gradlew.bat +++ b/flutter-hms-analytics/android/gradlew.bat @@ -1,103 +1,89 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/flutter-hms-analytics/android/src/main/AndroidManifest.xml b/flutter-hms-analytics/android/src/main/AndroidManifest.xml index 657f9dd1..36105206 100644 --- a/flutter-hms-analytics/android/src/main/AndroidManifest.xml +++ b/flutter-hms-analytics/android/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/flutter-hms-ar/android/build.gradle b/flutter-hms-ar/android/build.gradle index d9bc88ea..12cde8df 100644 --- a/flutter-hms-ar/android/build.gradle +++ b/flutter-hms-ar/android/build.gradle @@ -27,6 +27,10 @@ android { compileSdkVersion 30 buildToolsVersion "30.0.3" + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.ar' + } + defaultConfig { minSdkVersion 26 targetSdkVersion 30 diff --git a/flutter-hms-availability/android/build.gradle b/flutter-hms-availability/android/build.gradle index 2e9963ee..6286c71c 100644 --- a/flutter-hms-availability/android/build.gradle +++ b/flutter-hms-availability/android/build.gradle @@ -26,7 +26,11 @@ apply plugin: 'com.android.library' android { compileSdkVersion 33 buildToolsVersion "31.0.0" - + + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.hmsavailability' + } + defaultConfig { minSdkVersion 19 targetSdkVersion 33 diff --git a/flutter-hms-awareness/android/build.gradle b/flutter-hms-awareness/android/build.gradle index d2a15639..e87dfbc5 100644 --- a/flutter-hms-awareness/android/build.gradle +++ b/flutter-hms-awareness/android/build.gradle @@ -26,6 +26,11 @@ apply plugin: 'com.android.library' android { compileSdkVersion 33 buildToolsVersion "31.0.0" + + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.awareness' + } + defaultConfig { minSdkVersion 24 targetSdkVersion 33 diff --git a/flutter-hms-contact-shield/android/build.gradle b/flutter-hms-contact-shield/android/build.gradle index 11631029..1ae4d2bf 100644 --- a/flutter-hms-contact-shield/android/build.gradle +++ b/flutter-hms-contact-shield/android/build.gradle @@ -27,6 +27,10 @@ android { compileSdkVersion 30 buildToolsVersion '30.0.3' + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.contactshield' + } + defaultConfig { minSdkVersion 24 targetSdkVersion 30 diff --git a/flutter-hms-drive/android/build.gradle b/flutter-hms-drive/android/build.gradle index 05b8485d..7d1de580 100644 --- a/flutter-hms-drive/android/build.gradle +++ b/flutter-hms-drive/android/build.gradle @@ -27,6 +27,10 @@ android { compileSdkVersion 30 buildToolsVersion "30.0.3" + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.drive' + } + defaultConfig { minSdkVersion 27 targetSdkVersion 30 diff --git a/flutter-hms-dtm/android/build.gradle b/flutter-hms-dtm/android/build.gradle index dea1e989..45b26a62 100644 --- a/flutter-hms-dtm/android/build.gradle +++ b/flutter-hms-dtm/android/build.gradle @@ -27,6 +27,10 @@ android { compileSdkVersion 30 buildToolsVersion '30.0.3' + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.dtm' + } + defaultConfig { minSdkVersion 19 targetSdkVersion 30 diff --git a/flutter-hms-fido/android/build.gradle b/flutter-hms-fido/android/build.gradle index d732dba8..bd704554 100644 --- a/flutter-hms-fido/android/build.gradle +++ b/flutter-hms-fido/android/build.gradle @@ -27,6 +27,10 @@ android { compileSdkVersion 30 buildToolsVersion "30.0.3" + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.fido' + } + defaultConfig { minSdkVersion 19 targetSdkVersion 30 diff --git a/flutter-hms-gameservice/android/build.gradle b/flutter-hms-gameservice/android/build.gradle index a54be87c..87a14db4 100644 --- a/flutter-hms-gameservice/android/build.gradle +++ b/flutter-hms-gameservice/android/build.gradle @@ -27,6 +27,10 @@ android { compileSdkVersion 30 buildToolsVersion "30.0.3" + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.huawei_gameservice' + } + defaultConfig { minSdkVersion 19 targetSdkVersion 30 diff --git a/flutter-hms-health/android/build.gradle b/flutter-hms-health/android/build.gradle index 616047ea..56a4cc4f 100644 --- a/flutter-hms-health/android/build.gradle +++ b/flutter-hms-health/android/build.gradle @@ -27,6 +27,10 @@ android { compileSdkVersion 33 buildToolsVersion "31.0.0" + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.health' + } + defaultConfig { minSdkVersion 21 targetSdkVersion 33 diff --git a/flutter-hms-iap/android/build.gradle b/flutter-hms-iap/android/build.gradle index b02ba9b5..ebd9c235 100644 --- a/flutter-hms-iap/android/build.gradle +++ b/flutter-hms-iap/android/build.gradle @@ -26,6 +26,11 @@ apply plugin: 'com.android.library' android { compileSdkVersion 33 buildToolsVersion "31.0.0" + + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.iap' + } + defaultConfig { minSdkVersion 19 targetSdkVersion 33 diff --git a/flutter-hms-location/android/build.gradle b/flutter-hms-location/android/build.gradle index c24238f2..3201270c 100644 --- a/flutter-hms-location/android/build.gradle +++ b/flutter-hms-location/android/build.gradle @@ -27,6 +27,10 @@ android { compileSdkVersion 33 buildToolsVersion "31.0.0" + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.location' + } + defaultConfig { minSdkVersion 21 targetSdkVersion 33 diff --git a/flutter-hms-map/.vscode/settings.json b/flutter-hms-map/.vscode/settings.json deleted file mode 100644 index a0268a28..00000000 --- a/flutter-hms-map/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "java.configuration.updateBuildConfiguration": "automatic" -} \ No newline at end of file diff --git a/flutter-hms-map/android/app/build.gradle b/flutter-hms-map/android/app/build.gradle deleted file mode 100644 index b7b03dad..00000000 --- a/flutter-hms-map/android/app/build.gradle +++ /dev/null @@ -1,102 +0,0 @@ -buildscript { - repositories { - google() - mavenCentral() - maven { url 'https://developer.huawei.com/repo/' } - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' - classpath 'com.huawei.agconnect:agcp:1.9.1.300' - } -} - -allprojects { - repositories { - google() - mavenCentral() - maven { url 'https://developer.huawei.com/repo/' } - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -tasks.register("clean", Delete) { - delete rootProject.buildDir -} - -android { - namespace "com.huawei.hms.flutter.map_example" - compileSdkVersion 33 - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "" - minSdkVersion flutter.minSdkVersion - targetSdkVersion 33 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - signingConfigs { - config { - storeFile file('') - storePassword '' - keyAlias '' - keyPassword '' - } - } - - buildTypes { - debug { - signingConfig signingConfigs.config - } - release { - minifyEnabled false - shrinkResources false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - signingConfig signingConfigs.config - } - } - buildToolsVersion '33.0.0' -} - -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 "7.4.2" apply false -} - -include ":app" \ No newline at end of file diff --git a/flutter-hms-map/android/build.gradle b/flutter-hms-map/android/build.gradle index dd9550d9..c8079a1c 100644 --- a/flutter-hms-map/android/build.gradle +++ b/flutter-hms-map/android/build.gradle @@ -9,12 +9,11 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:8.3.0' - classpath 'com.huawei.agconnect:agcp:1.9.1.300' + classpath 'com.android.tools.build:gradle:8.4.1' } } -allprojects { +rootProject.allprojects { repositories { google() mavenCentral() @@ -22,25 +21,16 @@ allprojects { } } -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - - apply plugin: 'com.android.library' android { - namespace "com.huawei.hms.flutter.map" - compileSdkVersion 34 - buildToolsVersion "34.0.0" - + compileSdkVersion 33 + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.map' + } defaultConfig { minSdkVersion 20 - targetSdkVersion 34 + targetSdkVersion 33 } lintOptions { diff --git a/flutter-hms-map/android/gradle/wrapper/gradle-wrapper.properties b/flutter-hms-map/android/gradle/wrapper/gradle-wrapper.properties index 4c1ba73d..89358b9b 100644 --- a/flutter-hms-map/android/gradle/wrapper/gradle-wrapper.properties +++ b/flutter-hms-map/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Sep 09 19:05:46 TRT 2025 +#Wed Jun 05 15:01:14 PYT 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/flutter-hms-map/android/gradlew b/flutter-hms-map/android/gradlew old mode 100644 new mode 100755 index 4f906e0c..1b6c7873 --- a/flutter-hms-map/android/gradlew +++ b/flutter-hms-map/android/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,67 +17,101 @@ # ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -106,80 +140,95 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=`expr $i + 1` + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/flutter-hms-map/android/gradlew.bat b/flutter-hms-map/android/gradlew.bat index 107acd32..ac1b06f9 100644 --- a/flutter-hms-map/android/gradlew.bat +++ b/flutter-hms-map/android/gradlew.bat @@ -1,89 +1,89 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/flutter-hms-map/android/settings.gradle b/flutter-hms-map/android/settings.gradle index a780a0b6..dee16a11 100644 --- a/flutter-hms-map/android/settings.gradle +++ b/flutter-hms-map/android/settings.gradle @@ -1,26 +1 @@ rootProject.name = 'huawei_map' - -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 "7.4.2" apply false -} - -include ":app" diff --git a/flutter-hms-map/android/src/main/AndroidManifest.xml b/flutter-hms-map/android/src/main/AndroidManifest.xml index e73b0ee5..36105206 100644 --- a/flutter-hms-map/android/src/main/AndroidManifest.xml +++ b/flutter-hms-map/android/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/HmsMap.java b/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/HmsMap.java index 8afa953f..47c7586c 100644 --- a/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/HmsMap.java +++ b/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/HmsMap.java @@ -92,7 +92,7 @@ public void onAttachedToActivity(@NonNull ActivityPluginBinding activityPluginBi flutterPluginBinding.getPlatformViewRegistry() .registerViewFactory(Channel.CHANNEL, new MapFactory(state, flutterPluginBinding.getBinaryMessenger(), activityPluginBinding.getActivity(), - lifecycle, activityPluginBinding)); + lifecycle, activityPluginBinding.getActivity().hashCode())); } @Override diff --git a/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/map/MapBuilder.java b/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/map/MapBuilder.java index 5802cc2f..89281275 100644 --- a/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/map/MapBuilder.java +++ b/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/map/MapBuilder.java @@ -24,7 +24,7 @@ import androidx.annotation.NonNull; import androidx.lifecycle.Lifecycle; -import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding; + import com.huawei.hms.flutter.map.logger.HMSLogger; import com.huawei.hms.maps.HuaweiMapOptions; import com.huawei.hms.maps.model.BitmapDescriptor; @@ -33,7 +33,7 @@ import com.huawei.hms.maps.model.MyLocationStyle; import io.flutter.plugin.common.BinaryMessenger; - +import io.flutter.plugin.common.PluginRegistry; import java.util.HashMap; import java.util.List; @@ -98,9 +98,9 @@ class MapBuilder implements MapMethods { MapController build(final int id, @NonNull final Context context, final Activity mActivity, final AtomicInteger state, final BinaryMessenger binaryMessenger, final Application application, - final Lifecycle lifecycle, final ActivityPluginBinding activityPluginBinding) { + final Lifecycle lifecycle, final int activityHashCode) { final MapController controller = new MapController(id, context, mActivity, state, binaryMessenger, application, - lifecycle, activityPluginBinding, options); + lifecycle, activityHashCode, options); controller.init(); controller.setAllGesturesEnabled(allGesturesEnabled); controller.setScrollGesturesEnabledDuringRotateOrZoom(scrollGesturesEnabledDuringRotateOrZoom); diff --git a/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/map/MapController.java b/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/map/MapController.java index 2008cd36..8b99f5ae 100644 --- a/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/map/MapController.java +++ b/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/map/MapController.java @@ -56,7 +56,7 @@ import io.flutter.plugin.common.BinaryMessenger; import io.flutter.plugin.common.MethodCall; import io.flutter.plugin.common.MethodChannel; - +import io.flutter.plugin.common.PluginRegistry; import io.flutter.plugin.platform.PlatformView; import java.io.ByteArrayOutputStream; @@ -82,8 +82,6 @@ final class MapController private final Application mApplication; - private final ActivityPluginBinding activityPluginBinding; - private final MapView mapView; private HuaweiMap huaweiMap; @@ -154,7 +152,7 @@ final class MapController MapController(final int id, final Context context, final Activity mActivity, final AtomicInteger activityState, final BinaryMessenger binaryMessenger, final Application application, final Lifecycle lifecycle, - final ActivityPluginBinding activityPluginBinding, final HuaweiMapOptions options) { + final int registrarActivityHashCode, final HuaweiMapOptions options) { this.context = context; this.activityState = activityState; mapView = new MapView(mActivity, options); @@ -164,8 +162,7 @@ final class MapController methodChannel.setMethodCallHandler(this); mApplication = application; this.lifecycle = lifecycle; - this.activityPluginBinding = activityPluginBinding; - activityHashCode = activityPluginBinding.getActivity().hashCode(); + activityHashCode = registrarActivityHashCode; mapUtils = new MapUtils(methodChannel, compactness, application); mapListenerHandler = new MapListenerHandler(id, mapUtils, methodChannel, application); logger = HMSLogger.getInstance(application); @@ -952,22 +949,10 @@ private void updateMyLocationSettings() { } private int getActivityHashCode() { - if (activityPluginBinding != null) { - Activity activity = activityPluginBinding.getActivity(); - if (activity != null) { - return activity.hashCode(); - } - } return activityHashCode; } private Application getApplication() { - if (activityPluginBinding != null) { - Activity activity = activityPluginBinding.getActivity(); - if (activity != null) { - return activity.getApplication(); - } - } return mApplication; } diff --git a/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/map/MapFactory.java b/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/map/MapFactory.java index adfcbe48..9f923e1c 100644 --- a/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/map/MapFactory.java +++ b/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/map/MapFactory.java @@ -21,13 +21,13 @@ import android.content.Context; import androidx.lifecycle.Lifecycle; -import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding; + import com.huawei.hms.flutter.map.constants.Param; import com.huawei.hms.flutter.map.utils.Convert; import com.huawei.hms.maps.model.CameraPosition; import io.flutter.plugin.common.BinaryMessenger; - +import io.flutter.plugin.common.PluginRegistry; import io.flutter.plugin.common.StandardMessageCodec; import io.flutter.plugin.platform.PlatformView; import io.flutter.plugin.platform.PlatformViewFactory; @@ -51,18 +51,16 @@ public class MapFactory extends PlatformViewFactory { private final Lifecycle lifecycle; - private final ActivityPluginBinding activityPluginBinding; - public MapFactory(final AtomicInteger state, final BinaryMessenger binaryMessenger, final Activity mActivity, - final Lifecycle lifecycle, final ActivityPluginBinding activityPluginBinding) { + final Lifecycle lifecycle, final int activityHashCode) { super(StandardMessageCodec.INSTANCE); mActivityState = state; this.binaryMessenger = binaryMessenger; this.application = mActivity.getApplication(); + this.activityHashCode = activityHashCode; this.lifecycle = lifecycle; - this.activityPluginBinding = activityPluginBinding; this.mActivity = mActivity; - this.activityHashCode = activityPluginBinding.getActivity().hashCode(); } + } @Override public PlatformView create(final Context context, final int id, final Object args) { @@ -95,6 +93,6 @@ public PlatformView create(final Context context, final int id, final Object arg if (params.containsKey(Param.HEAT_MAPS_TO_INSERT)) { builder.setHeatMaps((List>) params.get(Param.HEAT_MAPS_TO_INSERT)); } - return builder.build(id, context, mActivity, mActivityState, binaryMessenger, application, lifecycle, activityPluginBinding); + return builder.build(id, context, mActivity, mActivityState, binaryMessenger, application, lifecycle, activityHashCode); } } diff --git a/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/utils/Convert.java b/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/utils/Convert.java index 793a635f..baab562c 100644 --- a/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/utils/Convert.java +++ b/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/utils/Convert.java @@ -74,8 +74,7 @@ import io.flutter.plugin.common.BinaryMessenger; import io.flutter.plugin.common.MethodChannel; -// import io.flutter.embedding.engine.FlutterInjector; -// import io.flutter.embedding.engine.loader.FlutterLoader; +import io.flutter.FlutterInjector; import org.json.JSONArray; import org.json.JSONException; @@ -198,15 +197,15 @@ private static BitmapDescriptor toBitmapDescriptor(final Object o) { case Param.FROM_ASSET: if (data.size() == 2) { return BitmapDescriptorFactory.fromAsset( - Convert.toString(data.get(1)).replaceFirst("^/", "")); + FlutterInjector.instance().flutterLoader().getLookupKeyForAsset(Convert.toString(data.get(1)))); } else { return BitmapDescriptorFactory.fromAsset( - Convert.toString(data.get(1)).replaceFirst("^/", "") + "/" + Convert.toString(data.get(2))); + FlutterInjector.instance().flutterLoader().getLookupKeyForAsset(Convert.toString(data.get(1)), Convert.toString(data.get(2)))); } case Param.FROM_ASSET_IMAGE: if (data.size() == 3) { return BitmapDescriptorFactory.fromAsset( - Convert.toString(data.get(1)).replaceFirst("^/", "")); + FlutterInjector.instance().flutterLoader().getLookupKeyForAsset(Convert.toString(data.get(1)))); } else { throw new IllegalArgumentException(Param.ERROR); } diff --git a/flutter-hms-map/example/android/app/build.gradle b/flutter-hms-map/example/android/app/build.gradle index bda657fc..db252f55 100644 --- a/flutter-hms-map/example/android/app/build.gradle +++ b/flutter-hms-map/example/android/app/build.gradle @@ -1,10 +1,3 @@ -plugins { - id "com.android.application" - id "dev.flutter.flutter-gradle-plugin" -} - -apply plugin: 'com.huawei.agconnect' - def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -13,6 +6,11 @@ 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' @@ -23,19 +21,22 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } +apply plugin: 'com.android.application' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" +apply plugin: 'com.huawei.agconnect' + android { - namespace "com.huawei.hms.flutter.map_example" - compileSdkVersion 34 - ndkVersion "26.3.11579264" + compileSdkVersion 33 + lintOptions { disable 'InvalidPackage' } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.huawei.hms.flutter.map_example" - minSdkVersion flutter.minSdkVersion - targetSdkVersion 34 + applicationId "" + minSdkVersion 20 + targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } @@ -56,7 +57,7 @@ android { buildTypes { debug { - // signingConfig signingConfigs.config + signingConfig signingConfigs.config } release { minifyEnabled false @@ -65,7 +66,7 @@ android { signingConfig signingConfigs.config } } - buildToolsVersion '34.0.0' + buildToolsVersion '31.0.0' } flutter { diff --git a/flutter-hms-map/example/android/app/build.gradle.backup b/flutter-hms-map/example/android/app/build.gradle.backup deleted file mode 100644 index 80fdd74d..00000000 --- a/flutter-hms-map/example/android/app/build.gradle.backup +++ /dev/null @@ -1,74 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -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' -} - -apply plugin: 'com.android.application' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" -apply plugin: 'com.huawei.agconnect' - -android { - compileSdkVersion 33 - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "" - minSdkVersion flutter.minSdkVersion - targetSdkVersion 33 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - signingConfigs { - config { - storeFile file('') - storePassword '' - keyAlias '' - keyPassword '' - } - } - - buildTypes { - debug { - signingConfig signingConfigs.config - } - release { - minifyEnabled false - shrinkResources false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - signingConfig signingConfigs.config - } - } - buildToolsVersion '31.0.0' -} - -flutter { - source '../..' -} diff --git a/flutter-hms-map/example/android/build.gradle b/flutter-hms-map/example/android/build.gradle index 19e1fba4..31179a58 100644 --- a/flutter-hms-map/example/android/build.gradle +++ b/flutter-hms-map/example/android/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:8.3.0' + classpath 'com.android.tools.build:gradle:3.6.0' classpath 'com.huawei.agconnect:agcp:1.9.1.300' } } diff --git a/flutter-hms-map/example/android/build.gradle.backup b/flutter-hms-map/example/android/build.gradle.backup deleted file mode 100644 index 31179a58..00000000 --- a/flutter-hms-map/example/android/build.gradle.backup +++ /dev/null @@ -1,32 +0,0 @@ -buildscript { - repositories { - google() - mavenCentral() - maven { url 'https://developer.huawei.com/repo/' } - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.6.0' - classpath 'com.huawei.agconnect:agcp:1.9.1.300' - } -} - -allprojects { - repositories { - google() - mavenCentral() - maven { url 'https://developer.huawei.com/repo/' } - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -tasks.register("clean", Delete) { - delete rootProject.buildDir -} diff --git a/flutter-hms-map/example/android/gradle.properties b/flutter-hms-map/example/android/gradle.properties index 1659b308..94adc3a3 100644 --- a/flutter-hms-map/example/android/gradle.properties +++ b/flutter-hms-map/example/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4096M -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError +org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true diff --git a/flutter-hms-map/example/android/gradle/wrapper/gradle-wrapper.properties b/flutter-hms-map/example/android/gradle/wrapper/gradle-wrapper.properties index d78db1ea..442d9132 100644 --- a/flutter-hms-map/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/flutter-hms-map/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Tue Sep 09 19:05:35 TRT 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/flutter-hms-map/example/android/settings.gradle b/flutter-hms-map/example/android/settings.gradle index f6631c85..44e62bcf 100644 --- a/flutter-hms-map/example/android/settings.gradle +++ b/flutter-hms-map/example/android/settings.gradle @@ -1,24 +1,11 @@ -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 - }() +include ':app' - includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() - repositories { - google() - mavenCentral() - gradlePluginPortal() - } -} +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } -plugins { - id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "8.3.0" apply false -} - -include ":app" +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/flutter-hms-map/example/android/settings.gradle.backup b/flutter-hms-map/example/android/settings.gradle.backup deleted file mode 100644 index 44e62bcf..00000000 --- a/flutter-hms-map/example/android/settings.gradle.backup +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/flutter-hms-map/pubspec.lock b/flutter-hms-map/pubspec.lock deleted file mode 100644 index f4bbb729..00000000 --- a/flutter-hms-map/pubspec.lock +++ /dev/null @@ -1,189 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - async: - dependency: transitive - description: - name: async - sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" - url: "https://pub.dev" - source: hosted - version: "2.13.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - characters: - dependency: transitive - description: - name: characters - sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - clock: - dependency: transitive - description: - name: clock - sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b - url: "https://pub.dev" - source: hosted - version: "1.1.2" - collection: - dependency: transitive - description: - name: collection - sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" - url: "https://pub.dev" - source: hosted - version: "1.19.1" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" - url: "https://pub.dev" - source: hosted - version: "1.3.3" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - leak_tracker: - dependency: transitive - description: - name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" - url: "https://pub.dev" - source: hosted - version: "10.0.9" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 - url: "https://pub.dev" - source: hosted - version: "3.0.9" - leak_tracker_testing: - dependency: transitive - description: - name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" - url: "https://pub.dev" - source: hosted - version: "3.0.1" - matcher: - dependency: transitive - description: - name: matcher - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 - url: "https://pub.dev" - source: hosted - version: "0.12.17" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec - url: "https://pub.dev" - source: hosted - version: "0.11.1" - meta: - dependency: transitive - description: - name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c - url: "https://pub.dev" - source: hosted - version: "1.16.0" - path: - dependency: transitive - description: - name: path - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - source_span: - dependency: transitive - description: - name: source_span - sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" - url: "https://pub.dev" - source: hosted - version: "1.10.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" - url: "https://pub.dev" - source: hosted - version: "1.12.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" - url: "https://pub.dev" - source: hosted - version: "1.4.1" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" - url: "https://pub.dev" - source: hosted - version: "1.2.2" - test_api: - dependency: transitive - description: - name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd - url: "https://pub.dev" - source: hosted - version: "0.7.4" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 - url: "https://pub.dev" - source: hosted - version: "15.0.0" -sdks: - dart: ">=3.7.0-0 <4.0.0" - flutter: ">=3.18.0-18.0.pre.54" diff --git a/flutter-hms-ml/android/build.gradle b/flutter-hms-ml/android/build.gradle index 9bdbd13c..fc741acc 100644 --- a/flutter-hms-ml/android/build.gradle +++ b/flutter-hms-ml/android/build.gradle @@ -26,6 +26,11 @@ apply plugin: 'com.android.library' android { compileSdkVersion 29 buildToolsVersion "29.0.3" + + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.ml' + } + defaultConfig { minSdkVersion 19 targetSdkVersion 29 diff --git a/flutter-hms-mlbody/android/build.gradle b/flutter-hms-mlbody/android/build.gradle index f3d45808..8cd00251 100644 --- a/flutter-hms-mlbody/android/build.gradle +++ b/flutter-hms-mlbody/android/build.gradle @@ -27,6 +27,10 @@ android { compileSdkVersion 31 buildToolsVersion "31.0.0" + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.mlbody' + } + defaultConfig { minSdkVersion 19 targetSdkVersion 31 diff --git a/flutter-hms-mlimage/.dart_tool/extension_discovery/README.md b/flutter-hms-mlimage/.dart_tool/extension_discovery/README.md deleted file mode 100644 index 9dc6757b..00000000 --- a/flutter-hms-mlimage/.dart_tool/extension_discovery/README.md +++ /dev/null @@ -1,31 +0,0 @@ -Extension Discovery Cache -========================= - -This folder is used by `package:extension_discovery` to cache lists of -packages that contains extensions for other packages. - -DO NOT USE THIS FOLDER ----------------------- - - * Do not read (or rely) the contents of this folder. - * Do write to this folder. - -If you're interested in the lists of extensions stored in this folder use the -API offered by package `extension_discovery` to get this information. - -If this package doesn't work for your use-case, then don't try to read the -contents of this folder. It may change, and will not remain stable. - -Use package `extension_discovery` ---------------------------------- - -If you want to access information from this folder. - -Feel free to delete this folder -------------------------------- - -Files in this folder act as a cache, and the cache is discarded if the files -are older than the modification time of `.dart_tool/package_config.json`. - -Hence, it should never be necessary to clear this cache manually, if you find a -need to do please file a bug. diff --git a/flutter-hms-mlimage/.dart_tool/extension_discovery/vs_code.json b/flutter-hms-mlimage/.dart_tool/extension_discovery/vs_code.json deleted file mode 100644 index b0447e41..00000000 --- a/flutter-hms-mlimage/.dart_tool/extension_discovery/vs_code.json +++ /dev/null @@ -1 +0,0 @@ -{"version":2,"entries":[{"package":"huawei_ml_image","rootUri":"../","packageUri":"lib/"}]} \ No newline at end of file diff --git a/flutter-hms-mlimage/android/build.gradle b/flutter-hms-mlimage/android/build.gradle index 1f91f146..03179552 100644 --- a/flutter-hms-mlimage/android/build.gradle +++ b/flutter-hms-mlimage/android/build.gradle @@ -27,6 +27,10 @@ android { compileSdkVersion 31 buildToolsVersion "31.0.0" + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.mlimage' + } + defaultConfig { minSdkVersion 19 targetSdkVersion 31 diff --git a/flutter-hms-mllanguage/.dart_tool/extension_discovery/README.md b/flutter-hms-mllanguage/.dart_tool/extension_discovery/README.md deleted file mode 100644 index 9dc6757b..00000000 --- a/flutter-hms-mllanguage/.dart_tool/extension_discovery/README.md +++ /dev/null @@ -1,31 +0,0 @@ -Extension Discovery Cache -========================= - -This folder is used by `package:extension_discovery` to cache lists of -packages that contains extensions for other packages. - -DO NOT USE THIS FOLDER ----------------------- - - * Do not read (or rely) the contents of this folder. - * Do write to this folder. - -If you're interested in the lists of extensions stored in this folder use the -API offered by package `extension_discovery` to get this information. - -If this package doesn't work for your use-case, then don't try to read the -contents of this folder. It may change, and will not remain stable. - -Use package `extension_discovery` ---------------------------------- - -If you want to access information from this folder. - -Feel free to delete this folder -------------------------------- - -Files in this folder act as a cache, and the cache is discarded if the files -are older than the modification time of `.dart_tool/package_config.json`. - -Hence, it should never be necessary to clear this cache manually, if you find a -need to do please file a bug. diff --git a/flutter-hms-mllanguage/.dart_tool/extension_discovery/vs_code.json b/flutter-hms-mllanguage/.dart_tool/extension_discovery/vs_code.json deleted file mode 100644 index 5dc043d8..00000000 --- a/flutter-hms-mllanguage/.dart_tool/extension_discovery/vs_code.json +++ /dev/null @@ -1 +0,0 @@ -{"version":2,"entries":[{"package":"huawei_ml_language","rootUri":"../","packageUri":"lib/"}]} \ No newline at end of file diff --git a/flutter-hms-mllanguage/.dart_tool/package_config.json b/flutter-hms-mllanguage/.dart_tool/package_config.json deleted file mode 100644 index 4a76f7e7..00000000 --- a/flutter-hms-mllanguage/.dart_tool/package_config.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "configVersion": 2, - "packages": [ - { - "name": "async", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/async-2.13.0", - "packageUri": "lib/", - "languageVersion": "3.4" - }, - { - "name": "boolean_selector", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/boolean_selector-2.1.2", - "packageUri": "lib/", - "languageVersion": "3.1" - }, - { - "name": "characters", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/characters-1.4.0", - "packageUri": "lib/", - "languageVersion": "3.4" - }, - { - "name": "clock", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/clock-1.1.2", - "packageUri": "lib/", - "languageVersion": "3.4" - }, - { - "name": "collection", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/collection-1.19.1", - "packageUri": "lib/", - "languageVersion": "3.4" - }, - { - "name": "fake_async", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/fake_async-1.3.3", - "packageUri": "lib/", - "languageVersion": "3.3" - }, - { - "name": "flutter", - "rootUri": "file:///Users/arifemreankara/development/flutter/packages/flutter", - "packageUri": "lib/", - "languageVersion": "3.7" - }, - { - "name": "flutter_test", - "rootUri": "file:///Users/arifemreankara/development/flutter/packages/flutter_test", - "packageUri": "lib/", - "languageVersion": "3.7" - }, - { - "name": "leak_tracker", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/leak_tracker-10.0.9", - "packageUri": "lib/", - "languageVersion": "3.2" - }, - { - "name": "leak_tracker_flutter_testing", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.9", - "packageUri": "lib/", - "languageVersion": "3.2" - }, - { - "name": "leak_tracker_testing", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1", - "packageUri": "lib/", - "languageVersion": "3.2" - }, - { - "name": "matcher", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/matcher-0.12.17", - "packageUri": "lib/", - "languageVersion": "3.4" - }, - { - "name": "material_color_utilities", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1", - "packageUri": "lib/", - "languageVersion": "2.17" - }, - { - "name": "meta", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/meta-1.16.0", - "packageUri": "lib/", - "languageVersion": "2.12" - }, - { - "name": "path", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/path-1.9.1", - "packageUri": "lib/", - "languageVersion": "3.4" - }, - { - "name": "sky_engine", - "rootUri": "file:///Users/arifemreankara/development/flutter/bin/cache/pkg/sky_engine", - "packageUri": "lib/", - "languageVersion": "3.7" - }, - { - "name": "source_span", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/source_span-1.10.1", - "packageUri": "lib/", - "languageVersion": "3.1" - }, - { - "name": "stack_trace", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/stack_trace-1.12.1", - "packageUri": "lib/", - "languageVersion": "3.4" - }, - { - "name": "stream_channel", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/stream_channel-2.1.4", - "packageUri": "lib/", - "languageVersion": "3.3" - }, - { - "name": "string_scanner", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/string_scanner-1.4.1", - "packageUri": "lib/", - "languageVersion": "3.1" - }, - { - "name": "term_glyph", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/term_glyph-1.2.2", - "packageUri": "lib/", - "languageVersion": "3.1" - }, - { - "name": "test_api", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/test_api-0.7.4", - "packageUri": "lib/", - "languageVersion": "3.5" - }, - { - "name": "vector_math", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/vector_math-2.1.4", - "packageUri": "lib/", - "languageVersion": "2.14" - }, - { - "name": "vm_service", - "rootUri": "file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/vm_service-15.0.0", - "packageUri": "lib/", - "languageVersion": "3.3" - }, - { - "name": "huawei_ml_language", - "rootUri": "../", - "packageUri": "lib/", - "languageVersion": "2.12" - } - ], - "generator": "pub", - "generatorVersion": "3.8.1", - "flutterRoot": "file:///Users/arifemreankara/development/flutter", - "flutterVersion": "3.32.6", - "pubCache": "file:///Users/arifemreankara/.pub-cache" -} diff --git a/flutter-hms-mllanguage/.dart_tool/package_config_subset b/flutter-hms-mllanguage/.dart_tool/package_config_subset deleted file mode 100644 index c8e95183..00000000 --- a/flutter-hms-mllanguage/.dart_tool/package_config_subset +++ /dev/null @@ -1,101 +0,0 @@ -async -3.4 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/async-2.13.0/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/async-2.13.0/lib/ -boolean_selector -3.1 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/boolean_selector-2.1.2/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/boolean_selector-2.1.2/lib/ -characters -3.4 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/characters-1.4.0/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/characters-1.4.0/lib/ -clock -3.4 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/clock-1.1.2/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/clock-1.1.2/lib/ -collection -3.4 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/collection-1.19.1/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/collection-1.19.1/lib/ -fake_async -3.3 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/fake_async-1.3.3/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/fake_async-1.3.3/lib/ -leak_tracker -3.2 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/leak_tracker-10.0.9/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/leak_tracker-10.0.9/lib/ -leak_tracker_flutter_testing -3.2 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.9/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.9/lib/ -leak_tracker_testing -3.2 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1/lib/ -matcher -3.4 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/matcher-0.12.17/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/matcher-0.12.17/lib/ -material_color_utilities -2.17 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1/lib/ -meta -2.12 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/meta-1.16.0/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/meta-1.16.0/lib/ -path -3.4 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/path-1.9.1/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/path-1.9.1/lib/ -source_span -3.1 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/source_span-1.10.1/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/source_span-1.10.1/lib/ -stack_trace -3.4 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/stack_trace-1.12.1/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/stack_trace-1.12.1/lib/ -stream_channel -3.3 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/stream_channel-2.1.4/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/stream_channel-2.1.4/lib/ -string_scanner -3.1 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/string_scanner-1.4.1/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/string_scanner-1.4.1/lib/ -term_glyph -3.1 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/term_glyph-1.2.2/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/term_glyph-1.2.2/lib/ -test_api -3.5 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/test_api-0.7.4/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/test_api-0.7.4/lib/ -vector_math -2.14 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/vector_math-2.1.4/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/vector_math-2.1.4/lib/ -vm_service -3.3 -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/vm_service-15.0.0/ -file:///Users/arifemreankara/.pub-cache/hosted/pub.dev/vm_service-15.0.0/lib/ -huawei_ml_language -2.12 -file:///Users/arifemreankara/Desktop/hms-flutter-plugin-master/flutter-hms-mllanguage/ -file:///Users/arifemreankara/Desktop/hms-flutter-plugin-master/flutter-hms-mllanguage/lib/ -sky_engine -3.7 -file:///Users/arifemreankara/development/flutter/bin/cache/pkg/sky_engine/ -file:///Users/arifemreankara/development/flutter/bin/cache/pkg/sky_engine/lib/ -flutter -3.7 -file:///Users/arifemreankara/development/flutter/packages/flutter/ -file:///Users/arifemreankara/development/flutter/packages/flutter/lib/ -flutter_test -3.7 -file:///Users/arifemreankara/development/flutter/packages/flutter_test/ -file:///Users/arifemreankara/development/flutter/packages/flutter_test/lib/ -2 diff --git a/flutter-hms-mllanguage/.dart_tool/package_graph.json b/flutter-hms-mllanguage/.dart_tool/package_graph.json deleted file mode 100644 index 96b4b590..00000000 --- a/flutter-hms-mllanguage/.dart_tool/package_graph.json +++ /dev/null @@ -1,221 +0,0 @@ -{ - "roots": [ - "huawei_ml_language" - ], - "packages": [ - { - "name": "huawei_ml_language", - "version": "3.12.0+300", - "dependencies": [ - "flutter" - ], - "devDependencies": [ - "flutter_test" - ] - }, - { - "name": "flutter_test", - "version": "0.0.0", - "dependencies": [ - "async", - "boolean_selector", - "characters", - "clock", - "collection", - "fake_async", - "flutter", - "leak_tracker", - "leak_tracker_flutter_testing", - "leak_tracker_testing", - "matcher", - "material_color_utilities", - "meta", - "path", - "source_span", - "stack_trace", - "stream_channel", - "string_scanner", - "term_glyph", - "test_api", - "vector_math", - "vm_service" - ] - }, - { - "name": "flutter", - "version": "0.0.0", - "dependencies": [ - "characters", - "collection", - "material_color_utilities", - "meta", - "sky_engine", - "vector_math" - ] - }, - { - "name": "vm_service", - "version": "15.0.0", - "dependencies": [] - }, - { - "name": "term_glyph", - "version": "1.2.2", - "dependencies": [] - }, - { - "name": "string_scanner", - "version": "1.4.1", - "dependencies": [ - "source_span" - ] - }, - { - "name": "stream_channel", - "version": "2.1.4", - "dependencies": [ - "async" - ] - }, - { - "name": "source_span", - "version": "1.10.1", - "dependencies": [ - "collection", - "path", - "term_glyph" - ] - }, - { - "name": "meta", - "version": "1.16.0", - "dependencies": [] - }, - { - "name": "material_color_utilities", - "version": "0.11.1", - "dependencies": [ - "collection" - ] - }, - { - "name": "leak_tracker_testing", - "version": "3.0.1", - "dependencies": [ - "leak_tracker", - "matcher", - "meta" - ] - }, - { - "name": "leak_tracker", - "version": "10.0.9", - "dependencies": [ - "clock", - "collection", - "meta", - "path", - "vm_service" - ] - }, - { - "name": "collection", - "version": "1.19.1", - "dependencies": [] - }, - { - "name": "characters", - "version": "1.4.0", - "dependencies": [] - }, - { - "name": "boolean_selector", - "version": "2.1.2", - "dependencies": [ - "source_span", - "string_scanner" - ] - }, - { - "name": "async", - "version": "2.13.0", - "dependencies": [ - "collection", - "meta" - ] - }, - { - "name": "leak_tracker_flutter_testing", - "version": "3.0.9", - "dependencies": [ - "flutter", - "leak_tracker", - "leak_tracker_testing", - "matcher", - "meta" - ] - }, - { - "name": "vector_math", - "version": "2.1.4", - "dependencies": [] - }, - { - "name": "stack_trace", - "version": "1.12.1", - "dependencies": [ - "path" - ] - }, - { - "name": "clock", - "version": "1.1.2", - "dependencies": [] - }, - { - "name": "fake_async", - "version": "1.3.3", - "dependencies": [ - "clock", - "collection" - ] - }, - { - "name": "path", - "version": "1.9.1", - "dependencies": [] - }, - { - "name": "matcher", - "version": "0.12.17", - "dependencies": [ - "async", - "meta", - "stack_trace", - "term_glyph", - "test_api" - ] - }, - { - "name": "test_api", - "version": "0.7.4", - "dependencies": [ - "async", - "boolean_selector", - "collection", - "meta", - "source_span", - "stack_trace", - "stream_channel", - "string_scanner", - "term_glyph" - ] - }, - { - "name": "sky_engine", - "version": "0.0.0", - "dependencies": [] - } - ], - "configVersion": 1 -} \ No newline at end of file diff --git a/flutter-hms-mllanguage/.dart_tool/version b/flutter-hms-mllanguage/.dart_tool/version deleted file mode 100644 index 72fd6680..00000000 --- a/flutter-hms-mllanguage/.dart_tool/version +++ /dev/null @@ -1 +0,0 @@ -3.32.6 \ No newline at end of file diff --git a/flutter-hms-mllanguage/.vscode/settings.json b/flutter-hms-mllanguage/.vscode/settings.json deleted file mode 100644 index db37bf9a..00000000 --- a/flutter-hms-mllanguage/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "java.configuration.updateBuildConfiguration": "interactive" -} \ No newline at end of file diff --git a/flutter-hms-mllanguage/android/build.gradle b/flutter-hms-mllanguage/android/build.gradle index f211f3f1..86206353 100644 --- a/flutter-hms-mllanguage/android/build.gradle +++ b/flutter-hms-mllanguage/android/build.gradle @@ -9,7 +9,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:8.3.2' + classpath 'com.android.tools.build:gradle:3.6.0' } } @@ -24,12 +24,16 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - namespace "com.huawei.hms.flutter.mllanguage" - compileSdkVersion 35 + compileSdkVersion 33 + buildToolsVersion "31.0.0" + + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.mllanguage' + } defaultConfig { - minSdkVersion 21 - targetSdkVersion 35 + minSdkVersion 19 + targetSdkVersion 33 } lintOptions { diff --git a/flutter-hms-mllanguage/android/gradle/wrapper/gradle-wrapper.properties b/flutter-hms-mllanguage/android/gradle/wrapper/gradle-wrapper.properties index 6a43401a..442d9132 100644 --- a/flutter-hms-mllanguage/android/gradle/wrapper/gradle-wrapper.properties +++ b/flutter-hms-mllanguage/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Thu Sep 25 09:41:36 TRT 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/flutter-hms-mllanguage/example/android/app/build.gradle b/flutter-hms-mllanguage/example/android/app/build.gradle index ee2c50b6..36365ae1 100644 --- a/flutter-hms-mllanguage/example/android/app/build.gradle +++ b/flutter-hms-mllanguage/example/android/app/build.gradle @@ -1,11 +1,3 @@ -plugins { - id "com.android.application" - id "org.jetbrains.kotlin.android" - id "dev.flutter.flutter-gradle-plugin" -} - -apply plugin: 'com.huawei.agconnect' - def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -14,17 +6,35 @@ 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' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" +apply plugin: 'com.huawei.agconnect' + android { - namespace "com.huawei.hms.flutter.mllanguage_example" - compileSdkVersion 35 + compileSdkVersion 33 defaultConfig { - applicationId "com.huawei.hms.flutter.mllanguage_example" - minSdkVersion flutter.minSdkVersion + applicationId "" + minSdkVersion 19 targetSdkVersion 33 multiDexEnabled true - versionCode localProperties.getProperty('flutter.versionCode', '1').toInteger() - versionName localProperties.getProperty('flutter.versionName', '1.0') + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName } compileOptions { @@ -36,15 +46,26 @@ android { disable 'InvalidPackage' } + signingConfigs { + config { + storeFile file('') + storePassword '' + keyAlias '' + keyPassword '' + v1SigningEnabled true + v2SigningEnabled true + } + } + buildTypes { debug { - // Use default debug keystore + signingConfig signingConfigs.config } release { + signingConfig signingConfigs.config minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - // Configure release signing in key.properties or signingConfigs when ready } } } diff --git a/flutter-hms-mllanguage/example/android/build.gradle b/flutter-hms-mllanguage/example/android/build.gradle index c9e75c0c..0702f9ae 100644 --- a/flutter-hms-mllanguage/example/android/build.gradle +++ b/flutter-hms-mllanguage/example/android/build.gradle @@ -1,3 +1,16 @@ +buildscript { + repositories { + google() + mavenCentral() + maven { url 'https://developer.huawei.com/repo/' } + } + + dependencies { + classpath 'com.android.tools.build:gradle:7.3.0' + classpath 'com.huawei.agconnect:agcp:1.9.1.301' + } +} + allprojects { repositories { google() @@ -17,15 +30,3 @@ subprojects { tasks.register("clean", Delete) { delete rootProject.buildDir } - -buildscript { - repositories { - google() - mavenCentral() - maven { url 'https://developer.huawei.com/repo/' } - } - dependencies { - classpath 'com.android.tools.build:gradle:8.3.2' - classpath 'com.huawei.agconnect:agcp:1.9.1.301' - } -} diff --git a/flutter-hms-mllanguage/example/android/gradle.properties b/flutter-hms-mllanguage/example/android/gradle.properties index cd7b802b..94adc3a3 100644 --- a/flutter-hms-mllanguage/example/android/gradle.properties +++ b/flutter-hms-mllanguage/example/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4096M -XX:MaxMetaspaceSize=1G +org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true -android.enableJetifier=false +android.enableJetifier=true diff --git a/flutter-hms-mllanguage/example/android/gradle/wrapper/gradle-wrapper.properties b/flutter-hms-mllanguage/example/android/gradle/wrapper/gradle-wrapper.properties index 2a0fcc1b..bfd98901 100644 --- a/flutter-hms-mllanguage/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/flutter-hms-mllanguage/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip diff --git a/flutter-hms-mllanguage/example/android/settings.gradle b/flutter-hms-mllanguage/example/android/settings.gradle index 4a358652..44e62bcf 100644 --- a/flutter-hms-mllanguage/example/android/settings.gradle +++ b/flutter-hms-mllanguage/example/android/settings.gradle @@ -1,26 +1,11 @@ -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 - }() +include ':app' - includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() - repositories { - google() - mavenCentral() - gradlePluginPortal() - maven { url 'https://developer.huawei.com/repo/' } - } -} +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } -plugins { - id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "8.3.2" apply false - id "org.jetbrains.kotlin.android" version "1.9.22" apply false -} - -include ":app" +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/flutter-hms-mllanguage/example/pubspec.yaml b/flutter-hms-mllanguage/example/pubspec.yaml index ef8df8ce..abe46a17 100644 --- a/flutter-hms-mllanguage/example/pubspec.yaml +++ b/flutter-hms-mllanguage/example/pubspec.yaml @@ -9,7 +9,7 @@ dependencies: sdk: flutter huawei_ml_language: path: ../ - file_picker: ^8.0.0 + file_picker: 4.1.3 dev_dependencies: flutter_test: diff --git a/flutter-hms-mllanguage/pubspec.lock b/flutter-hms-mllanguage/pubspec.lock deleted file mode 100644 index f4bbb729..00000000 --- a/flutter-hms-mllanguage/pubspec.lock +++ /dev/null @@ -1,189 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - async: - dependency: transitive - description: - name: async - sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" - url: "https://pub.dev" - source: hosted - version: "2.13.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - characters: - dependency: transitive - description: - name: characters - sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - clock: - dependency: transitive - description: - name: clock - sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b - url: "https://pub.dev" - source: hosted - version: "1.1.2" - collection: - dependency: transitive - description: - name: collection - sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" - url: "https://pub.dev" - source: hosted - version: "1.19.1" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" - url: "https://pub.dev" - source: hosted - version: "1.3.3" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - leak_tracker: - dependency: transitive - description: - name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" - url: "https://pub.dev" - source: hosted - version: "10.0.9" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 - url: "https://pub.dev" - source: hosted - version: "3.0.9" - leak_tracker_testing: - dependency: transitive - description: - name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" - url: "https://pub.dev" - source: hosted - version: "3.0.1" - matcher: - dependency: transitive - description: - name: matcher - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 - url: "https://pub.dev" - source: hosted - version: "0.12.17" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec - url: "https://pub.dev" - source: hosted - version: "0.11.1" - meta: - dependency: transitive - description: - name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c - url: "https://pub.dev" - source: hosted - version: "1.16.0" - path: - dependency: transitive - description: - name: path - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - source_span: - dependency: transitive - description: - name: source_span - sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" - url: "https://pub.dev" - source: hosted - version: "1.10.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" - url: "https://pub.dev" - source: hosted - version: "1.12.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" - url: "https://pub.dev" - source: hosted - version: "1.4.1" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" - url: "https://pub.dev" - source: hosted - version: "1.2.2" - test_api: - dependency: transitive - description: - name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd - url: "https://pub.dev" - source: hosted - version: "0.7.4" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 - url: "https://pub.dev" - source: hosted - version: "15.0.0" -sdks: - dart: ">=3.7.0-0 <4.0.0" - flutter: ">=3.18.0-18.0.pre.54" diff --git a/flutter-hms-mltext/android/build.gradle b/flutter-hms-mltext/android/build.gradle index e9efc0d8..c613fb5a 100644 --- a/flutter-hms-mltext/android/build.gradle +++ b/flutter-hms-mltext/android/build.gradle @@ -27,6 +27,10 @@ android { compileSdkVersion 31 buildToolsVersion "31.0.0" + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.mltext' + } + defaultConfig { minSdkVersion 19 targetSdkVersion 31 diff --git a/flutter-hms-modeling/android/build.gradle b/flutter-hms-modeling/android/build.gradle index f390fc86..73b60bc2 100644 --- a/flutter-hms-modeling/android/build.gradle +++ b/flutter-hms-modeling/android/build.gradle @@ -27,6 +27,10 @@ android { compileSdkVersion 30 buildToolsVersion "30.0.3" + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.modeling3d' + } + defaultConfig { minSdkVersion 26 targetSdkVersion 30 diff --git a/flutter-hms-nearbyservice/android/build.gradle b/flutter-hms-nearbyservice/android/build.gradle index 02389d00..b0cfb1ce 100644 --- a/flutter-hms-nearbyservice/android/build.gradle +++ b/flutter-hms-nearbyservice/android/build.gradle @@ -27,6 +27,10 @@ android { compileSdkVersion 33 buildToolsVersion "31.0.0" + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.nearbyservice' + } + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 diff --git a/flutter-hms-push/android/build.gradle b/flutter-hms-push/android/build.gradle index 2bc03c80..15981e02 100644 --- a/flutter-hms-push/android/build.gradle +++ b/flutter-hms-push/android/build.gradle @@ -9,7 +9,7 @@ buildscript { } dependencies { - classpath "com.android.tools.build:gradle:3.6.0" + classpath 'com.android.tools.build:gradle:8.1.4' } } @@ -25,8 +25,9 @@ apply plugin: "com.android.library" android { compileSdkVersion 33 - buildToolsVersion '31.0.0' - + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.push' + } defaultConfig { minSdkVersion 19 targetSdkVersion 33 @@ -37,8 +38,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } } diff --git a/flutter-hms-push/android/gradle/wrapper/gradle-wrapper.properties b/flutter-hms-push/android/gradle/wrapper/gradle-wrapper.properties index ed8c93de..e80df02d 100644 --- a/flutter-hms-push/android/gradle/wrapper/gradle-wrapper.properties +++ b/flutter-hms-push/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists +#Wed Jun 05 14:55:54 PYT 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/flutter-hms-push/android/src/main/AndroidManifest.xml b/flutter-hms-push/android/src/main/AndroidManifest.xml index c1da6f4e..d16acd98 100644 --- a/flutter-hms-push/android/src/main/AndroidManifest.xml +++ b/flutter-hms-push/android/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/flutter-hms-push/android/src/main/java/com/huawei/hms/flutter/push/backgroundmessaging/BackgroundMessagingService.java b/flutter-hms-push/android/src/main/java/com/huawei/hms/flutter/push/backgroundmessaging/BackgroundMessagingService.java index f518c7ae..57a7cea6 100644 --- a/flutter-hms-push/android/src/main/java/com/huawei/hms/flutter/push/backgroundmessaging/BackgroundMessagingService.java +++ b/flutter-hms-push/android/src/main/java/com/huawei/hms/flutter/push/backgroundmessaging/BackgroundMessagingService.java @@ -24,8 +24,6 @@ import androidx.annotation.NonNull; import androidx.core.app.JobIntentService; -import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback; - import java.util.Collections; import java.util.LinkedList; import java.util.List; @@ -44,11 +42,6 @@ private synchronized void setBackgroundRunner(FlutterBackgroundRunner bgRunner) BackgroundMessagingService.backgroundRunner = bgRunner; } - // For Backwards Compatibility with V1 Plugin registration. - public static void setPluginRegistrantCallback(final PluginRegistrantCallback callback) { - FlutterBackgroundRunner.setPluginRegistrantCallback(callback); - } - public static void setUserCallback(final Context context, final long userCallback) { FlutterBackgroundRunner.setUserCallback(context, userCallback); } @@ -108,4 +101,4 @@ protected void onHandleWork(@NonNull final Intent intent) { } } } -} +} \ No newline at end of file diff --git a/flutter-hms-push/android/src/main/java/com/huawei/hms/flutter/push/backgroundmessaging/FlutterBackgroundRunner.java b/flutter-hms-push/android/src/main/java/com/huawei/hms/flutter/push/backgroundmessaging/FlutterBackgroundRunner.java index 01659045..09b832bf 100644 --- a/flutter-hms-push/android/src/main/java/com/huawei/hms/flutter/push/backgroundmessaging/FlutterBackgroundRunner.java +++ b/flutter-hms-push/android/src/main/java/com/huawei/hms/flutter/push/backgroundmessaging/FlutterBackgroundRunner.java @@ -38,13 +38,11 @@ import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.embedding.engine.dart.DartExecutor.DartCallback; import io.flutter.embedding.engine.loader.FlutterLoader; -import io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry; import io.flutter.plugin.common.BinaryMessenger; import io.flutter.plugin.common.MethodCall; import io.flutter.plugin.common.MethodChannel; import io.flutter.plugin.common.MethodChannel.MethodCallHandler; import io.flutter.plugin.common.MethodChannel.Result; -import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback; import io.flutter.view.FlutterCallbackInformation; import java.util.Arrays; @@ -60,9 +58,6 @@ public class FlutterBackgroundRunner implements MethodCallHandler { public static final String USER_CALLBACK_KEY = "push_background_message_callback"; - // Deprecated, Support for backwards compatibility with V1 embedding. - private static PluginRegistrantCallback pluginRegistrantCallback; - private final AtomicBoolean isCallbackDispatcherReady = new AtomicBoolean(false); private MethodChannel bgMethodChannel; @@ -71,11 +66,6 @@ public class FlutterBackgroundRunner implements MethodCallHandler { private long bgMessagingCallback; - // For Backwards Compatibility with V1 Plugin registration. - public static void setPluginRegistrantCallback(final PluginRegistrantCallback callback) { - pluginRegistrantCallback = callback; - } - public static void setCallBackDispatcher(final Context context, final long callbackHandle) { final SharedPreferences prefs = context.getSharedPreferences(Core.PREFERENCE_NAME, Context.MODE_PRIVATE); prefs.edit().putLong(CALLBACK_DISPATCHER_KEY, callbackHandle).apply(); @@ -123,17 +113,11 @@ public void startBgIsolate(final Context context, final long callbackHandle) { flutterEngine = new FlutterEngine(context); final FlutterCallbackInformation flutterCallbackInfo - = FlutterCallbackInformation.lookupCallbackInformation(callbackHandle); + = FlutterCallbackInformation.lookupCallbackInformation(callbackHandle); final DartExecutor executor = flutterEngine.getDartExecutor(); initializeMethodChannel(executor); final DartCallback dartCallback = new DartCallback(assets, appBundlePath, flutterCallbackInfo); executor.executeDartCallback(dartCallback); - - // For V1 Embedding - if (pluginRegistrantCallback != null) { - pluginRegistrantCallback.registerWith(new ShimPluginRegistry(flutterEngine)); - } - } }); }; @@ -168,7 +152,7 @@ public void onMethodCall(@NonNull final MethodCall call, @NonNull final Result r public void executeDartCallbackInBgIsolate(final Intent intent, final CountDownLatch latch) { if (flutterEngine == null) { Log.i(TAG, - "A background message could not be handled in Dart as no onBackgroundLocation handler has been registered"); + "A background message could not be handled in Dart as no onBackgroundLocation handler has been registered"); return; } Result result = null; @@ -211,4 +195,4 @@ public void notImplemented() { latch.countDown(); } } -} +} \ No newline at end of file diff --git a/flutter-hms-pushfcm/android/build.gradle b/flutter-hms-pushfcm/android/build.gradle index b64bd34b..ea241d0e 100644 --- a/flutter-hms-pushfcm/android/build.gradle +++ b/flutter-hms-pushfcm/android/build.gradle @@ -26,6 +26,11 @@ apply plugin: 'com.android.library' android { compileSdkVersion 30 buildToolsVersion "30.0.3" + + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.pushfcm' + } + defaultConfig { minSdkVersion 17 targetSdkVersion 30 @@ -42,4 +47,4 @@ android { dependencies { implementation 'com.huawei.hms:push-fcm:6.3.0.304' -} \ No newline at end of file +} diff --git a/flutter-hms-safetydetect/android/build.gradle b/flutter-hms-safetydetect/android/build.gradle index 5c1fecdb..d2a9d738 100644 --- a/flutter-hms-safetydetect/android/build.gradle +++ b/flutter-hms-safetydetect/android/build.gradle @@ -27,6 +27,10 @@ android { compileSdkVersion 30 buildToolsVersion "30.0.3" + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.safetydetect' + } + defaultConfig { minSdkVersion 19 targetSdkVersion 30 diff --git a/flutter-hms-scan/android/build.gradle b/flutter-hms-scan/android/build.gradle index f8498c46..4885f7e0 100644 --- a/flutter-hms-scan/android/build.gradle +++ b/flutter-hms-scan/android/build.gradle @@ -27,6 +27,10 @@ android { compileSdkVersion 33 buildToolsVersion "31.0.0" + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.scan' + } + defaultConfig { minSdkVersion 19 targetSdkVersion 33 diff --git a/flutter-hms-site/android/build.gradle b/flutter-hms-site/android/build.gradle index 0decb6e5..80cd731c 100644 --- a/flutter-hms-site/android/build.gradle +++ b/flutter-hms-site/android/build.gradle @@ -27,6 +27,10 @@ android { compileSdkVersion 33 buildToolsVersion "31.0.0" + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.site' + } + defaultConfig { minSdkVersion 19 targetSdkVersion 33 diff --git a/flutter-hms-wallet/android/build.gradle b/flutter-hms-wallet/android/build.gradle index 0be5170b..b51a18a5 100644 --- a/flutter-hms-wallet/android/build.gradle +++ b/flutter-hms-wallet/android/build.gradle @@ -27,6 +27,10 @@ android { compileSdkVersion 30 buildToolsVersion "30.0.3" + if (project.android.hasProperty("namespace")) { + namespace 'com.huawei.hms.flutter.wallet' + } + defaultConfig { minSdkVersion 19 targetSdkVersion 30