What's equivalent for kotlin gradle script (build....
# announcements
a
What's equivalent for kotlin gradle script (build.gradle.kts) of the following configurations in this article/guide. Script is not recognizing
model { platforms {
and things like that... Gradle docs seem to have no docs for kts as well in this topic ๐Ÿ˜ž
v
The old model-based native plugins are deprecated as the whole model-based approach did not push through. You probably should not use it but use the replacement plugins.
a
Any example of replacement plugins?
a
Thanks!
v
yw
Btw. there is #C19FD9681 ๐Ÿ™‚
a
Oh did not knew that existed ๐Ÿ˜› thanks!!
v
And another btw.
Right above the link you sent:
โ˜๏ธ 1
a
๐Ÿ˜ฎ
By the way you can add an answer here, so it could be usable for future references if later somebody else checks this topic What's equivalent of the groovy gradle JNI configuration in kotlin gradle script? - Stack Overflow ๐Ÿ™‚
v
It wouldn't be an answer actually, it would be "don't use this" and thus not formally correct for the SO moderators. Also just posting links to where the information can be found is not ok but needs to be rewritten inside the answer. And additionally the example project does use Gradle DSL, not Kotlin DSL, so it would even less answer the question but would first need to be converted to Kotlin which is the essence of the question.
Regarding the actual question, https://docs.gradle.org/current/userguide/kotlin_dsl.html states under "Limitations"
The Kotlin DSL will not support the
model {}
block, which is part of the discontinued Gradle Software Model. However, you can apply model rules from scripts โ€” see the model rules sample for more information.
a
It wouldn't be an answer actually, it would be "don't use this" and thus not formally correct for the SO moderators.
Not really, its more like there's no way to do this in kt-gradle scripts and is deprecated more than dont use this... Another guy already answered :^
Anyway thanks for the help ๐Ÿ˜ƒ
v
No, that's the same guy ๐Ÿ˜‰
๐Ÿ˜„ 1
I just changed minds