-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Kotlin DSL Support #17
Comments
Thank you, and i also have to apologize for the rather poor kotlin support so far. Just to be on the save side - i am curious what exactly would be the desired outcome :) - always easier to meet expectations with examples. currently i am testing against https://github.com/aepfli/gradle-gitlab-repositories/blob/main/src/functionalTest/resources/build.gradle.kts what would be the desired look of it? i will try to take care of this as soon as possible (also the tokens are currently reworked, just had no time to merge it so far :), it should increase the usability for tokens at least like https://github.com/aepfli/gradle-gitlab-repositories/blob/a5de003f8a7515043b1d8025c9346d61a7bb61f3/src/functionalTest/resources/build.gradle.kts) |
something like this?
or
|
Yes, your examples look good. Maybe the type is a second parameter in the create function, because it must always be provided. This parameter could also be optional and set in the action block. I also encountered a problem when I tried to configure the repositories for all projects or all subprojects using the
and then tried to use |
@aepfli should I open a second issue for my problems with |
i think this would be a good idea - to keep those separate and reduce the amount of changes for one. Just as a headsup - i am currently a little bit short on free time, so i will be most likely end of january february that i can start on those topics. but i will try my best to squeeze them in earlier - at least i will focus on Tests first, so somebody can work easier on them. Thank you for the input! |
I created #19 |
in the first iteration i removed the classes and we do have strings now, for easier handling |
I tested 0.6.1 and the following works in the plugins {
id("at.schrottner.gitlab-repositories") version "0.6.1"
}
gitLab {
token("private") {
val gitLabPrivateToken: String? by project
key = "gitLabPrivateToken"
value = gitLabPrivateToken
}
} I will close this, because all my points of the kotlin support are improved. |
The gitlab extension cannot directly be used in build.gradle.kts files,
configure<>()
must be used. also the dls function which get aclass
type as argument should support kotlin reified type parameter.The text was updated successfully, but these errors were encountered: