You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
22
22
23
23
## [Unreleased]
24
24
### Added
25
-
- Add support for configuring non-standard resource directory path via `defaultResPath`. _Thanks to [@rafid059](https://github.com/rafid059) for the contribution!_
25
+
- Add support for using the plug-in in library modules.
26
+
- Add support for configuring non-standard resource directory path via `defaultResPath`. _Thanks to [@rafid059](https://github.com/rafid059) for the contribution!_
Copy file name to clipboardExpand all lines: README.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,7 @@ Attribute | Description
81
81
```apiToken``` | PoEditor API Token.
82
82
```projectId``` | PoEditor project ID.
83
83
```defaultLang``` | The lang to be used to build default ```strings.xml``` (```/values``` folder)
84
+
```defaultResPath``` | (Since 1.3.0) (Optional) Path where the plug-in should dump strings. Defaults to the module's default (or build variant) `res` path.
84
85
85
86
After the configuration is done, just run the new ```importPoEditorStrings``` task via Android Studio or command line:
Now the `importPoEditorStrings` task will import the main strings configured in the `poEditor` block and also the
181
182
strings for each defined flavor or build type.
182
183
184
+
## Handling library modules
185
+
> Requires version 1.3.0 of the plug-in
186
+
187
+
You can also apply the plug-in to library modules. Here's an example:
188
+
Apply and configure the plug-in in your library's `build.gradle` file:
189
+
<detailsopen><summary>Groovy</summary>
190
+
191
+
```groovy
192
+
apply plugin: "com.android.library"
193
+
apply plugin: "com.bq.poeditor"
194
+
195
+
poEditor {
196
+
apiToken = "your_api_token"
197
+
projectId = 12345
198
+
defaultLang = "en"
199
+
}
200
+
```
201
+
202
+
</details>
203
+
204
+
<details><summary>Kotlin</summary>
205
+
206
+
```kt
207
+
plugins {
208
+
id "com.android.library"
209
+
id "com.bq.poeditor"
210
+
}
211
+
212
+
poEditor {
213
+
apiToken ="your_api_token"
214
+
projectId =12345
215
+
defaultLang ="en"
216
+
}
217
+
```
218
+
219
+
</details>
220
+
221
+
You can also apply flavor and build type-specific configurations as you would do when setting them up with application modules.
222
+
The plug-in will generate the proper tasks needed to import the strings under your module: `:<your_module>:import<your_flavor_or_build_type_if_any>PoEditorStrings`
223
+
183
224
184
225
## Handling tablet specific strings
185
226
@@ -254,6 +295,7 @@ If you want a similar solution for your iOS projects, check this out: [poeditor-
0 commit comments