Provide instructions on local build for Gradle Kotlin DSL in README #6339
Comments
|
Where would you expect developers using a Kotlin build script to look for this information? |
|
Hey @turastory. We need more information to resolve this issue but there hasn't been an update in 14 days. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
|
If you're saying where to put this information, then it should be README, of course. Other stuff are not quite different than Groovy's so those are not a big deal, but translating I suggest put this information below the |
|
All of our documentation assumes Groovy. Admittedly other parts are easier to convert (e.g. For the time-being I think it's reasonable that if someone wants to use Kotlin DSL, they can figure out how to do the conversion. The good news is that there's plenty of information available, including information for resolving this specific issue (e.g. by searching for things like "kotlin DSL gradle.ext"). I will keep this issue open, but mark it as low priority for now. We will revisit it as and when there's a clearer demand for Kotlin DSL specific instructions. |
[REQUIRED] Use case description
Gradle provides both way to write build script - Groovy, and Kotlin.
While both languages are perfectly fine to write typical build logic, they have different APIs in some cases.
To build locally in Kotlin, one should use
gradle.extra-ExtraPropertiesExtension, which is not defined in the class definition of Gradle.But Gradle instance is ExtensionAware, as the following code shows.
Guess it is because duck-typing is possible in Groovy - runtime implementation of traits?
So for those who use Kotlin DSL, appropriate instructions are needed.
Proposed solution
In
settings.gradle.kts:The text was updated successfully, but these errors were encountered: