Skip to content

Gradle class generator

javier7ar edited this page Aug 30, 2017 · 3 revisions

Using gradle class generator

  1. Create a JSON file named SamplersConfig.json

    • Format and options available are in the wiki
    • To check for sintax problems you can use this JSON validador
    • You can use this example SamplersConfig.json file (don't forget to change the app_path and package_name on project section with the application path and package name of your application, the networkConfiguration to successfully send samples, and your Google Maps API KEY if you want to use Location and Maps services)
  2. Copy your created JSON file SamplersConfig.json to the root directory of your Android Studio project

  3. Download the latest samplers.gradle and samplersclassgenerator.jar files from realeases and and copy them to the root directory of your Android Studio project

  4. Link samplers.gradle with your application build.gradle (it will create MyMainSamplersActivity in your project)

    • On your application build.gradle add this line at the end
      apply from: '../samplers.gradle'
    • Save and Sync when asked
  5. Delete (or customize) the auto-generated style.xml file in the res/values directory

  6. Run your application

  7. Enjoy!

Clone this wiki locally