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
- Install the new Respresso CLI on all the machines you want to use to sync resource files.
- Remove the
classpath "hu.ponte.respresso:client-android:1.0.0"
line from your top levelbuild.gradle
file. (You will find it atbuildscript.dependencies
) - Remove the Gradle Plugin from your app/module level
build.gradle
. This includes theapply plugin: "hu.ponte.respresso"
line and therespresso { ... }
config block. The config's content will be required for the next step. - Run
respresso init --token <projectToken value from the respresso block>
in the module's root directory, next to thebuild.gradle
. This will create therespresso.json
config file. If you used Respresso's version manager, you might need to change the versions in the new config file. - Run
respresso sync
. This will create therespresso.lock
file. If your resources were out-of-date you might need to confirm override of some files. - 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.