diff --git a/docs/Gemfile b/docs/Gemfile deleted file mode 100644 index 37f5eaa..0000000 --- a/docs/Gemfile +++ /dev/null @@ -1,2 +0,0 @@ -source 'https://rubygems.org' -gem 'github-pages', group: :jekyll_plugins diff --git a/docs/_includes/api_ref.md b/docs/_includes/api_ref.md new file mode 100644 index 0000000..dcce1ff --- /dev/null +++ b/docs/_includes/api_ref.md @@ -0,0 +1,112 @@ +## Modules +{% for item in site.data.api %} +### {{ item.name }} +{{ item.desc }} +{% endfor %} + +## Enums + + +{% for module in site.data.api %} + {% for item in module.members %} + {% if item.type contains 'number' %} + + + + + + {% endif %} + {% endfor %} +{% endfor %} + +
{{ module.name }}.{{ item.name }}{{ item.desc | markdownify | replace: "[icon:attention]","

⚠️"}}
+ +
+ +## Functions + + +{% for module in site.data.api %} + {% for item in module.members %} + {% if item.type contains 'function' %} + + + + + {% endif %} + {% endfor %} +{% endfor %} + +
{{ module.name }}.{{ item.name }}(){{ item.desc | truncate: 80 }}
+ +{% for module in site.data.api %} + {% for function in module.members %} + {% if function.type contains 'function' %} +
+

{{ module.name }}.{{ function.name }}({% for param in function.parameters %}{{param.name}}{% unless forloop.last %}, {% endunless %}{% endfor %})

+{% if function.parameters %} + + + + + + + + + + {% for param in function.parameters %} + + + + + + {% endfor %} + +
ParameterTypeDescription
+ {{ param.name }} + {% if param.optional %} + (optional) + {% endif %} + {{ param.type }}{{ param.desc | markdownify }} + {% if param.type == "function" %} + {% include type-function.md params=param.parameters %} + {% endif %} + {% if param.type == "table" %} + {% include type-table.md fields=param.members %} + {% endif %} +
+{% endif %} +{% if function.returns %} + + + + + + + + + +

Returns

+ {% for return in function.returns %} + + + + + + {% endfor %} + +
Return valueTypeDescription
{{ return.name }}{{ return.type }}{{ return.desc | markdownify }}
+{% endif %} +{{ function.desc | markdownify | replace: "[icon:attention]","

⚠️" | replace: "[type:string]","string" | replace: "[type:number]","number" | replace: "[type:table]","table" | markdownify}} + +{% if function.examples %} +

Examples

+{% for example in function.examples %} +{{ example.desc | markdownify }} +{% endfor %} +{% endif %} +
+ + {% endif %} + {% endfor %} +{% endfor %} diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 4b09cee..0255072 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -4,62 +4,18 @@ - - - + + + {{ site.title }} - +
-
-

Defold Google Play Game Services API documentation

-

This extension provides functions for interacting with Google Play Game Services.

- -

Platforms

-

The extension is only supported for Android.

- -

Source code

-

The source code can be viewed at: https://github.com/defold/extension-gpgs

- -

Google App Setup

-

In order to use Google Play Game Services your application needs to be added to the Google Play store. It doesn't have to be published but it must be registered. Read more about how to sign up for and use the Google Play store in the official documentation.

- -

Once the application is registered you also need to enable Google Play Game Services for the application. Follow the official documentation to enable Google Play Game Services.

- -

Defold setup

-

To use this library in your Defold project, add the following URL to your game.project dependencies: -

https://github.com/defold/extension-gpgs/archive/master.zip
-

- -

We recommend using a link to a zip file of a specific release.

- -

- Starting Defold 1.2.162 this extension has one more dependency: -

https://github.com/defold/extension-gps
- Check `game.project` of the release you are using to figure out the appropriate release of `extension-gps`. -

- -

game.project

-

Add the following section into your game.project file: -

- - [gpgs] -
app_id = 1234567890 -
use_saved_games = 1 -
-

Where app_id is the 12 or 13 digit Application ID from the Google Play Console, found under Development Tools > Services & APIs and Google Play game services.

-

Where use_saved_games indicates if the Game Saves service should be used (0 is disabled, 1 is enabled).

- -
-
-
-

API

-
+
{{ content }} -
diff --git a/docs/fonts.css b/docs/css/fonts.css similarity index 100% rename from docs/fonts.css rename to docs/css/fonts.css diff --git a/docs/rouge.css b/docs/css/rouge.css similarity index 100% rename from docs/rouge.css rename to docs/css/rouge.css diff --git a/docs/style.css b/docs/css/style.css similarity index 100% rename from docs/style.css rename to docs/css/style.css diff --git a/docs/fonts/Noto-Sans-700/Noto-Sans-700.eot b/docs/fonts/Noto-Sans-700/Noto-Sans-700.eot old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700/Noto-Sans-700.svg b/docs/fonts/Noto-Sans-700/Noto-Sans-700.svg old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700/Noto-Sans-700.ttf b/docs/fonts/Noto-Sans-700/Noto-Sans-700.ttf old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700/Noto-Sans-700.woff b/docs/fonts/Noto-Sans-700/Noto-Sans-700.woff old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700/Noto-Sans-700.woff2 b/docs/fonts/Noto-Sans-700/Noto-Sans-700.woff2 old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.eot b/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.eot old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.svg b/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.svg old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.ttf b/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.ttf old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff b/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff2 b/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff2 old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.eot b/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.eot old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.svg b/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.svg old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.ttf b/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.ttf old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.woff b/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.woff old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.woff2 b/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.woff2 old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.eot b/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.eot old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.svg b/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.svg old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.ttf b/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.ttf old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.woff b/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.woff old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.woff2 b/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.woff2 old mode 100755 new mode 100644 diff --git a/docs/index.md b/docs/index.md index d40d62a..cff5c54 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,115 +1,50 @@ --- layout: default --- -## Modules -{% for item in site.data.api %} -### {{ item.name }} -{{ item.desc }} -{% endfor %} - -## Enums - - -{% for module in site.data.api %} - {% for item in module.members %} - {% if item.type contains 'number' %} - - - - - - {% endif %} - {% endfor %} -{% endfor %} - -
{{ module.name }}.{{ item.name }}{{ item.desc | markdownify | replace: "[icon:attention]","

⚠️"}}
- -
- -## Functions - - -{% for module in site.data.api %} - {% for item in module.members %} - {% if item.type contains 'function' %} - - - - - {% endif %} - {% endfor %} -{% endfor %} - -
{{ module.name }}.{{ item.name }}(){{ item.desc | truncate: 80 }}
- -{% for module in site.data.api %} - {% for function in module.members %} - {% if function.type contains 'function' %} -
-

{{ module.name }}.{{ function.name }}({% for param in function.parameters %}{{param.name}}{% unless forloop.last %}, {% endunless %}{% endfor %})

-{% if function.parameters %} - - - - - - - - - - {% for param in function.parameters %} - - - - - - {% endfor %} - -
ParameterTypeDescription
- {{ param.name }} - {% if param.optional %} - (optional) - {% endif %} - {{ param.type }}{{ param.desc | markdownify }} - {% if param.type == "function" %} - {% include type-function.md params=param.parameters %} - {% endif %} - {% if param.type == "table" %} - {% include type-table.md fields=param.members %} - {% endif %} -
-{% endif %} -{% if function.returns %} - - - - - - - - - -

Returns

- {% for return in function.returns %} - - - - - - {% endfor %} - -
Return valueTypeDescription
{{ return.name }}{{ return.type }}{{ return.desc | markdownify }}
-{% endif %} -{{ function.desc | markdownify | replace: "[icon:attention]","

⚠️" | replace: "[type:string]","string" | replace: "[type:number]","number" | replace: "[type:table]","table" | markdownify}} - -{% if function.examples %} -

Examples

-{% for example in function.examples %} -{{ example.desc | markdownify }} -{% endfor %} -{% endif %} -
- - {% endif %} - {% endfor %} -{% endfor %} + +# Defold Google Play Game Services API documentation + +This extension provides functions for interacting with Google Play Game Services. Supported on Android. + +# Usage +To use this library in your Defold project, add the following URL to your game.project dependencies: + + https://github.com/defold/extension-gpgs/archive/master.zip + +We recommend using a link to a zip file of a [https://github.com/defold/extension-gpgs/releases](specific release). + +# Dependencies + +The extension has the following dependencies: + + https://github.com/defold/android-base-extensions/releases/download/1.0.0/gps-games-17.0.0.zip + https://github.com/defold/android-base-extensions/releases/download/1.0.0/gps-base-16.1.0.zip + https://github.com/defold/android-base-extensions/releases/download/1.0.0/support-v4-27.0.2.zip + +## Google App Setup +In order to use Google Play Game Services your application needs to be added to the Google Play store. It doesn't have to be published but it must be registered. Read more about how to sign up for and use the Google Play store in [https://support.google.com/googleplay/android-developer/answer/6112435](the official documentation). + +Once the application is registered you also need to enable Google Play Game Services for the application. Follow the official documentation to [https://developers.google.com/games/services/console/enabling](enable Google Play Game Services). + +## Defold Setup + +### game.project +Add the following section into your game.project file: + + [gpgs] + app_id = 1234567890 + use_saved_games = 1 + +Where `app_id` is the 12 or 13 digit Application ID from the Google Play Console, found under Development Tools > Services & APIs and Google Play game services.

+ +Where `use_saved_games` indicates if the [https://developers.google.com/games/services/common/concepts/savedgames](Game Saves service) should be used (0 is disabled, 1 is enabled).

+ + +## Source code + +The source code is available on [GitHub](https://github.com/defold/extension-gpgs) + + +# API reference + +{% include api_ref.md %} diff --git a/game.project b/game.project index 072a467..09ce5a3 100644 --- a/game.project +++ b/game.project @@ -1,7 +1,7 @@ [project] title = GPGS version = 0.2 -dependencies = https://github.com/andsve/dirtylarry/archive/master.zip,https://github.com/britzl/defold-screenshot/archive/master.zip,https://github.com/defold/extension-gps/archive/master.zip +dependencies = https://github.com/andsve/dirtylarry/archive/master.zip,https://github.com/britzl/defold-screenshot/archive/master.zip,https://github.com/defold/android-base-extensions/releases/download/1.0.0/gps-base-16.1.0.zip,https://github.com/defold/android-base-extensions/releases/download/1.0.0/support-v4-27.0.2.zip,https://github.com/defold/android-base-extensions/releases/download/1.0.0/gps-games-17.0.0.zip [bootstrap] main_collection = /main/main.collectionc @@ -36,3 +36,4 @@ request_id_token = 0 [library] include_dirs = gpgs + diff --git a/gpgs/lib/android/com-google-android-gms-play-services-auth-16.0.0.jar b/gpgs/lib/android/com-google-android-gms-play-services-auth-16.0.0.jar deleted file mode 100644 index ecf1f6e..0000000 Binary files a/gpgs/lib/android/com-google-android-gms-play-services-auth-16.0.0.jar and /dev/null differ diff --git a/gpgs/lib/android/com-google-android-gms-play-services-auth-api-phone-15.0.1.jar b/gpgs/lib/android/com-google-android-gms-play-services-auth-api-phone-15.0.1.jar deleted file mode 100644 index f34a79c..0000000 Binary files a/gpgs/lib/android/com-google-android-gms-play-services-auth-api-phone-15.0.1.jar and /dev/null differ diff --git a/gpgs/lib/android/com-google-android-gms-play-services-auth-base-15.1.0.jar b/gpgs/lib/android/com-google-android-gms-play-services-auth-base-15.1.0.jar deleted file mode 100644 index 7adf1a4..0000000 Binary files a/gpgs/lib/android/com-google-android-gms-play-services-auth-base-15.1.0.jar and /dev/null differ diff --git a/gpgs/lib/android/com-google-android-gms-play-services-drive-16.0.0.jar b/gpgs/lib/android/com-google-android-gms-play-services-drive-16.0.0.jar deleted file mode 100644 index a12224b..0000000 Binary files a/gpgs/lib/android/com-google-android-gms-play-services-drive-16.0.0.jar and /dev/null differ diff --git a/gpgs/lib/android/com-google-android-gms-play-services-games-17.0.0.jar b/gpgs/lib/android/com-google-android-gms-play-services-games-17.0.0.jar deleted file mode 100644 index 48c375c..0000000 Binary files a/gpgs/lib/android/com-google-android-gms-play-services-games-17.0.0.jar and /dev/null differ diff --git a/gpgs/manifests/android/AndroidManifest.xml b/gpgs/manifests/android/AndroidManifest.xml index fb78f9a..3d6c18e 100644 --- a/gpgs/manifests/android/AndroidManifest.xml +++ b/gpgs/manifests/android/AndroidManifest.xml @@ -3,11 +3,6 @@ package="{{android.package}}"> - - - - - - - + + + diff --git a/gpgs/res/android/res/com-google-android-gms-play-services-auth-16.0.0/drawable-watch-v20/common_google_signin_btn_text_dark_normal.xml b/gpgs/res/android/res/com-google-android-gms-play-services-auth-16.0.0/drawable-watch-v20/common_google_signin_btn_text_dark_normal.xml deleted file mode 100644 index 1bcab73..0000000 --- a/gpgs/res/android/res/com-google-android-gms-play-services-auth-16.0.0/drawable-watch-v20/common_google_signin_btn_text_dark_normal.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/gpgs/res/android/res/com-google-android-gms-play-services-auth-16.0.0/drawable-watch-v20/common_google_signin_btn_text_disabled.xml b/gpgs/res/android/res/com-google-android-gms-play-services-auth-16.0.0/drawable-watch-v20/common_google_signin_btn_text_disabled.xml deleted file mode 100644 index 806781f..0000000 --- a/gpgs/res/android/res/com-google-android-gms-play-services-auth-16.0.0/drawable-watch-v20/common_google_signin_btn_text_disabled.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - diff --git a/gpgs/res/android/res/com-google-android-gms-play-services-auth-16.0.0/drawable-watch-v20/common_google_signin_btn_text_light_normal.xml b/gpgs/res/android/res/com-google-android-gms-play-services-auth-16.0.0/drawable-watch-v20/common_google_signin_btn_text_light_normal.xml deleted file mode 100644 index 6fc4061..0000000 --- a/gpgs/res/android/res/com-google-android-gms-play-services-auth-16.0.0/drawable-watch-v20/common_google_signin_btn_text_light_normal.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/gpgs/res/android/res/com-google-android-gms-play-services-auth-16.0.0/values-watch-v20/com-google-android-gms-values.xml b/gpgs/res/android/res/com-google-android-gms-play-services-auth-16.0.0/values-watch-v20/com-google-android-gms-values.xml deleted file mode 100644 index 6a65c5a..0000000 --- a/gpgs/res/android/res/com-google-android-gms-play-services-auth-16.0.0/values-watch-v20/com-google-android-gms-values.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - -#90000000 -#1F000000 -#90000000 -#DE000000 -@android:color/white -#DEFFFFFF -@android:color/black -#DEFFFFFF - \ No newline at end of file