@@ -28,12 +28,12 @@ buildscript {
2828
2929</details >
3030
31- <details ><summary >Kotlin</summary >
31+ <details ><summary >Kotlin (using classpath) </summary >
3232
3333``` kotlin
3434buildscript {
3535 repositories {
36- maven(" https://jitpack.io" )
36+ maven { url = java.net. URI (" https://jitpack.io" ) }
3737 }
3838 dependencies {
3939 classpath(" com.github.hyperdevs-team:poeditor-android-gradle-plugin:<latest_version>" )
@@ -43,6 +43,35 @@ buildscript {
4343
4444</details >
4545
46+ <details ><summary >Kotlin (using the plugins block)</summary >
47+
48+ Top-level ` settings.gradle.kts `
49+ ``` kotlin
50+ pluginManagement {
51+ repositories {
52+ maven { url = java.net.URI (" https://jitpack.io" ) }
53+ }
54+ resolutionStrategy {
55+ eachPlugin {
56+ // Add custom plugin ID for the PoEditor plugin.
57+ // This is required because the plugin is not published in the Gradle plugin portal.
58+ if (requested.id.id == " com.hyperdevs.poeditor" ) {
59+ useModule(" com.github.hyperdevs-team:poeditor-android-gradle-plugin:${requested.version} " )
60+ }
61+ }
62+ }
63+ }
64+ ```
65+
66+ Top-level ` build.gradle.kts `
67+ ``` kotlin
68+ plugins {
69+ id(" com.hyperdevs.poeditor" ) version " <latest_version>" apply false
70+ }
71+ ```
72+
73+ </details >
74+
4675## How to use
4776Apply and configure the plug-in in your app's ` build.gradle ` file:
4877<details open ><summary >Groovy</summary >
@@ -64,14 +93,14 @@ poEditor {
6493
6594``` kotlin
6695plugins {
67- id " com.android.application"
68- id " com.hyperdevs.poeditor"
96+ id( " com.android.application" )
97+ id( " com.hyperdevs.poeditor" )
6998}
7099
71100poEditor {
72- apiToken = " your_api_token"
73- projectId = 12345
74- defaultLang = " en"
101+ apiToken.set( " your_api_token" )
102+ projectId.set( 12345 )
103+ defaultLang.set( " en" )
75104}
76105```
77106
0 commit comments