You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.
publish {
//... Other code - ignore me
licences = ["MIT"]
}
With that code the license array will be overwritten and it works.
I expect that I can set the licenses in kotlin similar to groovy:
publish {
//... Other code - ignore me
licences = arrayOf("MIT")
}
Current Behavior
If I use the same code in the Kotlin-DSL I get the error:
I can't workaround it somehow. First I thought I can use
licences.toMutableList().add("MIT")
but since the toMutableList() will return a new list I have to set the new list (which I have to convert to array first of course) to the licenses field of the extension. But since it is immutable I can't set it 😞
Context
N/A
Steps to Reproduce (for bugs)
You could create a new project and add the following code:
settings.gradle
In a project I want to use this plugin.
Unfortunately I can't set/change the
licences
from their extension in a expected way.This is the extension from the plugin.
As you see.
licenses
have a default value:String[] licences = ['Apache-2.0']
Expected Behavior
In the Groovy DLS I use the following code:
With that code the
license
array will be overwritten and it works.I expect that I can set the
licenses
in kotlin similar to groovy:Current Behavior
If I use the same code in the Kotlin-DSL I get the error:
![bildschirmfoto 2018-02-08 um 15 33 22](https://user-images.githubusercontent.com/10229883/35978229-6c0b896e-0ce5-11e8-849f-3e74f9647a87.png)
I can't workaround it somehow. First I thought I can use
licences.toMutableList().add("MIT")
but since the
toMutableList()
will return a new list I have to set the new list (which I have to convert to array first of course) to the licenses field of the extension. But since it is immutable I can't set it 😞Context
N/A
Steps to Reproduce (for bugs)
You could create a new project and add the following code:
settings.gradle
build.gradle.kts
Your Environment
Build scan URL:I think a build scan make no sense here
The text was updated successfully, but these errors were encountered: