Skip to content

Commit

Permalink
fix: gradle plugin is incompatible with the configuration cache
Browse files Browse the repository at this point in the history
  • Loading branch information
popovanton0 committed Jul 3, 2024
1 parent 75d622a commit 6da084b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ plugins {

kelp {
idePluginAbsenceBehaviour = IdePluginAbsenceBehaviour.WARNING // NOTHING, WARNING, BUILD_FAIL
requiredIdePluginVersion = "0.0.8"
requiredIdePluginVersion = "1.0.0"
requiredDemoApkVersion = "1.3.0" // libs.versions.yourDesignSystem.get()

// If your apk file can be downloaded without requiring to log in through web browser, use SimpleApkDownloader:
Expand All @@ -429,6 +429,29 @@ kelp {
})
}
```
<details>
<summary>Groovy</summary>

```groovy
import ru.ozon.kelp.IdePluginAbsenceBehaviour
import ru.ozon.kelp.downloaders.SimpleApkDownloader
kelp {
idePluginAbsenceBehaviour = IdePluginAbsenceBehaviour.BUILD_FAIL
requiredIdePluginVersion = "1.0.0"
requiredDemoApkVersion = "1.3.0"
def apkDownloader = new SimpleApkDownloader(
"Make sure to turn on the corporate VPN",
{},
{ version -> "https://example.com/demo-${version}.apk".toString() }
)
setApkDownloader(project, apkDownloader)
setApkDownloader(project, new BrowserApkDownloader(null, { version -> "https://example.com/?query=android/{$version}".toString() }))
}
```

</details>

### 🚚 Choosing how to distribute the demo app apk
TLDR:
Expand Down
2 changes: 1 addition & 1 deletion kelpGradlePlugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = "ru.ozon.kelp"
version = "0.0.3"
version = "0.0.4"

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class KelpGradlePlugin : Plugin<Project> {
kelpDir = kelpDir,
requiredVersion = extension.requiredIdePluginVersion.getOrNull(),
idePluginAbsenceBehaviour = extension.idePluginAbsenceBehaviour.get(),
logger = project.logger,
logger = logger,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public open class BrowserApkDownloader(
|Please, ⬇️ download the apk, version: $version.
|
|If after successful download this message still appears,
|manually place the apk into "$apkFile and re-run Gradle.
|manually place the apk into $apkFile and re-run Gradle.
|
|⏳ Waiting for .apk to appear in $downloads...
|⏳ Waiting for .apk to appear in $downloads ...
|""".trimMargin(),
)
val apk = runBlocking { waitForApkToAppear(downloads) }
Expand All @@ -65,7 +65,7 @@ public open class BrowserApkDownloader(
|🔗 Link to apk opened in 🌐 web browser (if not, manually open $url).
|Please, ⬇️ download the apk, version: $version.
|
|Then, manually place the apk into "$apkFile and re-run Gradle.
|Then, manually place the apk into $apkFile and re-run Gradle.
|""".trimMargin(),
)
throwException()
Expand Down

0 comments on commit 6da084b

Please sign in to comment.