azure-gradle-plugins icon indicating copy to clipboard operation
azure-gradle-plugins copied to clipboard

Extension properties cannot be reassigned

Open marceloverdijk opened this issue 6 years ago • 1 comments

When using the plugin with a build.gradle.kts Kotlin build script and setting:

azureWebApp {
    appName = "" // TODO
    pricingTier = "" // TODO
    resourceGroup = "" // TODO

I get the errors:

* What went wrong:
Script compilation errors:

  Line 106:     appName = ""        
                ^ Val cannot be reassigned

  Line 107:     pricingTier = ""        
                ^ Val cannot be reassigned

  Line 107:     pricingTier = ""        
                              ^ Type mismatch: inferred type is String but PricingTier! was expected

  Line 108:     resourceGroup = ""        
                ^ Val cannot be reassigned

Is it because these properties in https://github.com/lenala/azure-gradle-plugins/blob/master/azure-webapp-gradle-plugin/src/main/java/lenala/azure/gradle/webapp/AzureWebAppExtension.java#L15 are private and there is no setter?

marceloverdijk avatar Mar 13 '19 12:03 marceloverdijk

Similar issues with other plugin: https://stackoverflow.com/questions/53520246/gradle-5-0-causes-error-val-cannot-be-reassigned-when-using-kotlin-dsl-in-buid-g

marceloverdijk avatar Mar 13 '19 12:03 marceloverdijk