Migration from legacy Android Gradle Plugin

The Respresso Gradle Plugin for Android is now deprecated in favor of the new Respresso CLI. The new CLI brings unified sync experience and configuration options for all major desktop platforms.

The Gradle Plugin for Android is now deprecated, thus we don't support it anymore. Although, it currently works as before it won't get any updates or fixes in the future. We highly recommend you to transition your projects to the new CLI as soon as possible.

Migration steps

  1. Install the new Respresso CLI on all the machines you want to use to sync resource files.
  2. Remove the classpath "hu.ponte.respresso:client-android:1.0.0" line from your top level build.gradle file. (You will find it at buildscript.dependencies)
  3. Remove the Gradle Plugin from your app/module level build.gradle. This includes the apply plugin: "hu.ponte.respresso" line and the respresso { ... } config block. The config's content will be required for the next step.
  4. Run respresso init --token <projectToken value from the respresso block> in the module's root directory, next to the build.gradle. This will create the respresso.json config file. If you used Respresso's version manager, you might need to change the versions in the new config file.
  5. Run respresso sync. This will create the respresso.lock file. If your resources were out-of-date you might need to confirm override of some files.
  6. Add the following snippet to your app/module level build.gradle:
task respressoSync(type: Exec) {
  commandLine 'respresso', 'sync'
}
preBuild.dependsOn respressoSync

For other Gradle setups, see the Android Gradle Sync page

The new respresso.json should be added to VCS (like Git) and the respresso.lock should be ignored. Similarly, we recommend you to change the localGitIgnore option in the respresso.json to true. For details, see the get started page of the Respresso CLI.