Gradle plugin does not work with Kotlin DSL
See original GitHub issueHaving build.gradle.kts
like
plugins {
id("au.com.dius.pact") version "3.6.2"
}
pact {
publish {
pactBrokerUrl = "http://localhost:80"
}
}
causes an error:
Script compilation errors:
Line 70: publish {
^ Type mismatch: inferred type is () -> TypeVariable(_L) but Closure<(raw) Any!>! was expected
Line 71: pactBrokerUrl = "http://localhost:80"
^ Unresolved reference: pactBrokerUrl
2 errors
I guess PactPluginExtension should use org.gradle.api.Action instead of Groovy Closure.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Gradle Kotlin DSL Primer
Troubleshooting. The IDE support is provided by two components: The Kotlin Plugin used by IntelliJ IDEA/Android Studio.
Read more >Gradle kotlin-dsl configuration not working, android extension ...
5 Answers 5 · Find gradlew in your project root folder. · Right click on it, then open in -> terminal. · Write...
Read more >Plugin is not applied when using Gradle Kotlin DSL ... - GitHub
I'm afraid new plugins gradle block is not working with this plugin, since kotlinx-serialization for gradle is not uploaded to Gradle Plugin ......
Read more >Gradle Kotlin DSL - Code Reuse - Eugene Petrenko
With Gradle Kotlin DSL, it does not work that easily. I've been looking for the solution to this problem in Gradle Kotlin DSL...
Read more >Kotlin DSL: Gradle scripts in Android made easy - Medium
In this article, we will convert some common Groovy-based Gradle scripts into Kotlin DSL scripts. Let's get started. Open half baked side android...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had problems writing an automated test with Kotlin DSL, so I tested this with a standalone project:
I have a working prototype, I will submit a pull request.