├── .gitignore ├── LICENSE ├── README.md ├── build.gradle.kts ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── icon.png ├── plugin ├── .gitignore ├── build.gradle.kts ├── demo │ ├── .gitattributes │ ├── .gitignore │ ├── addons │ │ └── .gitignore │ ├── export_presets.cfg │ ├── icon.svg │ ├── main.gd │ ├── main.tscn │ └── project.godot ├── export_scripts_template │ ├── export_plugin.gd │ ├── plugin.cfg │ └── plugin.gd └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── featurekillers │ └── plugin │ └── android │ └── firebase │ └── analytics │ └── GodotAndroidPlugin.kt └── settings.gradle.kts /.gitignore: -------------------------------------------------------------------------------- 1 | # Gradle files 2 | .gradle/ 3 | build/ 4 | 5 | # Local configuration file (sdk path, etc) 6 | local.properties 7 | 8 | # Log/OS Files 9 | *.log 10 | 11 | # Android Studio generated files and folders 12 | captures/ 13 | .externalNativeBuild/ 14 | .cxx/ 15 | *.apk 16 | output.json 17 | 18 | # IntelliJ 19 | *.iml 20 | .idea/ 21 | misc.xml 22 | deploymentTargetDropDown.xml 23 | render.experimental.xml 24 | 25 | # Keystore files 26 | *.jks 27 | *.keystore 28 | 29 | # Google Services (e.g. APIs or Firebase) 30 | google-services.json 31 | 32 | # Android Profiling 33 | *.hprof 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Feature Killers 4 | Copyright (c) 2023 Fredia Huya-Kouadio 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Firebase Analytics Godot Android Plugin 2 | Firebase Analytics implementation for Godot 4.2+. Created from [Godot Android Plugin template](https://github.com/m4gr3d/Godot-Android-Plugin-Template). 3 | 4 | ### Installing the plugin 5 | For use plugin you must configure gradle build as covered in [godot docs](https://docs.godotengine.org/en/stable/tutorials/export/android_gradle_build.html) 6 | - Download addon from releases to addons folder of your project 7 | - Navigate to Project -> Project Settings... -> Plugins, and ensure the plugin is enabled 8 | - Install the Godot Android build template by clicking on Project -> Install Android Build Template... 9 | - Add your [google-services.json](https://developers.google.com/android/guides/google-services-plugin) to android/build folder in your project 10 | - Connect an Android device to your machine and run your project 11 | 12 | ## Usage 13 | Download latest release and enable plugin in godot project settings. 14 | For log event use function in singleton FirebaseAnalytics: 15 | ```gdscript 16 | func logEvent(event: String, params: Dictionary) -> void: 17 | ``` 18 | In params dictionary keys mast be String type, values can be int, float or String. 19 | Usage example: 20 | ```gdscript 21 | func _on_Button_pressed(): 22 | FirebaseAnalytics.logEvent("test", 23 | { 24 | "value1": 1, 25 | "value2": "2", 26 | "value3": 0.3 27 | }) 28 | ``` 29 | Plugin store [google recomended events](https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event) names as constatns that you can use: 30 | 31 | ![image](https://github.com/FeatureKillersGames/FirebaseAnalyticsGodotAndroidPlugin/assets/36816595/698b04a2-6aa7-4bf9-b1cc-7c7673357fb0) 32 | 33 | And [google recomended parameters](https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Param) 34 | 35 | ![image](https://github.com/FeatureKillersGames/FirebaseAnalyticsGodotAndroidPlugin/assets/36816595/17fc75b7-f0fa-46d7-8faa-517500f21733) 36 | 37 | ### Building the plugin 38 | - In a terminal window, navigate to the project's root directory and run the following command: 39 | ./gradlew assemble 40 | - On successful completion of the build, the output files can be found in 41 | [plugin/demo/addons](plugin/demo/addons) 42 | 43 | ### Warning 44 | I use some workaround to connect android plugins to the project, so if you know how to do it properly be free to contribute or send me some guides on how to do it properly. 45 | -------------------------------------------------------------------------------- /build.gradle.kts: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | plugins { 3 | id("com.android.library") version "8.2.0" apply false 4 | id("org.jetbrains.kotlin.android") version "1.9.20" apply false 5 | id("com.google.gms.google-services") version "4.4.2" apply false 6 | } 7 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app's APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Kotlin code style for this project: "official" or "obsolete": 19 | kotlin.code.style=official 20 | # Enables namespacing of each library's R class so that its R class includes only the 21 | # resources declared in the library itself and none from the library's dependencies, 22 | # thereby reducing the size of the R class for that library 23 | android.nonTransitiveRClass=true 24 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FeatureKillersGames/FirebaseAnalyticsGodotAndroidPlugin/eeedc917266a2e1ec7e297aa27ff79941280d87b/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Aug 25 21:04:51 PDT 2023 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## Gradle start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | 86 | # Determine the Java command to use to start the JVM. 87 | if [ -n "$JAVA_HOME" ] ; then 88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 89 | # IBM's JDK on AIX uses strange locations for the executables 90 | JAVACMD="$JAVA_HOME/jre/sh/java" 91 | else 92 | JAVACMD="$JAVA_HOME/bin/java" 93 | fi 94 | if [ ! -x "$JAVACMD" ] ; then 95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 96 | 97 | Please set the JAVA_HOME variable in your environment to match the 98 | location of your Java installation." 99 | fi 100 | else 101 | JAVACMD="java" 102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 103 | 104 | Please set the JAVA_HOME variable in your environment to match the 105 | location of your Java installation." 106 | fi 107 | 108 | # Increase the maximum file descriptors if we can. 109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 110 | MAX_FD_LIMIT=`ulimit -H -n` 111 | if [ $? -eq 0 ] ; then 112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 113 | MAX_FD="$MAX_FD_LIMIT" 114 | fi 115 | ulimit -n $MAX_FD 116 | if [ $? -ne 0 ] ; then 117 | warn "Could not set maximum file descriptor limit: $MAX_FD" 118 | fi 119 | else 120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 121 | fi 122 | fi 123 | 124 | # For Darwin, add options to specify how the application appears in the dock 125 | if $darwin; then 126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 127 | fi 128 | 129 | # For Cygwin or MSYS, switch paths to Windows format before running java 130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 133 | 134 | JAVACMD=`cygpath --unix "$JAVACMD"` 135 | 136 | # We build the pattern for arguments to be converted via cygpath 137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 138 | SEP="" 139 | for dir in $ROOTDIRSRAW ; do 140 | ROOTDIRS="$ROOTDIRS$SEP$dir" 141 | SEP="|" 142 | done 143 | OURCYGPATTERN="(^($ROOTDIRS))" 144 | # Add a user-defined pattern to the cygpath arguments 145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 147 | fi 148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 149 | i=0 150 | for arg in "$@" ; do 151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 153 | 154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 156 | else 157 | eval `echo args$i`="\"$arg\"" 158 | fi 159 | i=`expr $i + 1` 160 | done 161 | case $i in 162 | 0) set -- ;; 163 | 1) set -- "$args0" ;; 164 | 2) set -- "$args0" "$args1" ;; 165 | 3) set -- "$args0" "$args1" "$args2" ;; 166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 172 | esac 173 | fi 174 | 175 | # Escape application args 176 | save () { 177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 178 | echo " " 179 | } 180 | APP_ARGS=`save "$@"` 181 | 182 | # Collect all arguments for the java command, following the shell quoting and substitution rules 183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 184 | 185 | exec "$JAVACMD" "$@" 186 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FeatureKillersGames/FirebaseAnalyticsGodotAndroidPlugin/eeedc917266a2e1ec7e297aa27ff79941280d87b/icon.png -------------------------------------------------------------------------------- /plugin/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /FirebaseAnalyticsGodotAndroidPlugin 3 | FirebaseAnalyticsGodotAndroidPlugin.zip 4 | -------------------------------------------------------------------------------- /plugin/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import com.android.build.gradle.internal.tasks.factory.dependsOn 2 | 3 | plugins { 4 | id("com.android.library") 5 | id("org.jetbrains.kotlin.android") 6 | id("com.google.gms.google-services") 7 | } 8 | 9 | val pluginName = "FirebaseAnalyticsGodotPlugin" 10 | 11 | val pluginPackageName = "com.featurekillers.plugin.android.firebase.analytics" 12 | 13 | android { 14 | namespace = pluginPackageName 15 | compileSdk = 33 16 | 17 | buildFeatures { 18 | buildConfig = true 19 | } 20 | 21 | defaultConfig { 22 | minSdk = 21 23 | 24 | manifestPlaceholders["godotPluginName"] = pluginName 25 | manifestPlaceholders["godotPluginPackageName"] = pluginPackageName 26 | buildConfigField("String", "GODOT_PLUGIN_NAME", "\"${pluginName}\"") 27 | setProperty("archivesBaseName", pluginName) 28 | } 29 | 30 | compileOptions { 31 | sourceCompatibility = JavaVersion.VERSION_17 32 | targetCompatibility = JavaVersion.VERSION_17 33 | } 34 | kotlinOptions { 35 | jvmTarget = "17" 36 | } 37 | } 38 | 39 | dependencies { 40 | implementation("org.godotengine:godot:4.3.0.stable") 41 | implementation(platform("com.google.firebase:firebase-bom:33.3.0")) 42 | implementation("com.google.firebase:firebase-analytics") 43 | implementation("com.google.android.gms:play-services-measurement-api:22.1.0") 44 | } 45 | 46 | // BUILD TASKS DEFINITION 47 | val copyDebugAARToDemoAddons by tasks.registering(Copy::class) { 48 | description = "Copies the generated debug AAR binary to the plugin's addons directory" 49 | from("build/outputs/aar") 50 | include("$pluginName-debug.aar") 51 | into("demo/addons/$pluginName/bin/debug") 52 | } 53 | 54 | val copyReleaseAARToDemoAddons by tasks.registering(Copy::class) { 55 | description = "Copies the generated release AAR binary to the plugin's addons directory" 56 | from("build/outputs/aar") 57 | include("$pluginName-release.aar") 58 | into("demo/addons/$pluginName/bin/release") 59 | } 60 | 61 | val cleanDemoAddons by tasks.registering(Delete::class) { 62 | delete("demo/addons/$pluginName") 63 | } 64 | 65 | val copyAddonsToDemo by tasks.registering(Copy::class) { 66 | description = "Copies the export scripts templates to the plugin's addons directory" 67 | 68 | dependsOn(cleanDemoAddons) 69 | finalizedBy(copyDebugAARToDemoAddons) 70 | finalizedBy(copyReleaseAARToDemoAddons) 71 | 72 | from("export_scripts_template") 73 | into("demo/addons/$pluginName") 74 | } 75 | 76 | tasks.named("assemble").configure { 77 | finalizedBy(copyAddonsToDemo) 78 | } 79 | 80 | tasks.named("clean").apply { 81 | dependsOn(cleanDemoAddons) 82 | } 83 | -------------------------------------------------------------------------------- /plugin/demo/.gitattributes: -------------------------------------------------------------------------------- 1 | # Normalize EOL for all files that Git considers text files. 2 | * text=auto eol=lf 3 | -------------------------------------------------------------------------------- /plugin/demo/.gitignore: -------------------------------------------------------------------------------- 1 | # Godot 4+ specific ignores 2 | .godot/ 3 | *.import 4 | /android/ 5 | -------------------------------------------------------------------------------- /plugin/demo/addons/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /plugin/demo/export_presets.cfg: -------------------------------------------------------------------------------- 1 | [preset.0] 2 | 3 | name="Android" 4 | platform="Android" 5 | runnable=true 6 | dedicated_server=false 7 | custom_features="" 8 | export_filter="all_resources" 9 | include_filter="" 10 | exclude_filter="" 11 | export_path="" 12 | encryption_include_filters="" 13 | encryption_exclude_filters="" 14 | encrypt_pck=false 15 | encrypt_directory=false 16 | 17 | [preset.0.options] 18 | 19 | custom_template/debug="" 20 | custom_template/release="" 21 | gradle_build/use_gradle_build=true 22 | gradle_build/export_format=1 23 | gradle_build/min_sdk="" 24 | gradle_build/target_sdk="" 25 | architectures/armeabi-v7a=false 26 | architectures/arm64-v8a=true 27 | architectures/x86=false 28 | architectures/x86_64=false 29 | version/code=1 30 | version/name="" 31 | package/unique_name="com.featurekillers.plugin.android.firebase.analytics.demo" 32 | package/name="" 33 | package/signed=true 34 | package/app_category=2 35 | package/retain_data_on_uninstall=false 36 | package/exclude_from_recents=false 37 | package/show_in_android_tv=false 38 | package/show_in_app_library=true 39 | package/show_as_launcher_app=false 40 | launcher_icons/main_192x192="" 41 | launcher_icons/adaptive_foreground_432x432="" 42 | launcher_icons/adaptive_background_432x432="" 43 | graphics/opengl_debug=false 44 | xr_features/xr_mode=0 45 | screen/immersive_mode=true 46 | screen/support_small=true 47 | screen/support_normal=true 48 | screen/support_large=true 49 | screen/support_xlarge=true 50 | user_data_backup/allow=false 51 | command_line/extra_args="" 52 | apk_expansion/enable=false 53 | apk_expansion/SALT="" 54 | apk_expansion/public_key="" 55 | permissions/custom_permissions=PackedStringArray() 56 | permissions/access_checkin_properties=false 57 | permissions/access_coarse_location=false 58 | permissions/access_fine_location=false 59 | permissions/access_location_extra_commands=false 60 | permissions/access_mock_location=false 61 | permissions/access_network_state=false 62 | permissions/access_surface_flinger=false 63 | permissions/access_wifi_state=false 64 | permissions/account_manager=false 65 | permissions/add_voicemail=false 66 | permissions/authenticate_accounts=false 67 | permissions/battery_stats=false 68 | permissions/bind_accessibility_service=false 69 | permissions/bind_appwidget=false 70 | permissions/bind_device_admin=false 71 | permissions/bind_input_method=false 72 | permissions/bind_nfc_service=false 73 | permissions/bind_notification_listener_service=false 74 | permissions/bind_print_service=false 75 | permissions/bind_remoteviews=false 76 | permissions/bind_text_service=false 77 | permissions/bind_vpn_service=false 78 | permissions/bind_wallpaper=false 79 | permissions/bluetooth=false 80 | permissions/bluetooth_admin=false 81 | permissions/bluetooth_privileged=false 82 | permissions/brick=false 83 | permissions/broadcast_package_removed=false 84 | permissions/broadcast_sms=false 85 | permissions/broadcast_sticky=false 86 | permissions/broadcast_wap_push=false 87 | permissions/call_phone=false 88 | permissions/call_privileged=false 89 | permissions/camera=false 90 | permissions/capture_audio_output=false 91 | permissions/capture_secure_video_output=false 92 | permissions/capture_video_output=false 93 | permissions/change_component_enabled_state=false 94 | permissions/change_configuration=false 95 | permissions/change_network_state=false 96 | permissions/change_wifi_multicast_state=false 97 | permissions/change_wifi_state=false 98 | permissions/clear_app_cache=false 99 | permissions/clear_app_user_data=false 100 | permissions/control_location_updates=false 101 | permissions/delete_cache_files=false 102 | permissions/delete_packages=false 103 | permissions/device_power=false 104 | permissions/diagnostic=false 105 | permissions/disable_keyguard=false 106 | permissions/dump=false 107 | permissions/expand_status_bar=false 108 | permissions/factory_test=false 109 | permissions/flashlight=false 110 | permissions/force_back=false 111 | permissions/get_accounts=false 112 | permissions/get_package_size=false 113 | permissions/get_tasks=false 114 | permissions/get_top_activity_info=false 115 | permissions/global_search=false 116 | permissions/hardware_test=false 117 | permissions/inject_events=false 118 | permissions/install_location_provider=false 119 | permissions/install_packages=false 120 | permissions/install_shortcut=false 121 | permissions/internal_system_window=false 122 | permissions/internet=false 123 | permissions/kill_background_processes=false 124 | permissions/location_hardware=false 125 | permissions/manage_accounts=false 126 | permissions/manage_app_tokens=false 127 | permissions/manage_documents=false 128 | permissions/manage_external_storage=false 129 | permissions/master_clear=false 130 | permissions/media_content_control=false 131 | permissions/modify_audio_settings=false 132 | permissions/modify_phone_state=false 133 | permissions/mount_format_filesystems=false 134 | permissions/mount_unmount_filesystems=false 135 | permissions/nfc=false 136 | permissions/persistent_activity=false 137 | permissions/process_outgoing_calls=false 138 | permissions/read_calendar=false 139 | permissions/read_call_log=false 140 | permissions/read_contacts=false 141 | permissions/read_external_storage=false 142 | permissions/read_frame_buffer=false 143 | permissions/read_history_bookmarks=false 144 | permissions/read_input_state=false 145 | permissions/read_logs=false 146 | permissions/read_phone_state=false 147 | permissions/read_profile=false 148 | permissions/read_sms=false 149 | permissions/read_social_stream=false 150 | permissions/read_sync_settings=false 151 | permissions/read_sync_stats=false 152 | permissions/read_user_dictionary=false 153 | permissions/reboot=false 154 | permissions/receive_boot_completed=false 155 | permissions/receive_mms=false 156 | permissions/receive_sms=false 157 | permissions/receive_wap_push=false 158 | permissions/record_audio=false 159 | permissions/reorder_tasks=false 160 | permissions/restart_packages=false 161 | permissions/send_respond_via_message=false 162 | permissions/send_sms=false 163 | permissions/set_activity_watcher=false 164 | permissions/set_alarm=false 165 | permissions/set_always_finish=false 166 | permissions/set_animation_scale=false 167 | permissions/set_debug_app=false 168 | permissions/set_orientation=false 169 | permissions/set_pointer_speed=false 170 | permissions/set_preferred_applications=false 171 | permissions/set_process_limit=false 172 | permissions/set_time=false 173 | permissions/set_time_zone=false 174 | permissions/set_wallpaper=false 175 | permissions/set_wallpaper_hints=false 176 | permissions/signal_persistent_processes=false 177 | permissions/status_bar=false 178 | permissions/subscribed_feeds_read=false 179 | permissions/subscribed_feeds_write=false 180 | permissions/system_alert_window=false 181 | permissions/transmit_ir=false 182 | permissions/uninstall_shortcut=false 183 | permissions/update_device_stats=false 184 | permissions/use_credentials=false 185 | permissions/use_sip=false 186 | permissions/vibrate=false 187 | permissions/wake_lock=false 188 | permissions/write_apn_settings=false 189 | permissions/write_calendar=false 190 | permissions/write_call_log=false 191 | permissions/write_contacts=false 192 | permissions/write_external_storage=false 193 | permissions/write_gservices=false 194 | permissions/write_history_bookmarks=false 195 | permissions/write_profile=false 196 | permissions/write_secure_settings=false 197 | permissions/write_settings=false 198 | permissions/write_sms=false 199 | permissions/write_social_stream=false 200 | permissions/write_sync_settings=false 201 | permissions/write_user_dictionary=false 202 | -------------------------------------------------------------------------------- /plugin/demo/icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 77 | -------------------------------------------------------------------------------- /plugin/demo/main.gd: -------------------------------------------------------------------------------- 1 | extends Control 2 | 3 | 4 | func _on_Button_pressed(): 5 | FirebaseAnalytics.logEvent("test", 6 | { 7 | "value1": 1, 8 | "value2": "2", 9 | "value3": 0.1 10 | }) 11 | -------------------------------------------------------------------------------- /plugin/demo/main.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://cg3hylang5fxn"] 2 | 3 | [ext_resource type="Script" path="res://main.gd" id="1_j0gfq"] 4 | 5 | [node name="Main" type="Control"] 6 | layout_mode = 3 7 | anchors_preset = 15 8 | anchor_right = 1.0 9 | anchor_bottom = 1.0 10 | grow_horizontal = 2 11 | grow_vertical = 2 12 | script = ExtResource("1_j0gfq") 13 | 14 | [node name="Button" type="Button" parent="."] 15 | layout_mode = 1 16 | anchors_preset = 15 17 | anchor_right = 1.0 18 | anchor_bottom = 1.0 19 | grow_horizontal = 2 20 | grow_vertical = 2 21 | text = "Hello World" 22 | 23 | [connection signal="pressed" from="Button" to="." method="_on_Button_pressed"] 24 | -------------------------------------------------------------------------------- /plugin/demo/project.godot: -------------------------------------------------------------------------------- 1 | ; Engine configuration file. 2 | ; It's best edited using the editor UI and not directly, 3 | ; since the parameters that go here are not all obvious. 4 | ; 5 | ; Format: 6 | ; [section] ; section goes between [] 7 | ; param=value ; assign values to parameters 8 | 9 | config_version=5 10 | 11 | [application] 12 | 13 | config/name="FirebaseAnalyticsDemo" 14 | config/tags=PackedStringArray("addon", "android", "in_use") 15 | run/main_scene="res://main.tscn" 16 | config/features=PackedStringArray("4.2", "GL Compatibility") 17 | config/icon="res://icon.svg" 18 | 19 | [autoload] 20 | 21 | FirebaseAnalytics="*res://addons/FirebaseAnalyticsGodotPlugin/plugin.gd" 22 | 23 | [debug] 24 | 25 | settings/stdout/verbose_stdout=true 26 | 27 | [editor_plugins] 28 | 29 | enabled=PackedStringArray("res://addons/FirebaseAnalyticsGodotPlugin/plugin.cfg") 30 | 31 | [godots] 32 | 33 | version_hint="" 34 | 35 | [rendering] 36 | 37 | renderer/rendering_method="gl_compatibility" 38 | renderer/rendering_method.mobile="gl_compatibility" 39 | textures/vram_compression/import_etc2_astc=true 40 | -------------------------------------------------------------------------------- /plugin/export_scripts_template/export_plugin.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | class_name FirebaseAnalyticsEditorPlugin 3 | extends EditorPlugin 4 | 5 | # A class member to hold the editor export plugin during its lifecycle. 6 | var export_plugin : AndroidExportPlugin 7 | const FIREBASE_DEPENDENCIES := """\n \ 8 | //Firebase dependencies\n \ 9 | implementation platform("com.google.firebase:firebase-bom:33.3.0")\n \ 10 | implementation "com.google.firebase:firebase-analytics"\n \ 11 | implementation "com.google.android.gms:play-services-measurement-api:22.1.0" 12 | """ 13 | const FIREBASE_PLUGINS := """\n \ 14 | //Firebase plugins\n \ 15 | id 'com.google.gms.google-services' 16 | """ 17 | const FIREBASE_PLUGINS_ROOT := """\n \ 18 | //Firebase plugins\n \ 19 | id 'com.google.gms.google-services' version '4.4.2' apply false 20 | """ 21 | 22 | 23 | func _enter_tree(): 24 | # Initialization of the plugin goes here. 25 | export_plugin = AndroidExportPlugin.new() 26 | add_export_plugin(export_plugin) 27 | add_autoload_singleton("FirebaseAnalytics", "plugin.gd") 28 | 29 | 30 | func _exit_tree(): 31 | # Clean-up of the plugin goes here. 32 | remove_export_plugin(export_plugin) 33 | remove_autoload_singleton("FirebaseAnalytics") 34 | export_plugin = null 35 | 36 | 37 | func _disable_plugin() -> void: 38 | _cleanup_plugin() 39 | 40 | static func _cleanup_plugin() -> void: 41 | if FileAccess.file_exists("res://android/build/build.gradle"): 42 | var file := FileAccess.open("res://android/build/build.gradle", FileAccess.READ) 43 | var file_text := file.get_as_text() 44 | file.close() 45 | file_text = file_text.replace(FIREBASE_PLUGINS, "").replace(FIREBASE_DEPENDENCIES, "") 46 | file = FileAccess.open("res://android/build/build.gradle", FileAccess.WRITE) 47 | file.store_string(file_text) 48 | file.close() 49 | 50 | if FileAccess.file_exists("res://android/build/settings.gradle"): 51 | var file := FileAccess.open("res://android/build/settings.gradle", FileAccess.READ) 52 | var file_text := file.get_as_text() 53 | file.close() 54 | file_text = file_text.replace(FIREBASE_PLUGINS_ROOT, "") 55 | file = FileAccess.open("res://android/build/settings.gradle", FileAccess.WRITE) 56 | file.store_string(file_text) 57 | file.close() 58 | 59 | 60 | class AndroidExportPlugin extends EditorExportPlugin: 61 | var _plugin_name = "FirebaseAnalyticsGodotPlugin" 62 | 63 | func _export_begin(features: PackedStringArray, is_debug: bool, path: String, flags: int) -> void: 64 | if features.has("android"): 65 | if not get_option("gradle_build/use_gradle_build")\ 66 | or not FileAccess.file_exists("res://android/build/google-services.json"): 67 | FirebaseAnalyticsEditorPlugin._cleanup_plugin() 68 | return 69 | var file := FileAccess.open("res://android/build/build.gradle", FileAccess.READ) 70 | var file_text := file.get_as_text() 71 | file.close() 72 | var replace_file := false 73 | if not "//Firebase dependencies" in file_text: 74 | file_text = file_text.replace("implementation \"androidx.fragment:fragment:$versions.fragmentVersion\"\n", 75 | "implementation \"androidx.fragment:fragment:$versions.fragmentVersion\"\n" + FIREBASE_DEPENDENCIES) 76 | replace_file = true 77 | if not file_text.contains("//Firebase plugins"): 78 | file_text = file_text.replace("id 'org.jetbrains.kotlin.android'\n", 79 | "id 'org.jetbrains.kotlin.android'\n" + FIREBASE_PLUGINS) 80 | replace_file = true 81 | if replace_file: 82 | file = FileAccess.open("res://android/build/build.gradle", FileAccess.WRITE) 83 | file.store_string(file_text) 84 | file.close() 85 | 86 | file = FileAccess.open("res://android/build/settings.gradle", FileAccess.READ) 87 | file_text = file.get_as_text() 88 | file.close() 89 | replace_file = false 90 | if not file_text.contains("//Firebase plugins"): 91 | file_text = file_text.replace( 92 | "id 'org.jetbrains.kotlin.android' version versions.kotlinVersion\n", 93 | "id 'org.jetbrains.kotlin.android' version versions.kotlinVersion\n" 94 | + FIREBASE_PLUGINS_ROOT) 95 | replace_file = true 96 | if replace_file: 97 | file = FileAccess.open("res://android/build/settings.gradle", FileAccess.WRITE) 98 | file.store_string(file_text) 99 | file.close() 100 | 101 | 102 | func _supports_platform(platform): 103 | if platform is EditorExportPlatformAndroid: 104 | if not get_option("gradle_build/use_gradle_build"): 105 | push_warning("Firebase Analytics not added cause you don't use grudle build") 106 | return false 107 | if not FileAccess.file_exists("res://android/build/google-services.json"): 108 | push_warning("Firebase Analytics not added cause file res://android/build/google-services.json not founded") 109 | return false 110 | return true 111 | return false 112 | 113 | 114 | func _get_android_libraries(platform, debug): 115 | if debug: 116 | return PackedStringArray([_plugin_name + "/bin/debug/" + _plugin_name + "-debug.aar"]) 117 | else: 118 | return PackedStringArray([_plugin_name + "/bin/release/" + _plugin_name + "-release.aar"]) 119 | 120 | 121 | func _get_name(): 122 | return _plugin_name 123 | -------------------------------------------------------------------------------- /plugin/export_scripts_template/plugin.cfg: -------------------------------------------------------------------------------- 1 | [plugin] 2 | 3 | name="FirebaseAnalyticsGodotPlugin" 4 | description="FirebaseAnalyticsGodotPlugin" 5 | author="FeatureKillers" 6 | version="1.3" 7 | script="export_plugin.gd" 8 | -------------------------------------------------------------------------------- /plugin/export_scripts_template/plugin.gd: -------------------------------------------------------------------------------- 1 | extends Node 2 | 3 | var _plugin_name = "FirebaseAnalyticsGodotPlugin" 4 | var _singleton: Object 5 | 6 | 7 | func _ready() -> void: 8 | if Engine.has_singleton(_plugin_name): 9 | _singleton = Engine.get_singleton(_plugin_name) 10 | else: 11 | push_warning("Couldn't find " + _plugin_name) 12 | 13 | 14 | func logEvent(event: String, params: Dictionary) -> void: 15 | if _singleton: 16 | _singleton.logEvent(event, params) 17 | 18 | ## https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event 19 | class Event: 20 | const ADD_PAYMENT_INFO = "add_payment_info" 21 | const ADD_SHIPPING_INFO = "add_shipping_info" 22 | const ADD_TO_CART = "add_to_cart" 23 | const ADD_TO_WISHLIST = "add_to_wishlist" 24 | const AD_IMPRESSION = "ad_impression" 25 | const APP_OPEN = "app_open" 26 | const BEGIN_CHECKOUT = "begin_checkout" 27 | const CAMPAIGN_DETAILS = "campaign_details" 28 | const EARN_VIRTUAL_CURRENCY = "earn_virtual_currency" 29 | const GENERATE_LEAD = "generate_lead" 30 | const LEVEL_END = "level_end" 31 | const LEVEL_START = "level_start" 32 | const LEVEL_UP = "level_up" 33 | const LOGIN = "login" 34 | const POST_SCORE = "post_score" 35 | const PURCHASE = "purchase" 36 | const REFUND = "refund" 37 | const REMOVE_FROM_CART = "remove_from_cart" 38 | const SCREEN_VIEW = "screen_view" 39 | const SEARCH = "search" 40 | const SELECT_CONTENT = "select_content" 41 | const SELECT_ITEM = "select_item" 42 | const SELECT_PROMOTION = "select_promotion" 43 | const SHARE = "share" 44 | const SIGN_UP = "sign_up" 45 | const SPEND_VIRTUAL_CURRENCY = "spend_virtual_currency" 46 | const TUTORIAL_BEGIN = "tutorial_begin" 47 | const TUTORIAL_COMPLETE = "tutorial_complete" 48 | const UNLOCK_ACHIEVEMENT = "unlock_achievement" 49 | const VIEW_CART = "view_cart" 50 | const VIEW_ITEM = "view_item" 51 | const VIEW_ITEM_LIST = "view_item_list" 52 | const VIEW_PROMOTION = "view_promotion" 53 | const VIEW_SEARCH_RESULTS = "view_search_results" 54 | 55 | ## https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Param 56 | class Param: 57 | const ACHIEVEMENT_ID = "achievement_id" 58 | const ACLID = "aclid" 59 | const AD_FORMAT = "ad_format" 60 | const AD_PLATFORM = "ad_platform" 61 | const AD_SOURCE = "ad_source" 62 | const AD_UNIT_NAME = "ad_unit_name" 63 | const AFFILIATION = "affiliation" 64 | const CAMPAIGN = "campaign" 65 | const CAMPAIGN_ID = "campaign_id" 66 | const CHARACTER = "character" 67 | const CONTENT = "content" 68 | const CONTENT_TYPE = "content_type" 69 | const COUPON = "coupon" 70 | const CP1 = "cp1" 71 | const CREATIVE_FORMAT = "creative_format" 72 | const CREATIVE_NAME = "creative_name" 73 | const CREATIVE_SLOT = "creative_slot" 74 | const CURRENCY = "currency" 75 | const DESTINATION = "destination" 76 | const DISCOUNT = "discount" 77 | const END_DATE = "end_date" 78 | const EXTEND_SESSION = "extend_session" 79 | const FLIGHT_NUMBER = "flight_number" 80 | const GROUP_ID = "group_id" 81 | const INDEX = "index" 82 | const ITEMS = "items" 83 | const ITEM_BRAND = "item_brand" 84 | const ITEM_CATEGORY = "item_category" 85 | const ITEM_CATEGORY2 = "item_category2" 86 | const ITEM_CATEGORY3 = "item_category3" 87 | const ITEM_CATEGORY4 = "item_category4" 88 | const ITEM_CATEGORY5 = "item_category5" 89 | const ITEM_ID = "item_id" 90 | const ITEM_LIST_ID = "item_list_id" 91 | const ITEM_LIST_NAME = "item_list_name" 92 | const ITEM_NAME = "item_name" 93 | const ITEM_VARIANT = "item_variant" 94 | const LEVEL = "level" 95 | const LEVEL_NAME = "level_name" 96 | const LOCATION = "location" 97 | const LOCATION_ID = "location_id" 98 | const MARKETING_TACTIC = "marketing_tactic" 99 | const MEDIUM = "medium" 100 | const METHOD = "method" 101 | const NUMBER_OF_NIGHTS = "number_of_nights" 102 | const NUMBER_OF_PASSENGERS = "number_of_passengers" 103 | const NUMBER_OF_ROOMS = "number_of_rooms" 104 | const ORIGIN = "origin" 105 | const PAYMENT_TYPE = "payment_type" 106 | const PRICE = "price" 107 | const PROMOTION_ID = "promotion_id" 108 | const PROMOTION_NAME = "promotion_name" 109 | const QUANTITY = "quantity" 110 | const SCORE = "score" 111 | const SCREEN_CLASS = "screen_class" 112 | const SCREEN_NAME = "screen_name" 113 | const SEARCH_TERM = "search_term" 114 | const SHIPPING = "shipping" 115 | const SHIPPING_TIER = "shipping_tier" 116 | const SOURCE = "source" 117 | const SOURCE_PLATFORM = "source_platform" 118 | const START_DATE = "start_date" 119 | const SUCCESS = "success" 120 | const TAX = "tax" 121 | const TERM = "term" 122 | const TRANSACTION_ID = "transaction_id" 123 | const TRAVEL_CLASS = "travel_class" 124 | const VALUE = "value" 125 | const VIRTUAL_CURRENCY_NAME = "virtual_currency_name" 126 | -------------------------------------------------------------------------------- /plugin/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 16 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /plugin/src/main/java/com/featurekillers/plugin/android/firebase/analytics/GodotAndroidPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.featurekillers.plugin.android.firebase.analytics 2 | 3 | import android.app.Activity 4 | import android.view.View 5 | import org.godotengine.godot.Godot 6 | import org.godotengine.godot.plugin.GodotPlugin 7 | import org.godotengine.godot.plugin.UsedByGodot 8 | import com.google.firebase.analytics.FirebaseAnalytics 9 | import com.google.firebase.analytics.ktx.analytics 10 | import com.google.firebase.analytics.logEvent 11 | import com.google.firebase.ktx.Firebase 12 | import org.godotengine.godot.Dictionary 13 | 14 | class GodotAndroidPlugin(godot: Godot): GodotPlugin(godot) { 15 | 16 | override fun getPluginName() = BuildConfig.GODOT_PLUGIN_NAME 17 | private lateinit var firebaseAnalytics: FirebaseAnalytics 18 | 19 | override fun onMainCreate(activity: Activity?): View? { 20 | // Obtain the FirebaseAnalytics instance. 21 | firebaseAnalytics = Firebase.analytics 22 | return super.onMainCreate(activity) 23 | } 24 | 25 | @UsedByGodot 26 | private fun logEvent(event: String, params: Dictionary) { 27 | firebaseAnalytics.logEvent(event) { 28 | for (i in params){ 29 | when (val value: Any = i.value as Any) { 30 | is Long -> { 31 | param(i.key, value) 32 | } 33 | 34 | is Int -> { 35 | param(i.key, value.toLong()) 36 | } 37 | 38 | is String -> { 39 | param(i.key, value) 40 | } 41 | 42 | is Double -> { 43 | param(i.key, value) 44 | } 45 | } 46 | } 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | gradlePluginPortal() 6 | } 7 | } 8 | dependencyResolutionManagement { 9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 10 | repositories { 11 | google() 12 | mavenCentral() 13 | maven("https://plugins.gradle.org/m2/") 14 | maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") 15 | } 16 | } 17 | 18 | rootProject.name = "FirebaseAnalyticsGodotPlugin" 19 | include(":plugin") 20 | --------------------------------------------------------------------------------