Giter VIP home page Giter VIP logo

godot-android-plugin-firebase's Introduction

Godot (3.2.2) Android plugin for Firebase

This is the updated version of godot-android-module-firebase for the new Godot (3.2.2) Android plugin system (v1).

For the general documentation look there.

Steps to add this plugin to your Godot project are as follows:

  • Open your project in Godot
  • Install Export Templates if necessary
  • Install Android build template
  • Download from this repository's downloads directory both Firebase.release.aar and Firebase.release.gdpa and copy them to [GODOT-PROJECT]/android/plugins/
  • Download from this repository's downloads directory godot-firebase-config.json and copy it to [GODOT-PROJECT]/android/build/assets (create the directory if necessary) and edit it to match your settings (especially AdMob App ID and ad unit IDs)
  • Download your project's google-services.json from Firebase Console and copy it to [GODOT-PROJECT]/android/build/
  • Edit [GODOT-PROJECT]/android/build/build.gradle:
    • add classpath 'com.google.gms:google-services:4.3.3' above the line //CHUNK_BUILDSCRIPT_DEPENDENCIES_BEGIN
    • add apply plugin: 'com.google.gms.google-services' above the line //CHUNK_GLOBAL_BEGIN
    • optional (for Authentication): search for buildTypes.all { and add to this block: resValue "string", "server_client_id", "project-123456..." where project-123456... is the public-facing name of your Firebase project
  • Edit [GODOT-PROJECT]/android/build/AndroidManifest.xml:
    • add the following above the line <!--CHUNK_APPLICATION_BEGIN--> and do not forget to set your AdMob App Id

      <meta-data
          android:name="com.google.android.gms.ads.APPLICATION_ID"
          android:value="ca-app-pub-ADMOB_APP_ID"/>
      
  • Edit [GODOT-PROJECT]/android/build/config.gradle and set minSdk to 21 (otherwise a gradle build error occurs: Number of method references cannot exceed 64K)
  • In Godot select menu Project > Export, add Android and edit your settings (package unique name, keystores, etc.) and select under Custom Template: Use Custom Build and also under Plugins: Firebase.

That should be it!

Steps to build .aar from this project:

After checking out this project open Android Studio and start an empty Android project (with no activity, minimum SDK 21). Then select menu File > New > Import module and import this project as a module. In the Android Studio's terminal you can then run:

  • gradlew clean
  • gradlew build

When finished the .aar for both debug and release can be found here: build/outputs/aar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.