Smarty Blog

2019.11.06 - Support for AndroidX

Smarty Unity SDK v1.5.2 is using AndroidX libraries instead of deprecated Android Support libraries.

To make sure everything is working properly please do the following steps:

  1. Open Unity Player Settings pane (Edit  Project Settings  Player)

    1. Switch to Android tab Unity Editor Player Settings for Android Icon

      1. Under Publishing Settings  Build

        1. Enable Custom Gradle Template

  2. Open Play Services Resolver Android Settings dialog (Assets  Play Services Resolver  Android  Settings)

    1. Make sure that the following settings are enabled:

      • Use Gradle Daemon

      • Patch mainTemplate.gradle

      • Use Jetifier

2019.04.08 - New way of uploading bot extension

Bot extension uploading has changed:

  • we are migrating to Amazon WebServices and all bot extensions will be uploaded to Amazon S3 soon

  • we’ve created a dedicated Smarty Bot Extension gradle plugin that will help with bot extension uploading

Bot extension project migration guide

  1. Make sure you are using IntelliJ IDEA IDE for your bot extension project.

  2. Open main build.gralde file and remove the following dependencies:

    dependencies {
        classpath 'org.apache.httpcomponents:httpclient:4.5.5'
        classpath 'org.apache.httpcomponents:httpmime:4.5.2'
        classpath 'org.apache.httpcomponents:httpcore:4.4.9'
    }
  3. Open bot-extension/build.gradle file and remove the following tasks and functions definitions

    task deployDevelopmentBotExtension(dependsOn: build) { ... }
    task deployProductionBotExtension(dependsOn: build) { ... }
    def uploadExtension(String uri, String userName, String password) { ... }
    def uploadFile(String uri, String userName, String password, String uriPath, File file) { ... }

    and all the surrounding now unneeded import statements.

  4. Add smarty plugin repository declaration at the top of settings.gradle file:

    pluginManagement {
        repositories {
            maven { url 'https://smarty.lite-games.com/repository/public' }
        }
    }
  5. Declare smarty-bot-extension plugin in build.gradle

    plugins {
        id 'com.litegames.smarty-bot-extension' version '0.0.1'
    }
  6. Configure smarty bot extension deployment like below:

    smartyBotExtension {
        deploy {
            files {
                extension {
                    src jar.archivePath
                    dst "<<ProjectName>>BotExtension.jar"
                }
            }
    
            target(com.litegames.smarty.bot.extension.config.api.deploy.AwsTarget) {
                uri "s3://smarty-bots-repository/<<ProjectShortName>>"
                accessKey project.properties["<<ProjectShortName>>.botserver.accesskey"]
                secretKey project.properties["<<ProjectShortName>>.botserver.secretkey"]
            }
        }
    }
  7. Put deploy target credentials in ~/.gradle/gradle.properties:

    <<ProjectShortName>>.botserver.accesskey=ACCESSKEY
    <<ProjectShortName>>.botserver.secretkey=SECRETKEY
  8. Contact us to receive deployment uri, accessKey and secretKey

  9. For more insight, check Smarty Alpha Bot Extension example project.

    • You can also check how migration did affect Smarty Alpha Bot Extension example project configuration here

  10. In case of any problems please check Smarty Bot Extension Plugin Troubleshooting section.